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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
int glMapBuffer_bind(lua_State *L)
{
GLenum target = luaL_checkinteger(L, 1);
GLenum access = luaL_checkinteger(L, 2);
void * bind_result = glMapBuffer(target, access);
/* push result */
return /* count */;
}
int glMapBufferRange_bind(lua_State *L)
{
GLenum target = luaL_checkinteger(L, 1);
GLintptr offset = luaL_checkinteger(L, 2);
GLsizeiptr length = luaL_checkinteger(L, 3);
GLbitfield access = luaL_checkinteger(L, 4);
void * bind_result = glMapBufferRange(target, offset, length, access);
/* push result */
return /* count */;
}
int glMinSampleShading_bind(lua_State *L)
{
GLfloat value = luaL_checknumber(L, 1);
glMinSampleShading(value);
return 0;
}
int glMultiDrawArrays_bind(lua_State *L)
{
GLenum mode = luaL_checkinteger(L, 1);
const GLint * first = get: const GLint *
const GLsizei * count = get: const GLsizei *
GLsizei drawcount = luaL_checkinteger(L, 4);
glMultiDrawArrays(mode, first, count, drawcount);
return 0;
}
int glMultiDrawElements_bind(lua_State *L)
{
GLenum mode = luaL_checkinteger(L, 1);
const GLsizei * count = get: const GLsizei *
GLenum type = luaL_checkinteger(L, 3);
const void * const * indices = get: const void * const *
GLsizei drawcount = luaL_checkinteger(L, 5);
glMultiDrawElements(mode, count, type, indices, drawcount);
return 0;
}
int glMultiDrawElementsBaseVertex_bind(lua_State *L)
{
GLenum mode = luaL_checkinteger(L, 1);
const GLsizei * count = get: const GLsizei *
GLenum type = luaL_checkinteger(L, 3);
const void * const * indices = get: const void * const *
GLsizei drawcount = luaL_checkinteger(L, 5);
const GLint * basevertex = get: const GLint *
glMultiDrawElementsBaseVertex(mode, count, type, indices, drawcount, basevertex);
return 0;
}
|