1 #include "gles2context.h"
2
3 #define API_ENTRY
4 #define CALL_GL_API(NAME,...) LOGD("?"#NAME); assert(0);
5 #define CALL_GL_API_RETURN(NAME,...) LOGD("?"#NAME); assert(0); return 0;
6
7
API_ENTRY(glBindFramebuffer)8 void API_ENTRY(glBindFramebuffer)(GLenum target, GLuint framebuffer)
9 {
10 CALL_GL_API(glBindFramebuffer, target, framebuffer);
11 }
API_ENTRY(glBindRenderbuffer)12 void API_ENTRY(glBindRenderbuffer)(GLenum target, GLuint renderbuffer)
13 {
14 CALL_GL_API(glBindRenderbuffer, target, renderbuffer);
15 }
API_ENTRY(glCheckFramebufferStatus)16 GLenum API_ENTRY(glCheckFramebufferStatus)(GLenum target)
17 {
18 CALL_GL_API_RETURN(glCheckFramebufferStatus, target);
19 }
API_ENTRY(glColorMask)20 void API_ENTRY(glColorMask)(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha)
21 {
22 CALL_GL_API(glColorMask, red, green, blue, alpha);
23 }
API_ENTRY(glDeleteFramebuffers)24 void API_ENTRY(glDeleteFramebuffers)(GLsizei n, const GLuint* framebuffers)
25 {
26 CALL_GL_API(glDeleteFramebuffers, n, framebuffers);
27 }
API_ENTRY(glDeleteRenderbuffers)28 void API_ENTRY(glDeleteRenderbuffers)(GLsizei n, const GLuint* renderbuffers)
29 {
30 CALL_GL_API(glDeleteRenderbuffers, n, renderbuffers);
31 }
API_ENTRY(glDepthFunc)32 void API_ENTRY(glDepthFunc)(GLenum func)
33 {
34 CALL_GL_API(glDepthFunc, func);
35 }
API_ENTRY(glDepthMask)36 void API_ENTRY(glDepthMask)(GLboolean flag)
37 {
38 CALL_GL_API(glDepthMask, flag);
39 }
API_ENTRY(glDepthRangef)40 void API_ENTRY(glDepthRangef)(GLclampf zNear, GLclampf zFar)
41 {
42 CALL_GL_API(glDepthRangef, zNear, zFar);
43 }
API_ENTRY(glFramebufferRenderbuffer)44 void API_ENTRY(glFramebufferRenderbuffer)(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer)
45 {
46 CALL_GL_API(glFramebufferRenderbuffer, target, attachment, renderbuffertarget, renderbuffer);
47 }
API_ENTRY(glFramebufferTexture2D)48 void API_ENTRY(glFramebufferTexture2D)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)
49 {
50 CALL_GL_API(glFramebufferTexture2D, target, attachment, textarget, texture, level);
51 }
glGenerateMipmap(GLenum target)52 void glGenerateMipmap(GLenum target)
53 {
54 //CALL_GL_API(glGenerateMipmap, target);
55 LOGD("agl2: glGenerateMipmap not implemented");
56 }
API_ENTRY(glGenFramebuffers)57 void API_ENTRY(glGenFramebuffers)(GLsizei n, GLuint* framebuffers)
58 {
59 CALL_GL_API(glGenFramebuffers, n, framebuffers);
60 }
API_ENTRY(glGenRenderbuffers)61 void API_ENTRY(glGenRenderbuffers)(GLsizei n, GLuint* renderbuffers)
62 {
63 CALL_GL_API(glGenRenderbuffers, n, renderbuffers);
64 }
API_ENTRY(glGetActiveAttrib)65 void API_ENTRY(glGetActiveAttrib)(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name)
66 {
67 CALL_GL_API(glGetActiveAttrib, program, index, bufsize, length, size, type, name);
68 }
API_ENTRY(glGetActiveUniform)69 void API_ENTRY(glGetActiveUniform)(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name)
70 {
71 CALL_GL_API(glGetActiveUniform, program, index, bufsize, length, size, type, name);
72 }
API_ENTRY(glGetAttachedShaders)73 void API_ENTRY(glGetAttachedShaders)(GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders)
74 {
75 CALL_GL_API(glGetAttachedShaders, program, maxcount, count, shaders);
76 }
API_ENTRY(glGetBooleanv)77 void API_ENTRY(glGetBooleanv)(GLenum pname, GLboolean* params)
78 {
79 CALL_GL_API(glGetBooleanv, pname, params);
80 }
API_ENTRY(glGetBufferParameteriv)81 void API_ENTRY(glGetBufferParameteriv)(GLenum target, GLenum pname, GLint* params)
82 {
83 CALL_GL_API(glGetBufferParameteriv, target, pname, params);
84 }
glGetError(void)85 GLenum glGetError(void)
86 {
87 puts("agl2: glGetError");
88 return GL_NO_ERROR;
89 //CALL_GL_API_RETURN(glGetError);
90 }
API_ENTRY(glGetFloatv)91 void API_ENTRY(glGetFloatv)(GLenum pname, GLfloat* params)
92 {
93 CALL_GL_API(glGetFloatv, pname, params);
94 }
API_ENTRY(glGetFramebufferAttachmentParameteriv)95 void API_ENTRY(glGetFramebufferAttachmentParameteriv)(GLenum target, GLenum attachment, GLenum pname, GLint* params)
96 {
97 CALL_GL_API(glGetFramebufferAttachmentParameteriv, target, attachment, pname, params);
98 }
API_ENTRY(glGetRenderbufferParameteriv)99 void API_ENTRY(glGetRenderbufferParameteriv)(GLenum target, GLenum pname, GLint* params)
100 {
101 CALL_GL_API(glGetRenderbufferParameteriv, target, pname, params);
102 }
API_ENTRY(glGetShaderPrecisionFormat)103 void API_ENTRY(glGetShaderPrecisionFormat)(GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision)
104 {
105 CALL_GL_API(glGetShaderPrecisionFormat, shadertype, precisiontype, range, precision);
106 }
API_ENTRY(glGetShaderSource)107 void API_ENTRY(glGetShaderSource)(GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* source)
108 {
109 CALL_GL_API(glGetShaderSource, shader, bufsize, length, source);
110 }
API_ENTRY(glGetUniformfv)111 void API_ENTRY(glGetUniformfv)(GLuint program, GLint location, GLfloat* params)
112 {
113 CALL_GL_API(glGetUniformfv, program, location, params);
114 }
API_ENTRY(glGetUniformiv)115 void API_ENTRY(glGetUniformiv)(GLuint program, GLint location, GLint* params)
116 {
117 CALL_GL_API(glGetUniformiv, program, location, params);
118 }
API_ENTRY(glGetVertexAttribfv)119 void API_ENTRY(glGetVertexAttribfv)(GLuint index, GLenum pname, GLfloat* params)
120 {
121 CALL_GL_API(glGetVertexAttribfv, index, pname, params);
122 }
API_ENTRY(glGetVertexAttribiv)123 void API_ENTRY(glGetVertexAttribiv)(GLuint index, GLenum pname, GLint* params)
124 {
125 CALL_GL_API(glGetVertexAttribiv, index, pname, params);
126 }
API_ENTRY(glGetVertexAttribPointerv)127 void API_ENTRY(glGetVertexAttribPointerv)(GLuint index, GLenum pname, GLvoid** pointer)
128 {
129 CALL_GL_API(glGetVertexAttribPointerv, index, pname, pointer);
130 }
API_ENTRY(glIsBuffer)131 GLboolean API_ENTRY(glIsBuffer)(GLuint buffer)
132 {
133 CALL_GL_API_RETURN(glIsBuffer, buffer);
134 }
API_ENTRY(glIsEnabled)135 GLboolean API_ENTRY(glIsEnabled)(GLenum cap)
136 {
137 CALL_GL_API_RETURN(glIsEnabled, cap);
138 }
API_ENTRY(glIsFramebuffer)139 GLboolean API_ENTRY(glIsFramebuffer)(GLuint framebuffer)
140 {
141 CALL_GL_API_RETURN(glIsFramebuffer, framebuffer);
142 }
API_ENTRY(glIsProgram)143 GLboolean API_ENTRY(glIsProgram)(GLuint program)
144 {
145 CALL_GL_API_RETURN(glIsProgram, program);
146 }
API_ENTRY(glIsRenderbuffer)147 GLboolean API_ENTRY(glIsRenderbuffer)(GLuint renderbuffer)
148 {
149 CALL_GL_API_RETURN(glIsRenderbuffer, renderbuffer);
150 }
API_ENTRY(glIsShader)151 GLboolean API_ENTRY(glIsShader)(GLuint shader)
152 {
153 CALL_GL_API_RETURN(glIsShader, shader);
154 }
API_ENTRY(glLineWidth)155 void API_ENTRY(glLineWidth)(GLfloat width)
156 {
157 CALL_GL_API(glLineWidth, width);
158 }
API_ENTRY(glPolygonOffset)159 void API_ENTRY(glPolygonOffset)(GLfloat factor, GLfloat units)
160 {
161 CALL_GL_API(glPolygonOffset, factor, units);
162 }
API_ENTRY(glReadPixels)163 void API_ENTRY(glReadPixels)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid* pixels)
164 {
165 CALL_GL_API(glReadPixels, x, y, width, height, format, type, pixels);
166 }
API_ENTRY(glReleaseShaderCompiler)167 void API_ENTRY(glReleaseShaderCompiler)(void)
168 {
169 CALL_GL_API(glReleaseShaderCompiler);
170 }
API_ENTRY(glRenderbufferStorage)171 void API_ENTRY(glRenderbufferStorage)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height)
172 {
173 CALL_GL_API(glRenderbufferStorage, target, internalformat, width, height);
174 }
API_ENTRY(glSampleCoverage)175 void API_ENTRY(glSampleCoverage)(GLclampf value, GLboolean invert)
176 {
177 CALL_GL_API(glSampleCoverage, value, invert);
178 }
API_ENTRY(glShaderBinary)179 void API_ENTRY(glShaderBinary)(GLsizei n, const GLuint* shaders, GLenum binaryformat, const GLvoid* binary, GLsizei length)
180 {
181 CALL_GL_API(glShaderBinary, n, shaders, binaryformat, binary, length);
182 }
API_ENTRY(glStencilFunc)183 void API_ENTRY(glStencilFunc)(GLenum func, GLint ref, GLuint mask)
184 {
185 CALL_GL_API(glStencilFunc, func, ref, mask);
186 }
API_ENTRY(glStencilFuncSeparate)187 void API_ENTRY(glStencilFuncSeparate)(GLenum face, GLenum func, GLint ref, GLuint mask)
188 {
189 CALL_GL_API(glStencilFuncSeparate, face, func, ref, mask);
190 }
API_ENTRY(glStencilMask)191 void API_ENTRY(glStencilMask)(GLuint mask)
192 {
193 CALL_GL_API(glStencilMask, mask);
194 }
API_ENTRY(glStencilMaskSeparate)195 void API_ENTRY(glStencilMaskSeparate)(GLenum face, GLuint mask)
196 {
197 CALL_GL_API(glStencilMaskSeparate, face, mask);
198 }
API_ENTRY(glStencilOp)199 void API_ENTRY(glStencilOp)(GLenum fail, GLenum zfail, GLenum zpass)
200 {
201 CALL_GL_API(glStencilOp, fail, zfail, zpass);
202 }
API_ENTRY(glStencilOpSeparate)203 void API_ENTRY(glStencilOpSeparate)(GLenum face, GLenum fail, GLenum zfail, GLenum zpass)
204 {
205 CALL_GL_API(glStencilOpSeparate, face, fail, zfail, zpass);
206 }
API_ENTRY(glUniform1fv)207 void API_ENTRY(glUniform1fv)(GLint location, GLsizei count, const GLfloat* v)
208 {
209 CALL_GL_API(glUniform1fv, location, count, v);
210 }
API_ENTRY(glUniform1iv)211 void API_ENTRY(glUniform1iv)(GLint location, GLsizei count, const GLint* v)
212 {
213 CALL_GL_API(glUniform1iv, location, count, v);
214 }
API_ENTRY(glUniform2fv)215 void API_ENTRY(glUniform2fv)(GLint location, GLsizei count, const GLfloat* v)
216 {
217 CALL_GL_API(glUniform2fv, location, count, v);
218 }
API_ENTRY(glUniform2i)219 void API_ENTRY(glUniform2i)(GLint location, GLint x, GLint y)
220 {
221 CALL_GL_API(glUniform2i, location, x, y);
222 }
API_ENTRY(glUniform2iv)223 void API_ENTRY(glUniform2iv)(GLint location, GLsizei count, const GLint* v)
224 {
225 CALL_GL_API(glUniform2iv, location, count, v);
226 }
API_ENTRY(glUniform3f)227 void API_ENTRY(glUniform3f)(GLint location, GLfloat x, GLfloat y, GLfloat z)
228 {
229 CALL_GL_API(glUniform3f, location, x, y, z);
230 }
API_ENTRY(glUniform3fv)231 void API_ENTRY(glUniform3fv)(GLint location, GLsizei count, const GLfloat* v)
232 {
233 CALL_GL_API(glUniform3fv, location, count, v);
234 }
API_ENTRY(glUniform3i)235 void API_ENTRY(glUniform3i)(GLint location, GLint x, GLint y, GLint z)
236 {
237 CALL_GL_API(glUniform3i, location, x, y, z);
238 }
API_ENTRY(glUniform3iv)239 void API_ENTRY(glUniform3iv)(GLint location, GLsizei count, const GLint* v)
240 {
241 CALL_GL_API(glUniform3iv, location, count, v);
242 }
API_ENTRY(glUniform4fv)243 void API_ENTRY(glUniform4fv)(GLint location, GLsizei count, const GLfloat* v)
244 {
245 CALL_GL_API(glUniform4fv, location, count, v);
246 }
API_ENTRY(glUniform4i)247 void API_ENTRY(glUniform4i)(GLint location, GLint x, GLint y, GLint z, GLint w)
248 {
249 CALL_GL_API(glUniform4i, location, x, y, z, w);
250 }
API_ENTRY(glUniform4iv)251 void API_ENTRY(glUniform4iv)(GLint location, GLsizei count, const GLint* v)
252 {
253 CALL_GL_API(glUniform4iv, location, count, v);
254 }
API_ENTRY(glUniformMatrix2fv)255 void API_ENTRY(glUniformMatrix2fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
256 {
257 CALL_GL_API(glUniformMatrix2fv, location, count, transpose, value);
258 }
API_ENTRY(glUniformMatrix3fv)259 void API_ENTRY(glUniformMatrix3fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
260 {
261 CALL_GL_API(glUniformMatrix3fv, location, count, transpose, value);
262 }
API_ENTRY(glValidateProgram)263 void API_ENTRY(glValidateProgram)(GLuint program)
264 {
265 CALL_GL_API(glValidateProgram, program);
266 }
267