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