blob: 001243111c77b78392f7076d86c271000106d744 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
#include <lua.h>
#include <lauxlib.h>
#include <nanovg.h>
#include "nvg.h"
int nvgBeginFrame_bind(lua_State *L)
{
struct NVGcontext **vg = luaL_checkudata(L, 1, nvg_ctx_tname);
float width = luaL_checknumber(L, 2);
float height = luaL_checknumber(L, 3);
float pixelRatio = luaL_checknumber(L, 4);
nvgBeginFrame(*vg, width, height, pixelRatio);
return 0;
}
int nvgCancelFrame_bind(lua_State *L)
{
struct NVGcontext **vg = luaL_checkudata(L, 1, nvg_ctx_tname);
nvgCancelFrame(*vg);
return 0;
}
int nvgEndFrame_bind(lua_State *L)
{
struct NVGcontext **vg = luaL_checkudata(L, 1, nvg_ctx_tname);
nvgEndFrame(*vg);
return 0;
}
|