OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2014 Google Inc. | 3 * Copyright 2014 Google Inc. |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 #include "gl/GrGLInterface.h" | 8 #include "gl/GrGLInterface.h" |
9 #include "gl/GrGLAssembleInterface.h" | 9 #include "gl/GrGLAssembleInterface.h" |
10 #include "gl/GrGLUtil.h" | 10 #include "gl/GrGLUtil.h" |
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
205 } else if (0 == strcmp("glGenFramebuffers", name)) { | 205 } else if (0 == strcmp("glGenFramebuffers", name)) { |
206 return (GrGLFuncPtr) glGenFramebuffers; | 206 return (GrGLFuncPtr) glGenFramebuffers; |
207 } else if (0 == strcmp("glGenRenderbuffers", name)) { | 207 } else if (0 == strcmp("glGenRenderbuffers", name)) { |
208 return (GrGLFuncPtr) glGenRenderbuffers; | 208 return (GrGLFuncPtr) glGenRenderbuffers; |
209 } else if (0 == strcmp("glGetFramebufferAttachmentParameteriv", name)) { | 209 } else if (0 == strcmp("glGetFramebufferAttachmentParameteriv", name)) { |
210 return (GrGLFuncPtr) glGetFramebufferAttachmentParameteriv; | 210 return (GrGLFuncPtr) glGetFramebufferAttachmentParameteriv; |
211 } else if (0 == strcmp("glGetRenderbufferParameteriv", name)) { | 211 } else if (0 == strcmp("glGetRenderbufferParameteriv", name)) { |
212 return (GrGLFuncPtr) glGetRenderbufferParameteriv; | 212 return (GrGLFuncPtr) glGetRenderbufferParameteriv; |
213 } else if (0 == strcmp("glRenderbufferStorage", name)) { | 213 } else if (0 == strcmp("glRenderbufferStorage", name)) { |
214 return (GrGLFuncPtr) glRenderbufferStorage; | 214 return (GrGLFuncPtr) glRenderbufferStorage; |
215 } else if (0 == strcmp("glActiveTexture", name)) { | |
216 return (GrGLFuncPtr) glActiveTexture; | |
217 } else if (0 == strcmp("glAttachShader", name)) { | |
218 return (GrGLFuncPtr) glAttachShader; | |
219 } else if (0 == strcmp("glBindAttribLocation", name)) { | |
220 return (GrGLFuncPtr) glBindAttribLocation; | |
221 } else if (0 == strcmp("glBindBuffer", name)) { | |
222 return (GrGLFuncPtr) glBindBuffer; | |
223 } else if (0 == strcmp("glBindTexture", name)) { | |
224 return (GrGLFuncPtr) glBindTexture; | |
225 } else if (0 == strcmp("glBlendColor", name)) { | |
226 return (GrGLFuncPtr) glBlendColor; | |
227 } else if (0 == strcmp("glBlendFunc", name)) { | |
228 return (GrGLFuncPtr) glBlendFunc; | |
229 } else if (0 == strcmp("glBufferData", name)) { | |
230 return (GrGLFuncPtr) glBufferData; | |
231 } else if (0 == strcmp("glBufferSubData", name)) { | |
232 return (GrGLFuncPtr) glBufferSubData; | |
233 } else if (0 == strcmp("glClear", name)) { | |
234 return (GrGLFuncPtr) glClear; | |
235 } else if (0 == strcmp("glClearColor", name)) { | |
236 return (GrGLFuncPtr) glClearColor; | |
237 } else if (0 == strcmp("glClearStencil", name)) { | |
238 return (GrGLFuncPtr) glClearStencil; | |
239 } else if (0 == strcmp("glColorMask", name)) { | |
240 return (GrGLFuncPtr) glColorMask; | |
241 } else if (0 == strcmp("glCompileShader", name)) { | |
242 return (GrGLFuncPtr) glCompileShader; | |
243 } else if (0 == strcmp("glCompressedTexImage2D", name)) { | |
244 return (GrGLFuncPtr) glCompressedTexImage2D; | |
245 } else if (0 == strcmp("glCompressedTexSubImage2D", name)) { | |
246 return (GrGLFuncPtr) glCompressedTexSubImage2D; | |
247 } else if (0 == strcmp("glCopyTexSubImage2D", name)) { | |
248 return (GrGLFuncPtr) glCopyTexSubImage2D; | |
249 } else if (0 == strcmp("glCreateProgram", name)) { | |
250 return (GrGLFuncPtr) glCreateProgram; | |
251 } else if (0 == strcmp("glCreateShader", name)) { | |
252 return (GrGLFuncPtr) glCreateShader; | |
253 } else if (0 == strcmp("glCullFace", name)) { | |
254 return (GrGLFuncPtr) glCullFace; | |
255 } else if (0 == strcmp("glDeleteBuffers", name)) { | |
256 return (GrGLFuncPtr) glDeleteBuffers; | |
257 } else if (0 == strcmp("glDeleteProgram", name)) { | |
258 return (GrGLFuncPtr) glDeleteProgram; | |
259 } else if (0 == strcmp("glDeleteShader", name)) { | |
260 return (GrGLFuncPtr) glDeleteShader; | |
261 } else if (0 == strcmp("glDeleteTextures", name)) { | |
262 return (GrGLFuncPtr) glDeleteTextures; | |
263 } else if (0 == strcmp("glDepthMask", name)) { | |
264 return (GrGLFuncPtr) glDepthMask; | |
265 } else if (0 == strcmp("glDisable", name)) { | |
266 return (GrGLFuncPtr) glDisable; | |
267 } else if (0 == strcmp("glDisableVertexAttribArray", name)) { | |
268 return (GrGLFuncPtr) glDisableVertexAttribArray; | |
269 } else if (0 == strcmp("glDrawArrays", name)) { | |
270 return (GrGLFuncPtr) glDrawArrays; | |
271 } else if (0 == strcmp("glDrawElements", name)) { | |
272 return (GrGLFuncPtr) glDrawElements; | |
273 } else if (0 == strcmp("glEnable", name)) { | |
274 return (GrGLFuncPtr) glEnable; | |
275 } else if (0 == strcmp("glEnableVertexAttribArray", name)) { | |
276 return (GrGLFuncPtr) glEnableVertexAttribArray; | |
277 } else if (0 == strcmp("glFinish", name)) { | |
278 return (GrGLFuncPtr) glFinish; | |
279 } else if (0 == strcmp("glFlush", name)) { | |
280 return (GrGLFuncPtr) glFlush; | |
281 } else if (0 == strcmp("glFrontFace", name)) { | |
282 return (GrGLFuncPtr) glFrontFace; | |
283 } else if (0 == strcmp("glGenBuffers", name)) { | |
284 return (GrGLFuncPtr) glGenBuffers; | |
285 } else if (0 == strcmp("glGenerateMipmap", name)) { | |
286 return (GrGLFuncPtr) glGenerateMipmap; | |
287 } else if (0 == strcmp("glGenTextures", name)) { | |
288 return (GrGLFuncPtr) glGenTextures; | |
289 } else if (0 == strcmp("glGetBufferParameteriv", name)) { | |
290 return (GrGLFuncPtr) glGetBufferParameteriv; | |
291 } else if (0 == strcmp("glGetError", name)) { | |
292 return (GrGLFuncPtr) glGetError; | |
293 } else if (0 == strcmp("glGetIntegerv", name)) { | |
294 return (GrGLFuncPtr) glGetIntegerv; | |
295 } else if (0 == strcmp("glGetProgramInfoLog", name)) { | |
296 return (GrGLFuncPtr) glGetProgramInfoLog; | |
297 } else if (0 == strcmp("glGetProgramiv", name)) { | |
298 return (GrGLFuncPtr) glGetProgramiv; | |
299 } else if (0 == strcmp("glGetShaderInfoLog", name)) { | |
300 return (GrGLFuncPtr) glGetShaderInfoLog; | |
301 } else if (0 == strcmp("glGetShaderiv", name)) { | |
302 return (GrGLFuncPtr) glGetShaderiv; | |
303 } else if (0 == strcmp("glGetString", name)) { | |
304 return (GrGLFuncPtr) glGetString; | |
305 } else if (0 == strcmp("glGetUniformLocation", name)) { | |
306 return (GrGLFuncPtr) glGetUniformLocation; | |
307 } else if (0 == strcmp("glLineWidth", name)) { | |
308 return (GrGLFuncPtr) glLineWidth; | |
309 } else if (0 == strcmp("glLinkProgram", name)) { | |
310 return (GrGLFuncPtr) glLinkProgram; | |
311 } else if (0 == strcmp("glPixelStorei", name)) { | |
312 return (GrGLFuncPtr) glPixelStorei; | |
313 } else if (0 == strcmp("glReadPixels", name)) { | |
314 return (GrGLFuncPtr) glReadPixels; | |
315 } else if (0 == strcmp("glScissor", name)) { | |
316 return (GrGLFuncPtr) glScissor; | |
317 } else if (0 == strcmp("glShaderSource", name)) { | |
318 return (GrGLFuncPtr) glShaderSource; | |
319 } else if (0 == strcmp("glStencilFunc", name)) { | |
320 return (GrGLFuncPtr) glStencilFunc; | |
321 } else if (0 == strcmp("glStencilFuncSeparate", name)) { | |
322 return (GrGLFuncPtr) glStencilFuncSeparate; | |
323 } else if (0 == strcmp("glStencilMask", name)) { | |
324 return (GrGLFuncPtr) glStencilMask; | |
325 } else if (0 == strcmp("glStencilMaskSeparate", name)) { | |
326 return (GrGLFuncPtr) glStencilMaskSeparate; | |
327 } else if (0 == strcmp("glStencilOp", name)) { | |
328 return (GrGLFuncPtr) glStencilOp; | |
329 } else if (0 == strcmp("glStencilOpSeparate", name)) { | |
330 return (GrGLFuncPtr) glStencilOpSeparate; | |
331 } else if (0 == strcmp("glTexImage2D", name)) { | |
332 return (GrGLFuncPtr) glTexImage2D; | |
333 } else if (0 == strcmp("glTexParameteri", name)) { | |
334 return (GrGLFuncPtr) glTexParameteri; | |
335 } else if (0 == strcmp("glTexParameteriv", name)) { | |
336 return (GrGLFuncPtr) glTexParameteriv; | |
337 } else if (0 == strcmp("glTexSubImage2D", name)) { | |
338 return (GrGLFuncPtr) glTexSubImage2D; | |
339 } else if (0 == strcmp("glUniform1f", name)) { | |
340 return (GrGLFuncPtr) glUniform1f; | |
341 } else if (0 == strcmp("glUniform1i", name)) { | |
342 return (GrGLFuncPtr) glUniform1i; | |
343 } else if (0 == strcmp("glUniform1fv", name)) { | |
344 return (GrGLFuncPtr) glUniform1fv; | |
345 } else if (0 == strcmp("glUniform1iv", name)) { | |
346 return (GrGLFuncPtr) glUniform1iv; | |
347 } else if (0 == strcmp("glUniform2f", name)) { | |
348 return (GrGLFuncPtr) glUniform2f; | |
349 } else if (0 == strcmp("glUniform2i", name)) { | |
350 return (GrGLFuncPtr) glUniform2i; | |
351 } else if (0 == strcmp("glUniform2fv", name)) { | |
352 return (GrGLFuncPtr) glUniform2fv; | |
353 } else if (0 == strcmp("glUniform2iv", name)) { | |
354 return (GrGLFuncPtr) glUniform2iv; | |
355 } else if (0 == strcmp("glUniform3f", name)) { | |
356 return (GrGLFuncPtr) glUniform3f; | |
357 } else if (0 == strcmp("glUniform3i", name)) { | |
358 return (GrGLFuncPtr) glUniform3i; | |
359 } else if (0 == strcmp("glUniform3fv", name)) { | |
360 return (GrGLFuncPtr) glUniform3fv; | |
361 } else if (0 == strcmp("glUniform3iv", name)) { | |
362 return (GrGLFuncPtr) glUniform3iv; | |
363 } else if (0 == strcmp("glUniform4f", name)) { | |
364 return (GrGLFuncPtr) glUniform4f; | |
365 } else if (0 == strcmp("glUniform4i", name)) { | |
366 return (GrGLFuncPtr) glUniform4i; | |
367 } else if (0 == strcmp("glUniform4fv", name)) { | |
368 return (GrGLFuncPtr) glUniform4fv; | |
369 } else if (0 == strcmp("glUniform4iv", name)) { | |
370 return (GrGLFuncPtr) glUniform4iv; | |
371 } else if (0 == strcmp("glUniformMatrix2fv", name)) { | |
372 return (GrGLFuncPtr) glUniformMatrix2fv; | |
373 } else if (0 == strcmp("glUniformMatrix3fv", name)) { | |
374 return (GrGLFuncPtr) glUniformMatrix3fv; | |
375 } else if (0 == strcmp("glUniformMatrix4fv", name)) { | |
376 return (GrGLFuncPtr) glUniformMatrix4fv; | |
377 } else if (0 == strcmp("glUseProgram", name)) { | |
378 return (GrGLFuncPtr) glUseProgram; | |
379 } else if (0 == strcmp("glVertexAttrib4fv", name)) { | |
380 return (GrGLFuncPtr) glVertexAttrib4fv; | |
381 } else if (0 == strcmp("glVertexAttribPointer", name)) { | |
382 return (GrGLFuncPtr) glVertexAttribPointer; | |
383 } else if (0 == strcmp("glViewport", name)) { | |
384 return (GrGLFuncPtr) glViewport; | |
385 } else if (0 == strcmp("glBindFramebuffer", name)) { | |
386 return (GrGLFuncPtr) glBindFramebuffer; | |
387 } else if (0 == strcmp("glBindRenderbuffer", name)) { | |
388 return (GrGLFuncPtr) glBindRenderbuffer; | |
389 } else if (0 == strcmp("glCheckFramebufferStatus", name)) { | |
390 return (GrGLFuncPtr) glCheckFramebufferStatus; | |
391 } else if (0 == strcmp("glDeleteFramebuffers", name)) { | |
392 return (GrGLFuncPtr) glDeleteFramebuffers; | |
393 } else if (0 == strcmp("glDeleteRenderbuffers", name)) { | |
394 return (GrGLFuncPtr) glDeleteRenderbuffers; | |
395 } else if (0 == strcmp("glFramebufferRenderbuffer", name)) { | |
396 return (GrGLFuncPtr) glFramebufferRenderbuffer; | |
397 } else if (0 == strcmp("glFramebufferTexture2D", name)) { | |
398 return (GrGLFuncPtr) glFramebufferTexture2D; | |
399 } else if (0 == strcmp("glGenFramebuffers", name)) { | |
400 return (GrGLFuncPtr) glGenFramebuffers; | |
401 } else if (0 == strcmp("glGenRenderbuffers", name)) { | |
402 return (GrGLFuncPtr) glGenRenderbuffers; | |
403 } else if (0 == strcmp("glGetFramebufferAttachmentParameteriv", name)) { | |
404 return (GrGLFuncPtr) glGetFramebufferAttachmentParameteriv; | |
405 } else if (0 == strcmp("glGetRenderbufferParameteriv", name)) { | |
406 return (GrGLFuncPtr) glGetRenderbufferParameteriv; | |
407 } else if (0 == strcmp("glRenderbufferStorage", name)) { | |
408 return (GrGLFuncPtr) glRenderbufferStorage; | |
409 } | 215 } |
410 return eglGetProcAddress(name); | 216 return eglGetProcAddress(name); |
411 } | 217 } |
412 | 218 |
413 const GrGLInterface* GrGLCreateNativeInterface() { | 219 const GrGLInterface* GrGLCreateNativeInterface() { |
414 return GrGLAssembleInterface(NULL, android_get_gl_proc); | 220 return GrGLAssembleInterface(NULL, android_get_gl_proc); |
415 } | 221 } |
OLD | NEW |