summaryrefslogtreecommitdiff
path: root/src/opengl/bind/s.bind
blob: 256ebe263201e32aacbf643513bc240d6c915c66 (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
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
int glSampleCoverage_bind(lua_State *L)
{
	GLfloat value = luaL_checknumber(L, 1);
	GLboolean invert = get: GLboolean
	glSampleCoverage(value, invert);
	return 0;
}


int glSampleMaski_bind(lua_State *L)
{
	GLuint maskNumber = luaL_checkinteger(L, 1);
	GLbitfield mask = luaL_checkinteger(L, 2);
	glSampleMaski(maskNumber, mask);
	return 0;
}


int glSamplerParameterf_bind(lua_State *L)
{
	GLuint sampler = luaL_checkinteger(L, 1);
	GLenum pname = luaL_checkinteger(L, 2);
	GLfloat param = luaL_checknumber(L, 3);
	glSamplerParameterf(sampler, pname, param);
	return 0;
}


int glSamplerParameteri_bind(lua_State *L)
{
	GLuint sampler = luaL_checkinteger(L, 1);
	GLenum pname = luaL_checkinteger(L, 2);
	GLint param = luaL_checkinteger(L, 3);
	glSamplerParameteri(sampler, pname, param);
	return 0;
}


int glSamplerParameterfv_bind(lua_State *L)
{
	GLuint sampler = luaL_checkinteger(L, 1);
	GLenum pname = luaL_checkinteger(L, 2);
	const GLfloat * params = get: const GLfloat *
	glSamplerParameterfv(sampler, pname, params);
	return 0;
}


int glSamplerParameteriv_bind(lua_State *L)
{
	GLuint sampler = luaL_checkinteger(L, 1);
	GLenum pname = luaL_checkinteger(L, 2);
	const GLint * params = get: const GLint *
	glSamplerParameteriv(sampler, pname, params);
	return 0;
}


int glSamplerParameterIiv_bind(lua_State *L)
{
	GLuint sampler = luaL_checkinteger(L, 1);
	GLenum pname = luaL_checkinteger(L, 2);
	const GLint * params = get: const GLint *
	glSamplerParameterIiv(sampler, pname, params);
	return 0;
}


int glSamplerParameterIuiv_bind(lua_State *L)
{
	GLuint sampler = luaL_checkinteger(L, 1);
	GLenum pname = luaL_checkinteger(L, 2);
	const GLuint * params = get: const GLuint *
	glSamplerParameterIuiv(sampler, pname, params);
	return 0;
}


int glScissor_bind(lua_State *L)
{
	GLint x = luaL_checkinteger(L, 1);
	GLint y = luaL_checkinteger(L, 2);
	GLsizei width = luaL_checkinteger(L, 3);
	GLsizei height = luaL_checkinteger(L, 4);
	glScissor(x, y, width, height);
	return 0;
}


int glScissorArrayv_bind(lua_State *L)
{
	GLuint first = luaL_checkinteger(L, 1);
	GLsizei count = luaL_checkinteger(L, 2);
	const GLint * v = get: const GLint *
	glScissorArrayv(first, count, v);
	return 0;
}


int glScissorIndexed_bind(lua_State *L)
{
	GLuint index = luaL_checkinteger(L, 1);
	GLint left = luaL_checkinteger(L, 2);
	GLint bottom = luaL_checkinteger(L, 3);
	GLsizei width = luaL_checkinteger(L, 4);
	GLsizei height = luaL_checkinteger(L, 5);
	glScissorIndexed(index, left, bottom, width, height);
	return 0;
}


int glScissorIndexedv_bind(lua_State *L)
{
	GLuint index = luaL_checkinteger(L, 1);
	const GLint * v = get: const GLint *
	glScissorIndexedv(index, v);
	return 0;
}


int glShaderBinary_bind(lua_State *L)
{
	GLsizei count = luaL_checkinteger(L, 1);
	const GLuint * shaders = get: const GLuint *
	GLenum binaryFormat = luaL_checkinteger(L, 3);
	const void * binary = get: const void *
	GLsizei length = luaL_checkinteger(L, 5);
	glShaderBinary(count, shaders, binaryFormat, binary, length);
	return 0;
}


int glShaderSource_bind(lua_State *L)
{
	GLuint shader = luaL_checkinteger(L, 1);
	GLsizei count = luaL_checkinteger(L, 2);
	const GLchar ** string = get: const GLchar **
	const GLint * length = get: const GLint *
	glShaderSource(shader, count, string, length);
	return 0;
}


int glStencilFunc_bind(lua_State *L)
{
	GLenum func = luaL_checkinteger(L, 1);
	GLint ref = luaL_checkinteger(L, 2);
	GLuint mask = luaL_checkinteger(L, 3);
	glStencilFunc(func, ref, mask);
	return 0;
}


int glStencilFuncSeparate_bind(lua_State *L)
{
	GLenum face = luaL_checkinteger(L, 1);
	GLenum func = luaL_checkinteger(L, 2);
	GLint ref = luaL_checkinteger(L, 3);
	GLuint mask = luaL_checkinteger(L, 4);
	glStencilFuncSeparate(face, func, ref, mask);
	return 0;
}


int glStencilMask_bind(lua_State *L)
{
	GLuint mask = luaL_checkinteger(L, 1);
	glStencilMask(mask);
	return 0;
}


int glStencilMaskSeparate_bind(lua_State *L)
{
	GLenum face = luaL_checkinteger(L, 1);
	GLuint mask = luaL_checkinteger(L, 2);
	glStencilMaskSeparate(face, mask);
	return 0;
}


int glStencilOp_bind(lua_State *L)
{
	GLenum sfail = luaL_checkinteger(L, 1);
	GLenum dpfail = luaL_checkinteger(L, 2);
	GLenum dppass = luaL_checkinteger(L, 3);
	glStencilOp(sfail, dpfail, dppass);
	return 0;
}


int glStencilOpSeparate_bind(lua_State *L)
{
	GLenum face = luaL_checkinteger(L, 1);
	GLenum sfail = luaL_checkinteger(L, 2);
	GLenum dpfail = luaL_checkinteger(L, 3);
	GLenum dppass = luaL_checkinteger(L, 4);
	glStencilOpSeparate(face, sfail, dpfail, dppass);
	return 0;
}