OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "ui/gl/gl_gl_api_implementation.h" | 5 #include "ui/gl/gl_gl_api_implementation.h" |
6 | 6 |
7 #include "gpu/command_buffer/service/gles2_cmd_decoder.h" | |
8 #include "ui/gl/gl_context.h" | |
9 | |
7 namespace gfx { | 10 namespace gfx { |
8 | 11 |
9 RealGLApi* g_real_gl; | 12 RealGLApi* g_real_gl; |
10 | 13 |
11 void InitializeGLBindingsGL() { | 14 void InitializeGLBindingsGL() { |
12 g_driver_gl.InitializeBindings(); | 15 g_driver_gl.InitializeBindings(); |
13 if (!g_real_gl) { | 16 if (!g_real_gl) { |
14 g_real_gl = new RealGLApi(); | 17 g_real_gl = new RealGLApi(); |
15 } | 18 } |
16 g_real_gl->Initialize(&g_driver_gl); | 19 g_real_gl->Initialize(&g_driver_gl); |
17 g_current_gl_context = g_real_gl; | 20 SetGLToRealGLApi(); |
21 } | |
22 | |
23 GLApi* GetCurrentGLApi() { | |
24 return g_current_gl_context; | |
25 } | |
26 | |
27 void SetGLApi(GLApi* api) { | |
28 g_current_gl_context = api; | |
29 } | |
30 | |
31 void SetGLToRealGLApi() { | |
32 SetGLApi(g_real_gl); | |
18 } | 33 } |
19 | 34 |
20 void InitializeGLExtensionBindingsGL(GLContext* context) { | 35 void InitializeGLExtensionBindingsGL(GLContext* context) { |
21 g_driver_gl.InitializeExtensionBindings(context); | 36 g_driver_gl.InitializeExtensionBindings(context); |
22 } | 37 } |
23 | 38 |
24 void InitializeDebugGLBindingsGL() { | 39 void InitializeDebugGLBindingsGL() { |
25 g_driver_gl.InitializeDebugBindings(); | 40 g_driver_gl.InitializeDebugBindings(); |
26 } | 41 } |
27 | 42 |
28 void ClearGLBindingsGL() { | 43 void ClearGLBindingsGL() { |
29 if (g_real_gl) { | 44 if (g_real_gl) { |
30 delete g_real_gl; | 45 delete g_real_gl; |
31 g_real_gl = NULL; | 46 g_real_gl = NULL; |
32 } | 47 } |
33 g_current_gl_context = NULL; | 48 g_current_gl_context = NULL; |
34 g_driver_gl.ClearBindings(); | 49 g_driver_gl.ClearBindings(); |
35 } | 50 } |
36 | 51 |
37 GLApi::GLApi() { | 52 GLApi::GLApi() { |
38 } | 53 } |
39 | 54 |
40 GLApi::~GLApi() { | 55 GLApi::~GLApi() { |
41 } | 56 } |
42 | 57 |
43 RealGLApi::RealGLApi() { | 58 RealGLApi::RealGLApi() { |
44 } | 59 } |
45 | 60 |
61 RealGLApi::~RealGLApi() { | |
62 } | |
63 | |
46 void RealGLApi::Initialize(DriverGL* driver) { | 64 void RealGLApi::Initialize(DriverGL* driver) { |
47 driver_ = driver; | 65 driver_ = driver; |
48 } | 66 } |
49 | 67 |
68 VirtualGLApi::VirtualGLApi() { | |
no sievers
2012/11/06 02:31:56
missing initialization:
current_surface_(NULL)
greggman
2012/11/06 02:56:37
Done.
| |
69 } | |
70 | |
71 VirtualGLApi::~VirtualGLApi() { | |
72 } | |
73 | |
74 void VirtualGLApi::Initialize(DriverGL* driver, GLContext* real_context) { | |
75 driver_ = driver; | |
76 real_context_ = real_context; | |
77 } | |
78 | |
79 bool VirtualGLApi::MakeCurrent(GLContext* virtual_context, GLSurface* surface) { | |
80 bool switched_contexts = g_current_gl_context != this; | |
81 if (switched_contexts || surface != current_surface_) { | |
82 // TODO: Emit warning on Android? | |
83 if (!real_context_->MakeCurrent(surface)) { | |
84 return false; | |
85 } | |
86 current_surface_ = surface; | |
87 } | |
88 if (switched_contexts || virtual_context != current_context_) { | |
89 current_context_ = virtual_context; | |
90 // Set all state that is different from the real state | |
91 // NOTE: !!! This is a temporary implementation that just restores all | |
92 // state to let us test that it works. | |
93 // TODO: ASAP, change this to something that only restores the state | |
94 // needed for individual GL calls. | |
95 GLApi* temp = GetCurrentGLApi(); | |
96 SetGLToRealGLApi(); | |
97 virtual_context->GetDecoder()->RestoreState(); | |
98 SetGLApi(temp); | |
99 } | |
100 SetGLApi(this); | |
101 return true; | |
102 } | |
103 | |
104 void VirtualGLApi::glActiveTextureFn(GLenum texture) { | |
105 driver_->fn.glActiveTextureFn(texture); | |
106 } | |
107 | |
108 void VirtualGLApi::glAttachShaderFn(GLuint program, GLuint shader) { | |
109 driver_->fn.glAttachShaderFn(program, shader); | |
110 } | |
111 | |
112 void VirtualGLApi::glBeginQueryFn(GLenum target, GLuint id) { | |
113 driver_->fn.glBeginQueryFn(target, id); | |
114 } | |
115 | |
116 void VirtualGLApi::glBeginQueryARBFn(GLenum target, GLuint id) { | |
117 driver_->fn.glBeginQueryARBFn(target, id); | |
118 } | |
119 | |
120 void VirtualGLApi::glBindAttribLocationFn( | |
121 GLuint program, GLuint index, const char* name) { | |
122 driver_->fn.glBindAttribLocationFn(program, index, name); | |
123 } | |
124 | |
125 void VirtualGLApi::glBindBufferFn(GLenum target, GLuint buffer) { | |
126 driver_->fn.glBindBufferFn(target, buffer); | |
127 } | |
128 | |
129 void VirtualGLApi::glBindFragDataLocationFn( | |
130 GLuint program, GLuint colorNumber, const char* name) { | |
131 driver_->fn.glBindFragDataLocationFn(program, colorNumber, name); | |
132 } | |
133 | |
134 void VirtualGLApi::glBindFragDataLocationIndexedFn( | |
135 GLuint program, GLuint colorNumber, GLuint index, const char* name) { | |
136 driver_->fn.glBindFragDataLocationIndexedFn( | |
137 program, colorNumber, index, name); | |
138 } | |
139 | |
140 void VirtualGLApi::glBindFramebufferEXTFn(GLenum target, GLuint framebuffer) { | |
141 driver_->fn.glBindFramebufferEXTFn(target, framebuffer); | |
142 } | |
143 | |
144 void VirtualGLApi::glBindRenderbufferEXTFn(GLenum target, GLuint renderbuffer) { | |
145 driver_->fn.glBindRenderbufferEXTFn(target, renderbuffer); | |
146 } | |
147 | |
148 void VirtualGLApi::glBindTextureFn(GLenum target, GLuint texture) { | |
149 driver_->fn.glBindTextureFn(target, texture); | |
150 } | |
151 | |
152 void VirtualGLApi::glBlendColorFn( | |
153 GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) { | |
154 driver_->fn.glBlendColorFn(red, green, blue, alpha); | |
155 } | |
156 | |
157 void VirtualGLApi::glBlendEquationFn( GLenum mode ) { | |
158 driver_->fn.glBlendEquationFn( mode ); | |
159 } | |
160 | |
161 void VirtualGLApi::glBlendEquationSeparateFn(GLenum modeRGB, GLenum modeAlpha) { | |
162 driver_->fn.glBlendEquationSeparateFn(modeRGB, modeAlpha); | |
163 } | |
164 | |
165 void VirtualGLApi::glBlendFuncFn(GLenum sfactor, GLenum dfactor) { | |
166 driver_->fn.glBlendFuncFn(sfactor, dfactor); | |
167 } | |
168 | |
169 void VirtualGLApi::glBlendFuncSeparateFn( | |
170 GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha) { | |
171 driver_->fn.glBlendFuncSeparateFn(srcRGB, dstRGB, srcAlpha, dstAlpha); | |
172 } | |
173 | |
174 void VirtualGLApi::glBlitFramebufferEXTFn( | |
175 GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, | |
176 GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, | |
177 GLbitfield mask, GLenum filter) { | |
178 driver_->fn.glBlitFramebufferEXTFn( | |
179 srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter); | |
180 } | |
181 | |
182 void VirtualGLApi::glBlitFramebufferANGLEFn( | |
183 GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, | |
184 GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, | |
185 GLbitfield mask, GLenum filter) { | |
186 driver_->fn.glBlitFramebufferANGLEFn( | |
187 srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter); | |
188 } | |
189 | |
190 void VirtualGLApi::glBufferDataFn( | |
191 GLenum target, GLsizei size, const void* data, GLenum usage) { | |
192 driver_->fn.glBufferDataFn(target, size, data, usage); | |
193 } | |
194 | |
195 void VirtualGLApi::glBufferSubDataFn( | |
196 GLenum target, GLint offset, GLsizei size, const void* data) { | |
197 driver_->fn.glBufferSubDataFn(target, offset, size, data); | |
198 } | |
199 | |
200 GLenum VirtualGLApi::glCheckFramebufferStatusEXTFn(GLenum target) { | |
201 return driver_->fn.glCheckFramebufferStatusEXTFn(target); | |
202 } | |
203 | |
204 void VirtualGLApi::glClearFn(GLbitfield mask) { | |
205 driver_->fn.glClearFn(mask); | |
206 } | |
207 | |
208 void VirtualGLApi::glClearColorFn( | |
209 GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) { | |
210 driver_->fn.glClearColorFn(red, green, blue, alpha); | |
211 } | |
212 | |
213 void VirtualGLApi::glClearDepthFn(GLclampd depth) { | |
214 driver_->fn.glClearDepthFn(depth); | |
215 } | |
216 | |
217 void VirtualGLApi::glClearDepthfFn(GLclampf depth) { | |
218 driver_->fn.glClearDepthfFn(depth); | |
219 } | |
220 | |
221 void VirtualGLApi::glClearStencilFn(GLint s) { | |
222 driver_->fn.glClearStencilFn(s); | |
223 } | |
224 | |
225 void VirtualGLApi::glColorMaskFn( | |
226 GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha) { | |
227 driver_->fn.glColorMaskFn(red, green, blue, alpha); | |
228 } | |
229 | |
230 void VirtualGLApi::glCompileShaderFn(GLuint shader) { | |
231 driver_->fn.glCompileShaderFn(shader); | |
232 } | |
233 | |
234 void VirtualGLApi::glCompressedTexImage2DFn( | |
235 GLenum target, GLint level, GLenum internalformat, | |
236 GLsizei width, GLsizei height, GLint border, | |
237 GLsizei imageSize, const void* data) { | |
238 driver_->fn.glCompressedTexImage2DFn( | |
239 target, level, internalformat, width, height, border, imageSize, data); | |
240 } | |
241 | |
242 void VirtualGLApi::glCompressedTexSubImage2DFn( | |
243 GLenum target, GLint level, GLint xoffset, GLint yoffset, | |
244 GLsizei width, GLsizei height, GLenum format, | |
245 GLsizei imageSize, const void* data) { | |
246 driver_->fn.glCompressedTexSubImage2DFn( | |
247 target, level, xoffset, yoffset, width, height, format, imageSize, data); | |
248 } | |
249 | |
250 void VirtualGLApi::glCopyTexImage2DFn( | |
251 GLenum target, GLint level, GLenum internalformat, | |
252 GLint x, GLint y, GLsizei width, GLsizei height, GLint border) { | |
253 driver_->fn.glCopyTexImage2DFn( | |
254 target, level, internalformat, x, y, width, height, border); | |
255 } | |
256 | |
257 void VirtualGLApi::glCopyTexSubImage2DFn( | |
258 GLenum target, GLint level, GLint xoffset, GLint yoffset, | |
259 GLint x, GLint y, GLsizei width, GLsizei height) { | |
260 driver_->fn.glCopyTexSubImage2DFn( | |
261 target, level, xoffset, yoffset, x, y, width, height); | |
262 } | |
263 | |
264 GLuint VirtualGLApi::glCreateProgramFn(void) { | |
265 return driver_->fn.glCreateProgramFn(); | |
266 } | |
267 | |
268 GLuint VirtualGLApi::glCreateShaderFn(GLenum type) { | |
269 return driver_->fn.glCreateShaderFn(type); | |
270 } | |
271 | |
272 void VirtualGLApi::glCullFaceFn(GLenum mode) { | |
273 driver_->fn.glCullFaceFn(mode); | |
274 } | |
275 | |
276 void VirtualGLApi::glDeleteBuffersARBFn(GLsizei n, const GLuint* buffers) { | |
277 driver_->fn.glDeleteBuffersARBFn(n, buffers); | |
278 } | |
279 | |
280 void VirtualGLApi::glDeleteFramebuffersEXTFn( | |
281 GLsizei n, const GLuint* framebuffers) { | |
282 driver_->fn.glDeleteFramebuffersEXTFn(n, framebuffers); | |
283 } | |
284 | |
285 void VirtualGLApi::glDeleteProgramFn(GLuint program) { | |
286 driver_->fn.glDeleteProgramFn(program); | |
287 } | |
288 | |
289 void VirtualGLApi::glDeleteQueriesFn(GLsizei n, const GLuint* ids) { | |
290 driver_->fn.glDeleteQueriesFn(n, ids); | |
291 } | |
292 | |
293 void VirtualGLApi::glDeleteQueriesARBFn(GLsizei n, const GLuint* ids) { | |
294 driver_->fn.glDeleteQueriesARBFn(n, ids); | |
295 } | |
296 | |
297 void VirtualGLApi::glDeleteRenderbuffersEXTFn( | |
298 GLsizei n, const GLuint* renderbuffers) { | |
299 driver_->fn.glDeleteRenderbuffersEXTFn(n, renderbuffers); | |
300 } | |
301 | |
302 void VirtualGLApi::glDeleteShaderFn(GLuint shader) { | |
303 driver_->fn.glDeleteShaderFn(shader); | |
304 } | |
305 | |
306 void VirtualGLApi::glDeleteTexturesFn(GLsizei n, const GLuint* textures) { | |
307 driver_->fn.glDeleteTexturesFn(n, textures); | |
308 } | |
309 | |
310 void VirtualGLApi::glDepthFuncFn(GLenum func) { | |
311 driver_->fn.glDepthFuncFn(func); | |
312 } | |
313 | |
314 void VirtualGLApi::glDepthMaskFn(GLboolean flag) { | |
315 driver_->fn.glDepthMaskFn(flag); | |
316 } | |
317 | |
318 void VirtualGLApi::glDepthRangeFn(GLclampd zNear, GLclampd zFar) { | |
319 driver_->fn.glDepthRangeFn(zNear, zFar); | |
320 } | |
321 | |
322 void VirtualGLApi::glDepthRangefFn(GLclampf zNear, GLclampf zFar) { | |
323 driver_->fn.glDepthRangefFn(zNear, zFar); | |
324 } | |
325 | |
326 void VirtualGLApi::glDetachShaderFn(GLuint program, GLuint shader) { | |
327 driver_->fn.glDetachShaderFn(program, shader); | |
328 } | |
329 | |
330 void VirtualGLApi::glDisableFn(GLenum cap) { | |
331 driver_->fn.glDisableFn(cap); | |
332 } | |
333 | |
334 void VirtualGLApi::glDisableVertexAttribArrayFn(GLuint index) { | |
335 driver_->fn.glDisableVertexAttribArrayFn(index); | |
336 } | |
337 | |
338 void VirtualGLApi::glDrawArraysFn(GLenum mode, GLint first, GLsizei count) { | |
339 driver_->fn.glDrawArraysFn(mode, first, count); | |
340 } | |
341 | |
342 void VirtualGLApi::glDrawBufferFn(GLenum mode) { | |
343 driver_->fn.glDrawBufferFn(mode); | |
344 } | |
345 | |
346 void VirtualGLApi::glDrawBuffersARBFn(GLsizei n, const GLenum* bufs) { | |
347 driver_->fn.glDrawBuffersARBFn(n, bufs); | |
348 } | |
349 | |
350 void VirtualGLApi::glDrawElementsFn( | |
351 GLenum mode, GLsizei count, GLenum type, const void* indices) { | |
352 driver_->fn.glDrawElementsFn(mode, count, type, indices); | |
353 } | |
354 | |
355 void VirtualGLApi::glEGLImageTargetTexture2DOESFn( | |
356 GLenum target, GLeglImageOES image) { | |
357 driver_->fn.glEGLImageTargetTexture2DOESFn(target, image); | |
358 } | |
359 | |
360 void VirtualGLApi::glEGLImageTargetRenderbufferStorageOESFn( | |
361 GLenum target, GLeglImageOES image) { | |
362 driver_->fn.glEGLImageTargetRenderbufferStorageOESFn(target, image); | |
363 } | |
364 | |
365 void VirtualGLApi::glEnableFn(GLenum cap) { | |
366 driver_->fn.glEnableFn(cap); | |
367 } | |
368 | |
369 void VirtualGLApi::glEnableVertexAttribArrayFn(GLuint index) { | |
370 driver_->fn.glEnableVertexAttribArrayFn(index); | |
371 } | |
372 | |
373 void VirtualGLApi::glEndQueryFn(GLenum target) { | |
374 driver_->fn.glEndQueryFn(target); | |
375 } | |
376 | |
377 void VirtualGLApi::glEndQueryARBFn(GLenum target) { | |
378 driver_->fn.glEndQueryARBFn(target); | |
379 } | |
380 | |
381 void VirtualGLApi::glFinishFn(void) { | |
382 driver_->fn.glFinishFn(); | |
383 } | |
384 | |
385 void VirtualGLApi::glFlushFn(void) { | |
386 driver_->fn.glFlushFn(); | |
387 } | |
388 | |
389 void VirtualGLApi::glFramebufferRenderbufferEXTFn( | |
390 GLenum target, GLenum attachment, | |
391 GLenum renderbuffertarget, GLuint renderbuffer) { | |
392 driver_->fn.glFramebufferRenderbufferEXTFn( | |
393 target, attachment, renderbuffertarget, renderbuffer); | |
394 } | |
395 | |
396 void VirtualGLApi::glFramebufferTexture2DEXTFn( | |
397 GLenum target, GLenum attachment, | |
398 GLenum textarget, GLuint texture, GLint level) { | |
399 driver_->fn.glFramebufferTexture2DEXTFn( | |
400 target, attachment, textarget, texture, level); | |
401 } | |
402 | |
403 void VirtualGLApi::glFrontFaceFn(GLenum mode) { | |
404 driver_->fn.glFrontFaceFn(mode); | |
405 } | |
406 | |
407 void VirtualGLApi::glGenBuffersARBFn(GLsizei n, GLuint* buffers) { | |
408 driver_->fn.glGenBuffersARBFn(n, buffers); | |
409 } | |
410 | |
411 void VirtualGLApi::glGenQueriesFn(GLsizei n, GLuint* ids) { | |
412 driver_->fn.glGenQueriesFn(n, ids); | |
413 } | |
414 | |
415 void VirtualGLApi::glGenQueriesARBFn(GLsizei n, GLuint* ids) { | |
416 driver_->fn.glGenQueriesARBFn(n, ids); | |
417 } | |
418 | |
419 void VirtualGLApi::glGenerateMipmapEXTFn(GLenum target) { | |
420 driver_->fn.glGenerateMipmapEXTFn(target); | |
421 } | |
422 | |
423 void VirtualGLApi::glGenFramebuffersEXTFn(GLsizei n, GLuint* framebuffers) { | |
424 driver_->fn.glGenFramebuffersEXTFn(n, framebuffers); | |
425 } | |
426 | |
427 void VirtualGLApi::glGenRenderbuffersEXTFn(GLsizei n, GLuint* renderbuffers) { | |
428 driver_->fn.glGenRenderbuffersEXTFn(n, renderbuffers); | |
429 } | |
430 | |
431 void VirtualGLApi::glGenTexturesFn(GLsizei n, GLuint* textures) { | |
432 driver_->fn.glGenTexturesFn(n, textures); | |
433 } | |
434 | |
435 void VirtualGLApi::glGetActiveAttribFn( | |
436 GLuint program, GLuint index, GLsizei bufsize, | |
437 GLsizei* length, GLint* size, GLenum* type, char* name) { | |
438 driver_->fn.glGetActiveAttribFn( | |
439 program, index, bufsize, length, size, type, name); | |
440 } | |
441 | |
442 void VirtualGLApi::glGetActiveUniformFn( | |
443 GLuint program, GLuint index, GLsizei bufsize, | |
444 GLsizei* length, GLint* size, GLenum* type, char* name) { | |
445 driver_->fn.glGetActiveUniformFn( | |
446 program, index, bufsize, length, size, type, name); | |
447 } | |
448 | |
449 void VirtualGLApi::glGetAttachedShadersFn( | |
450 GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders) { | |
451 driver_->fn.glGetAttachedShadersFn(program, maxcount, count, shaders); | |
452 } | |
453 | |
454 GLint VirtualGLApi::glGetAttribLocationFn(GLuint program, const char* name) { | |
455 return driver_->fn.glGetAttribLocationFn(program, name); | |
456 } | |
457 | |
458 void VirtualGLApi::glGetBooleanvFn(GLenum pname, GLboolean* params) { | |
459 driver_->fn.glGetBooleanvFn(pname, params); | |
460 } | |
461 | |
462 void VirtualGLApi::glGetBufferParameterivFn( | |
463 GLenum target, GLenum pname, GLint* params) { | |
464 driver_->fn.glGetBufferParameterivFn(target, pname, params); | |
465 } | |
466 | |
467 GLenum VirtualGLApi::glGetErrorFn(void) { | |
468 return driver_->fn.glGetErrorFn(); | |
469 } | |
470 | |
471 void VirtualGLApi::glGetFloatvFn(GLenum pname, GLfloat* params) { | |
472 driver_->fn.glGetFloatvFn(pname, params); | |
473 } | |
474 | |
475 void VirtualGLApi::glGetFramebufferAttachmentParameterivEXTFn( | |
476 GLenum target, GLenum attachment, GLenum pname, GLint* params) { | |
477 driver_->fn.glGetFramebufferAttachmentParameterivEXTFn( | |
478 target, attachment, pname, params); | |
479 } | |
480 | |
481 GLenum VirtualGLApi::glGetGraphicsResetStatusARBFn(void) { | |
482 return driver_->fn.glGetGraphicsResetStatusARBFn(); | |
483 } | |
484 | |
485 void VirtualGLApi::glGetIntegervFn(GLenum pname, GLint* params) { | |
486 driver_->fn.glGetIntegervFn(pname, params); | |
487 } | |
488 | |
489 void VirtualGLApi::glGetProgramBinaryFn( | |
490 GLuint program, GLsizei bufSize, | |
491 GLsizei* length, GLenum* binaryFormat, GLvoid* binary) { | |
492 driver_->fn.glGetProgramBinaryFn( | |
493 program, bufSize, length, binaryFormat, binary); | |
494 } | |
495 | |
496 void VirtualGLApi::glGetProgramivFn( | |
497 GLuint program, GLenum pname, GLint* params) { | |
498 driver_->fn.glGetProgramivFn(program, pname, params); | |
499 } | |
500 | |
501 void VirtualGLApi::glGetProgramInfoLogFn( | |
502 GLuint program, GLsizei bufsize, GLsizei* length, char* infolog) { | |
503 driver_->fn.glGetProgramInfoLogFn(program, bufsize, length, infolog); | |
504 } | |
505 | |
506 void VirtualGLApi::glGetQueryivFn(GLenum target, GLenum pname, GLint* params) { | |
507 driver_->fn.glGetQueryivFn(target, pname, params); | |
508 } | |
509 | |
510 void VirtualGLApi::glGetQueryivARBFn( | |
511 GLenum target, GLenum pname, GLint* params) { | |
512 driver_->fn.glGetQueryivARBFn(target, pname, params); | |
513 } | |
514 | |
515 void VirtualGLApi::glGetQueryObjecti64vFn( | |
516 GLuint id, GLenum pname, GLint64* params) { | |
517 driver_->fn.glGetQueryObjecti64vFn(id, pname, params); | |
518 } | |
519 | |
520 void VirtualGLApi::glGetQueryObjectivFn( | |
521 GLuint id, GLenum pname, GLint* params) { | |
522 driver_->fn.glGetQueryObjectivFn(id, pname, params); | |
523 } | |
524 | |
525 void VirtualGLApi::glGetQueryObjectui64vFn( | |
526 GLuint id, GLenum pname, GLuint64* params) { | |
527 driver_->fn.glGetQueryObjectui64vFn(id, pname, params); | |
528 } | |
529 | |
530 void VirtualGLApi::glGetQueryObjectuivFn( | |
531 GLuint id, GLenum pname, GLuint* params) { | |
532 driver_->fn.glGetQueryObjectuivFn(id, pname, params); | |
533 } | |
534 | |
535 void VirtualGLApi::glGetQueryObjectuivARBFn( | |
536 GLuint id, GLenum pname, GLuint* params) { | |
537 driver_->fn.glGetQueryObjectuivARBFn(id, pname, params); | |
538 } | |
539 | |
540 void VirtualGLApi::glGetRenderbufferParameterivEXTFn( | |
541 GLenum target, GLenum pname, GLint* params) { | |
542 driver_->fn.glGetRenderbufferParameterivEXTFn(target, pname, params); | |
543 } | |
544 | |
545 void VirtualGLApi::glGetShaderivFn(GLuint shader, GLenum pname, GLint* params) { | |
546 driver_->fn.glGetShaderivFn(shader, pname, params); | |
547 } | |
548 | |
549 void VirtualGLApi::glGetShaderInfoLogFn( | |
550 GLuint shader, GLsizei bufsize, GLsizei* length, char* infolog) { | |
551 driver_->fn.glGetShaderInfoLogFn(shader, bufsize, length, infolog); | |
552 } | |
553 | |
554 void VirtualGLApi::glGetShaderPrecisionFormatFn( | |
555 GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision) { | |
556 driver_->fn.glGetShaderPrecisionFormatFn( | |
557 shadertype, precisiontype, range, precision); | |
558 } | |
559 | |
560 void VirtualGLApi::glGetShaderSourceFn( | |
561 GLuint shader, GLsizei bufsize, GLsizei* length, char* source) { | |
562 driver_->fn.glGetShaderSourceFn(shader, bufsize, length, source); | |
563 } | |
564 | |
565 const GLubyte* VirtualGLApi::glGetStringFn(GLenum name) { | |
566 switch (name) { | |
567 case GL_EXTENSIONS: | |
568 // For now return no extensions. | |
569 // | |
570 // Specificially we can't support GL_EXT_occlusion_query_boolean which is | |
571 // based on GL_ARB_occlusion_query without a lot of work virutalizing | |
572 // queries. | |
573 // | |
574 // Also we don't support multisample yet, nor vertex array objects, | |
575 // etc.. | |
576 // | |
577 // We can turn on other extensions on an as needed basis. For now, if you | |
578 // need the extensions, don't make a virtual context. | |
579 return reinterpret_cast<const GLubyte*>(""); | |
580 default: | |
581 return driver_->fn.glGetStringFn(name); | |
582 } | |
583 } | |
584 | |
585 void VirtualGLApi::glGetTexLevelParameterfvFn( | |
586 GLenum target, GLint level, GLenum pname, GLfloat* params) { | |
587 driver_->fn.glGetTexLevelParameterfvFn(target, level, pname, params); | |
588 } | |
589 | |
590 void VirtualGLApi::glGetTexLevelParameterivFn( | |
591 GLenum target, GLint level, GLenum pname, GLint* params) { | |
592 driver_->fn.glGetTexLevelParameterivFn(target, level, pname, params); | |
593 } | |
594 | |
595 void VirtualGLApi::glGetTexParameterfvFn( | |
596 GLenum target, GLenum pname, GLfloat* params) { | |
597 driver_->fn.glGetTexParameterfvFn(target, pname, params); | |
598 } | |
599 | |
600 void VirtualGLApi::glGetTexParameterivFn( | |
601 GLenum target, GLenum pname, GLint* params) { | |
602 driver_->fn.glGetTexParameterivFn(target, pname, params); | |
603 } | |
604 | |
605 void VirtualGLApi::glGetTranslatedShaderSourceANGLEFn( | |
606 GLuint shader, GLsizei bufsize, GLsizei* length, char* source) { | |
607 driver_->fn.glGetTranslatedShaderSourceANGLEFn( | |
608 shader, bufsize, length, source); | |
609 } | |
610 | |
611 void VirtualGLApi::glGetUniformfvFn( | |
612 GLuint program, GLint location, GLfloat* params) { | |
613 driver_->fn.glGetUniformfvFn(program, location, params); | |
614 } | |
615 | |
616 void VirtualGLApi::glGetUniformivFn( | |
617 GLuint program, GLint location, GLint* params) { | |
618 driver_->fn.glGetUniformivFn(program, location, params); | |
619 } | |
620 | |
621 GLint VirtualGLApi::glGetUniformLocationFn(GLuint program, const char* name) { | |
622 return driver_->fn.glGetUniformLocationFn(program, name); | |
623 } | |
624 | |
625 void VirtualGLApi::glGetVertexAttribfvFn( | |
626 GLuint index, GLenum pname, GLfloat* params) { | |
627 driver_->fn.glGetVertexAttribfvFn(index, pname, params); | |
628 } | |
629 | |
630 void VirtualGLApi::glGetVertexAttribivFn( | |
631 GLuint index, GLenum pname, GLint* params) { | |
632 driver_->fn.glGetVertexAttribivFn(index, pname, params); | |
633 } | |
634 | |
635 void VirtualGLApi::glGetVertexAttribPointervFn( | |
636 GLuint index, GLenum pname, void** pointer) { | |
637 driver_->fn.glGetVertexAttribPointervFn(index, pname, pointer); | |
638 } | |
639 | |
640 void VirtualGLApi::glHintFn(GLenum target, GLenum mode) { | |
641 driver_->fn.glHintFn(target, mode); | |
642 } | |
643 | |
644 GLboolean VirtualGLApi::glIsBufferFn(GLuint buffer) { | |
645 return driver_->fn.glIsBufferFn(buffer); | |
646 } | |
647 | |
648 GLboolean VirtualGLApi::glIsEnabledFn(GLenum cap) { | |
649 return driver_->fn.glIsEnabledFn(cap); | |
650 } | |
651 | |
652 GLboolean VirtualGLApi::glIsFramebufferEXTFn(GLuint framebuffer) { | |
653 return driver_->fn.glIsFramebufferEXTFn(framebuffer); | |
654 } | |
655 | |
656 GLboolean VirtualGLApi::glIsProgramFn(GLuint program) { | |
657 return driver_->fn.glIsProgramFn(program); | |
658 } | |
659 | |
660 GLboolean VirtualGLApi::glIsQueryARBFn(GLuint query) { | |
661 return driver_->fn.glIsQueryARBFn(query); | |
662 } | |
663 | |
664 GLboolean VirtualGLApi::glIsRenderbufferEXTFn(GLuint renderbuffer) { | |
665 return driver_->fn.glIsRenderbufferEXTFn(renderbuffer); | |
666 } | |
667 | |
668 GLboolean VirtualGLApi::glIsShaderFn(GLuint shader) { | |
669 return driver_->fn.glIsShaderFn(shader); | |
670 } | |
671 | |
672 GLboolean VirtualGLApi::glIsTextureFn(GLuint texture) { | |
673 return driver_->fn.glIsTextureFn(texture); | |
674 } | |
675 | |
676 void VirtualGLApi::glLineWidthFn(GLfloat width) { | |
677 driver_->fn.glLineWidthFn(width); | |
678 } | |
679 | |
680 void VirtualGLApi::glLinkProgramFn(GLuint program) { | |
681 driver_->fn.glLinkProgramFn(program); | |
682 } | |
683 | |
684 void* VirtualGLApi::glMapBufferFn(GLenum target, GLenum access) { | |
685 return driver_->fn.glMapBufferFn(target, access); | |
686 } | |
687 | |
688 void VirtualGLApi::glPixelStoreiFn(GLenum pname, GLint param) { | |
689 driver_->fn.glPixelStoreiFn(pname, param); | |
690 } | |
691 | |
692 void VirtualGLApi::glPointParameteriFn(GLenum pname, GLint param) { | |
693 driver_->fn.glPointParameteriFn(pname, param); | |
694 } | |
695 | |
696 void VirtualGLApi::glPolygonOffsetFn(GLfloat factor, GLfloat units) { | |
697 driver_->fn.glPolygonOffsetFn(factor, units); | |
698 } | |
699 | |
700 void VirtualGLApi::glProgramBinaryFn( | |
701 GLuint program, GLenum binaryFormat, const GLvoid* binary, GLsizei length) { | |
702 driver_->fn.glProgramBinaryFn(program, binaryFormat, binary, length); | |
703 } | |
704 | |
705 void VirtualGLApi::glProgramParameteriFn( | |
706 GLuint program, GLenum pname, GLint value) { | |
707 driver_->fn.glProgramParameteriFn(program, pname, value); | |
708 } | |
709 | |
710 void VirtualGLApi::glQueryCounterFn(GLuint id, GLenum target) { | |
711 driver_->fn.glQueryCounterFn(id, target); | |
712 } | |
713 | |
714 void VirtualGLApi::glReadBufferFn(GLenum src) { | |
715 driver_->fn.glReadBufferFn(src); | |
716 } | |
717 | |
718 void VirtualGLApi::glReadPixelsFn( | |
719 GLint x, GLint y, GLsizei width, GLsizei height, | |
720 GLenum format, GLenum type, void* pixels) { | |
721 driver_->fn.glReadPixelsFn(x, y, width, height, format, type, pixels); | |
722 } | |
723 | |
724 void VirtualGLApi::glReleaseShaderCompilerFn(void) { | |
725 driver_->fn.glReleaseShaderCompilerFn(); | |
726 } | |
727 | |
728 void VirtualGLApi::glRenderbufferStorageMultisampleEXTFn( | |
729 GLenum target, GLsizei samples, GLenum internalformat, | |
730 GLsizei width, GLsizei height) { | |
731 driver_->fn.glRenderbufferStorageMultisampleEXTFn( | |
732 target, samples, internalformat, width, height); | |
733 } | |
734 | |
735 void VirtualGLApi::glRenderbufferStorageMultisampleANGLEFn( | |
736 GLenum target, GLsizei samples, GLenum internalformat, | |
737 GLsizei width, GLsizei height) { | |
738 driver_->fn.glRenderbufferStorageMultisampleANGLEFn( | |
739 target, samples, internalformat, width, height); | |
740 } | |
741 | |
742 void VirtualGLApi::glRenderbufferStorageEXTFn( | |
743 GLenum target, GLenum internalformat, GLsizei width, GLsizei height) { | |
744 driver_->fn.glRenderbufferStorageEXTFn(target, internalformat, width, height); | |
745 } | |
746 | |
747 void VirtualGLApi::glSampleCoverageFn(GLclampf value, GLboolean invert) { | |
748 driver_->fn.glSampleCoverageFn(value, invert); | |
749 } | |
750 | |
751 void VirtualGLApi::glScissorFn( | |
752 GLint x, GLint y, GLsizei width, GLsizei height) { | |
753 driver_->fn.glScissorFn(x, y, width, height); | |
754 } | |
755 | |
756 void VirtualGLApi::glShaderBinaryFn( | |
757 GLsizei n, const GLuint* shaders, GLenum binaryformat, | |
758 const void* binary, GLsizei length) { | |
759 driver_->fn.glShaderBinaryFn(n, shaders, binaryformat, binary, length); | |
760 } | |
761 | |
762 void VirtualGLApi::glShaderSourceFn( | |
763 GLuint shader, GLsizei count, const char** str, const GLint* length) { | |
764 driver_->fn.glShaderSourceFn(shader, count, str, length); | |
765 } | |
766 | |
767 void VirtualGLApi::glStencilFuncFn(GLenum func, GLint ref, GLuint mask) { | |
768 driver_->fn.glStencilFuncFn(func, ref, mask); | |
769 } | |
770 | |
771 void VirtualGLApi::glStencilFuncSeparateFn( | |
772 GLenum face, GLenum func, GLint ref, GLuint mask) { | |
773 driver_->fn.glStencilFuncSeparateFn(face, func, ref, mask); | |
774 } | |
775 | |
776 void VirtualGLApi::glStencilMaskFn(GLuint mask) { | |
777 driver_->fn.glStencilMaskFn(mask); | |
778 } | |
779 | |
780 void VirtualGLApi::glStencilMaskSeparateFn(GLenum face, GLuint mask) { | |
781 driver_->fn.glStencilMaskSeparateFn(face, mask); | |
782 } | |
783 | |
784 void VirtualGLApi::glStencilOpFn(GLenum fail, GLenum zfail, GLenum zpass) { | |
785 driver_->fn.glStencilOpFn(fail, zfail, zpass); | |
786 } | |
787 | |
788 void VirtualGLApi::glStencilOpSeparateFn( | |
789 GLenum face, GLenum fail, GLenum zfail, GLenum zpass) { | |
790 driver_->fn.glStencilOpSeparateFn(face, fail, zfail, zpass); | |
791 } | |
792 | |
793 void VirtualGLApi::glTexImage2DFn( | |
794 GLenum target, GLint level, GLint internalformat, | |
795 GLsizei width, GLsizei height, | |
796 GLint border, GLenum format, GLenum type, const void* pixels) { | |
797 driver_->fn.glTexImage2DFn( | |
798 target, level, internalformat, width, height, | |
799 border, format, type, pixels); | |
800 } | |
801 | |
802 void VirtualGLApi::glTexParameterfFn( | |
803 GLenum target, GLenum pname, GLfloat param) { | |
804 driver_->fn.glTexParameterfFn(target, pname, param); | |
805 } | |
806 | |
807 void VirtualGLApi::glTexParameterfvFn( | |
808 GLenum target, GLenum pname, const GLfloat* params) { | |
809 driver_->fn.glTexParameterfvFn(target, pname, params); | |
810 } | |
811 | |
812 void VirtualGLApi::glTexParameteriFn(GLenum target, GLenum pname, GLint param) { | |
813 driver_->fn.glTexParameteriFn(target, pname, param); | |
814 } | |
815 | |
816 void VirtualGLApi::glTexParameterivFn( | |
817 GLenum target, GLenum pname, const GLint* params) { | |
818 driver_->fn.glTexParameterivFn(target, pname, params); | |
819 } | |
820 | |
821 void VirtualGLApi::glTexStorage2DEXTFn( | |
822 GLenum target, GLsizei levels, GLenum internalformat, | |
823 GLsizei width, GLsizei height) { | |
824 driver_->fn.glTexStorage2DEXTFn( | |
825 target, levels, internalformat, width, height); | |
826 } | |
827 | |
828 void VirtualGLApi::glTexSubImage2DFn( | |
829 GLenum target, GLint level, GLint xoffset, GLint yoffset, | |
830 GLsizei width, GLsizei height, GLenum format, GLenum type, | |
831 const void* pixels) { | |
832 driver_->fn.glTexSubImage2DFn( | |
833 target, level, xoffset, yoffset, width, height, format, type, pixels); | |
834 } | |
835 | |
836 void VirtualGLApi::glUniform1fFn(GLint location, GLfloat x) { | |
837 driver_->fn.glUniform1fFn(location, x); | |
838 } | |
839 | |
840 void VirtualGLApi::glUniform1fvFn( | |
841 GLint location, GLsizei count, const GLfloat* v) { | |
842 driver_->fn.glUniform1fvFn(location, count, v); | |
843 } | |
844 | |
845 void VirtualGLApi::glUniform1iFn(GLint location, GLint x) { | |
846 driver_->fn.glUniform1iFn(location, x); | |
847 } | |
848 | |
849 void VirtualGLApi::glUniform1ivFn( | |
850 GLint location, GLsizei count, const GLint* v) { | |
851 driver_->fn.glUniform1ivFn(location, count, v); | |
852 } | |
853 | |
854 void VirtualGLApi::glUniform2fFn(GLint location, GLfloat x, GLfloat y) { | |
855 driver_->fn.glUniform2fFn(location, x, y); | |
856 } | |
857 | |
858 void VirtualGLApi::glUniform2fvFn( | |
859 GLint location, GLsizei count, const GLfloat* v) { | |
860 driver_->fn.glUniform2fvFn(location, count, v); | |
861 } | |
862 | |
863 void VirtualGLApi::glUniform2iFn(GLint location, GLint x, GLint y) { | |
864 driver_->fn.glUniform2iFn(location, x, y); | |
865 } | |
866 | |
867 void VirtualGLApi::glUniform2ivFn( | |
868 GLint location, GLsizei count, const GLint* v) { | |
869 driver_->fn.glUniform2ivFn(location, count, v); | |
870 } | |
871 | |
872 void VirtualGLApi::glUniform3fFn( | |
873 GLint location, GLfloat x, GLfloat y, GLfloat z) { | |
874 driver_->fn.glUniform3fFn(location, x, y, z); | |
875 } | |
876 | |
877 void VirtualGLApi::glUniform3fvFn( | |
878 GLint location, GLsizei count, const GLfloat* v) { | |
879 driver_->fn.glUniform3fvFn(location, count, v); | |
880 } | |
881 | |
882 void VirtualGLApi::glUniform3iFn(GLint location, GLint x, GLint y, GLint z) { | |
883 driver_->fn.glUniform3iFn(location, x, y, z); | |
884 } | |
885 | |
886 void VirtualGLApi::glUniform3ivFn( | |
887 GLint location, GLsizei count, const GLint* v) { | |
888 driver_->fn.glUniform3ivFn(location, count, v); | |
889 } | |
890 | |
891 void VirtualGLApi::glUniform4fFn( | |
892 GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w) { | |
893 driver_->fn.glUniform4fFn(location, x, y, z, w); | |
894 } | |
895 | |
896 void VirtualGLApi::glUniform4fvFn( | |
897 GLint location, GLsizei count, const GLfloat* v) { | |
898 driver_->fn.glUniform4fvFn(location, count, v); | |
899 } | |
900 | |
901 void VirtualGLApi::glUniform4iFn( | |
902 GLint location, GLint x, GLint y, GLint z, GLint w) { | |
903 driver_->fn.glUniform4iFn(location, x, y, z, w); | |
904 } | |
905 | |
906 void VirtualGLApi::glUniform4ivFn( | |
907 GLint location, GLsizei count, const GLint* v) { | |
908 driver_->fn.glUniform4ivFn(location, count, v); | |
909 } | |
910 | |
911 void VirtualGLApi::glUniformMatrix2fvFn( | |
912 GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) { | |
913 driver_->fn.glUniformMatrix2fvFn(location, count, transpose, value); | |
914 } | |
915 | |
916 void VirtualGLApi::glUniformMatrix3fvFn( | |
917 GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) { | |
918 driver_->fn.glUniformMatrix3fvFn(location, count, transpose, value); | |
919 } | |
920 | |
921 void VirtualGLApi::glUniformMatrix4fvFn( | |
922 GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) { | |
923 driver_->fn.glUniformMatrix4fvFn(location, count, transpose, value); | |
924 } | |
925 | |
926 GLboolean VirtualGLApi::glUnmapBufferFn(GLenum target) { | |
927 return driver_->fn.glUnmapBufferFn(target); | |
928 } | |
929 | |
930 void VirtualGLApi::glUseProgramFn(GLuint program) { | |
931 driver_->fn.glUseProgramFn(program); | |
932 } | |
933 | |
934 void VirtualGLApi::glValidateProgramFn(GLuint program) { | |
935 driver_->fn.glValidateProgramFn(program); | |
936 } | |
937 | |
938 void VirtualGLApi::glVertexAttrib1fFn(GLuint indx, GLfloat x) { | |
939 driver_->fn.glVertexAttrib1fFn(indx, x); | |
940 } | |
941 | |
942 void VirtualGLApi::glVertexAttrib1fvFn(GLuint indx, const GLfloat* values) { | |
943 driver_->fn.glVertexAttrib1fvFn(indx, values); | |
944 } | |
945 | |
946 void VirtualGLApi::glVertexAttrib2fFn(GLuint indx, GLfloat x, GLfloat y) { | |
947 driver_->fn.glVertexAttrib2fFn(indx, x, y); | |
948 } | |
949 | |
950 void VirtualGLApi::glVertexAttrib2fvFn(GLuint indx, const GLfloat* values) { | |
951 driver_->fn.glVertexAttrib2fvFn(indx, values); | |
952 } | |
953 | |
954 void VirtualGLApi::glVertexAttrib3fFn( | |
955 GLuint indx, GLfloat x, GLfloat y, GLfloat z) { | |
956 driver_->fn.glVertexAttrib3fFn(indx, x, y, z); | |
957 } | |
958 | |
959 void VirtualGLApi::glVertexAttrib3fvFn(GLuint indx, const GLfloat* values) { | |
960 driver_->fn.glVertexAttrib3fvFn(indx, values); | |
961 } | |
962 | |
963 void VirtualGLApi::glVertexAttrib4fFn( | |
964 GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w) { | |
965 driver_->fn.glVertexAttrib4fFn(indx, x, y, z, w); | |
966 } | |
967 | |
968 void VirtualGLApi::glVertexAttrib4fvFn(GLuint indx, const GLfloat* values) { | |
969 driver_->fn.glVertexAttrib4fvFn(indx, values); | |
970 } | |
971 | |
972 void VirtualGLApi::glVertexAttribPointerFn( | |
973 GLuint indx, GLint size, GLenum type, GLboolean normalized, | |
974 GLsizei stride, const void* ptr) { | |
975 driver_->fn.glVertexAttribPointerFn( | |
976 indx, size, type, normalized, stride, ptr); | |
977 } | |
978 | |
979 void VirtualGLApi::glViewportFn( | |
980 GLint x, GLint y, GLsizei width, GLsizei height) { | |
981 driver_->fn.glViewportFn(x, y, width, height); | |
982 } | |
983 | |
984 void VirtualGLApi::glGenFencesNVFn(GLsizei n, GLuint* fences) { | |
985 driver_->fn.glGenFencesNVFn(n, fences); | |
986 } | |
987 | |
988 void VirtualGLApi::glDeleteFencesNVFn(GLsizei n, const GLuint* fences) { | |
989 driver_->fn.glDeleteFencesNVFn(n, fences); | |
990 } | |
991 | |
992 void VirtualGLApi::glSetFenceNVFn(GLuint fence, GLenum condition) { | |
993 driver_->fn.glSetFenceNVFn(fence, condition); | |
994 } | |
995 | |
996 GLboolean VirtualGLApi::glTestFenceNVFn(GLuint fence) { | |
997 return driver_->fn.glTestFenceNVFn(fence); | |
998 } | |
999 | |
1000 void VirtualGLApi::glFinishFenceNVFn(GLuint fence) { | |
1001 driver_->fn.glFinishFenceNVFn(fence); | |
1002 } | |
1003 | |
1004 GLboolean VirtualGLApi::glIsFenceNVFn(GLuint fence) { | |
1005 return driver_->fn.glIsFenceNVFn(fence); | |
1006 } | |
1007 | |
1008 void VirtualGLApi::glGetFenceivNVFn(GLuint fence, GLenum pname, GLint* params) { | |
1009 driver_->fn.glGetFenceivNVFn(fence, pname, params); | |
1010 } | |
1011 | |
1012 GLsync VirtualGLApi::glFenceSyncFn(GLenum condition, GLbitfield flags) { | |
1013 return driver_->fn.glFenceSyncFn(condition, flags); | |
1014 } | |
1015 | |
1016 void VirtualGLApi::glDeleteSyncFn(GLsync sync) { | |
1017 driver_->fn.glDeleteSyncFn(sync); | |
1018 } | |
1019 | |
1020 void VirtualGLApi::glGetSyncivFn( | |
1021 GLsync sync, GLenum pname, GLsizei bufSize, GLsizei* length,GLint* values) { | |
1022 driver_->fn.glGetSyncivFn(sync, pname, bufSize, length,values); | |
1023 } | |
1024 | |
1025 void VirtualGLApi::glDrawArraysInstancedANGLEFn( | |
1026 GLenum mode, GLint first, GLsizei count, GLsizei primcount) { | |
1027 driver_->fn.glDrawArraysInstancedANGLEFn(mode, first, count, primcount); | |
1028 } | |
1029 | |
1030 void VirtualGLApi::glDrawElementsInstancedANGLEFn( | |
1031 GLenum mode, GLsizei count, GLenum type, const void* indices, | |
1032 GLsizei primcount) { | |
1033 driver_->fn.glDrawElementsInstancedANGLEFn( | |
1034 mode, count, type, indices, primcount); | |
1035 } | |
1036 | |
1037 void VirtualGLApi::glVertexAttribDivisorANGLEFn(GLuint index, GLuint divisor) { | |
1038 driver_->fn.glVertexAttribDivisorANGLEFn(index, divisor); | |
1039 } | |
1040 | |
1041 void VirtualGLApi::glGenVertexArraysOESFn(GLsizei n, GLuint* arrays) { | |
1042 driver_->fn.glGenVertexArraysOESFn(n, arrays); | |
1043 } | |
1044 | |
1045 void VirtualGLApi::glDeleteVertexArraysOESFn(GLsizei n, const GLuint* arrays) { | |
1046 driver_->fn.glDeleteVertexArraysOESFn(n, arrays); | |
1047 } | |
1048 | |
1049 void VirtualGLApi::glBindVertexArrayOESFn(GLuint array) { | |
1050 driver_->fn.glBindVertexArrayOESFn(array); | |
1051 } | |
1052 | |
1053 GLboolean VirtualGLApi::glIsVertexArrayOESFn(GLuint array) { | |
1054 return driver_->fn.glIsVertexArrayOESFn(array); | |
1055 } | |
1056 | |
50 } // namespace gfx | 1057 } // namespace gfx |
51 | 1058 |
52 | 1059 |
OLD | NEW |