OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #ifndef GrGLInterface_DEFINED | 8 #ifndef GrGLInterface_DEFINED |
9 #define GrGLInterface_DEFINED | 9 #define GrGLInterface_DEFINED |
10 | 10 |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 | 69 |
70 #if GR_GL_PER_GL_FUNC_CALLBACK | 70 #if GR_GL_PER_GL_FUNC_CALLBACK |
71 typedef void (*GrGLInterfaceCallbackProc)(const GrGLInterface*); | 71 typedef void (*GrGLInterfaceCallbackProc)(const GrGLInterface*); |
72 typedef intptr_t GrGLInterfaceCallbackData; | 72 typedef intptr_t GrGLInterfaceCallbackData; |
73 #endif | 73 #endif |
74 | 74 |
75 /** Function that returns a new interface identical to "interface" but without s
upport for | 75 /** Function that returns a new interface identical to "interface" but without s
upport for |
76 GL_NV_path_rendering. */ | 76 GL_NV_path_rendering. */ |
77 const GrGLInterface* GrGLInterfaceRemoveNVPR(const GrGLInterface*); | 77 const GrGLInterface* GrGLInterfaceRemoveNVPR(const GrGLInterface*); |
78 | 78 |
| 79 /** Function that returns a new interface identical to "interface" but with supp
ort for |
| 80 test version of GL_EXT_debug_marker. */ |
| 81 const GrGLInterface* GrGLInterfaceAddTestDebugMarker(const GrGLInterface*, |
| 82 GrGLInsertEventMarkerProc i
nsertEventMarkerFn, |
| 83 GrGLPushGroupMarkerProc pus
hGroupMarkerFn, |
| 84 GrGLPopGroupMarkerProc popG
roupMarkerFn); |
| 85 |
79 /** | 86 /** |
80 * GrContext uses the following interface to make all calls into OpenGL. When a | 87 * GrContext uses the following interface to make all calls into OpenGL. When a |
81 * GrContext is created it is given a GrGLInterface. The interface's function | 88 * GrContext is created it is given a GrGLInterface. The interface's function |
82 * pointers must be valid for the OpenGL context associated with the GrContext. | 89 * pointers must be valid for the OpenGL context associated with the GrContext. |
83 * On some platforms, such as Windows, function pointers for OpenGL extensions | 90 * On some platforms, such as Windows, function pointers for OpenGL extensions |
84 * may vary between OpenGL contexts. So the caller must be careful to use a | 91 * may vary between OpenGL contexts. So the caller must be careful to use a |
85 * GrGLInterface initialized for the correct context. All functions that should | 92 * GrGLInterface initialized for the correct context. All functions that should |
86 * be available based on the OpenGL's version and extension string must be | 93 * be available based on the OpenGL's version and extension string must be |
87 * non-NULL or GrContext creation will fail. This can be tested with the | 94 * non-NULL or GrContext creation will fail. This can be tested with the |
88 * validate() method when the OpenGL context has been made current. | 95 * validate() method when the OpenGL context has been made current. |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
221 GLPtr<GrGLGetQueryivProc> fGetQueryiv; | 228 GLPtr<GrGLGetQueryivProc> fGetQueryiv; |
222 GLPtr<GrGLGetProgramInfoLogProc> fGetProgramInfoLog; | 229 GLPtr<GrGLGetProgramInfoLogProc> fGetProgramInfoLog; |
223 GLPtr<GrGLGetProgramivProc> fGetProgramiv; | 230 GLPtr<GrGLGetProgramivProc> fGetProgramiv; |
224 GLPtr<GrGLGetRenderbufferParameterivProc> fGetRenderbufferParameteriv; | 231 GLPtr<GrGLGetRenderbufferParameterivProc> fGetRenderbufferParameteriv; |
225 GLPtr<GrGLGetShaderInfoLogProc> fGetShaderInfoLog; | 232 GLPtr<GrGLGetShaderInfoLogProc> fGetShaderInfoLog; |
226 GLPtr<GrGLGetShaderivProc> fGetShaderiv; | 233 GLPtr<GrGLGetShaderivProc> fGetShaderiv; |
227 GLPtr<GrGLGetStringProc> fGetString; | 234 GLPtr<GrGLGetStringProc> fGetString; |
228 GLPtr<GrGLGetStringiProc> fGetStringi; | 235 GLPtr<GrGLGetStringiProc> fGetStringi; |
229 GLPtr<GrGLGetTexLevelParameterivProc> fGetTexLevelParameteriv; | 236 GLPtr<GrGLGetTexLevelParameterivProc> fGetTexLevelParameteriv; |
230 GLPtr<GrGLGetUniformLocationProc> fGetUniformLocation; | 237 GLPtr<GrGLGetUniformLocationProc> fGetUniformLocation; |
| 238 GLPtr<GrGLInsertEventMarkerProc> fInsertEventMarker; |
231 GLPtr<GrGLLineWidthProc> fLineWidth; | 239 GLPtr<GrGLLineWidthProc> fLineWidth; |
232 GLPtr<GrGLLinkProgramProc> fLinkProgram; | 240 GLPtr<GrGLLinkProgramProc> fLinkProgram; |
233 GLPtr<GrGLLoadIdentityProc> fLoadIdentity; | 241 GLPtr<GrGLLoadIdentityProc> fLoadIdentity; |
234 GLPtr<GrGLLoadMatrixfProc> fLoadMatrixf; | 242 GLPtr<GrGLLoadMatrixfProc> fLoadMatrixf; |
235 GLPtr<GrGLMapBufferProc> fMapBuffer; | 243 GLPtr<GrGLMapBufferProc> fMapBuffer; |
236 GLPtr<GrGLMatrixModeProc> fMatrixMode; | 244 GLPtr<GrGLMatrixModeProc> fMatrixMode; |
237 GLPtr<GrGLPixelStoreiProc> fPixelStorei; | 245 GLPtr<GrGLPixelStoreiProc> fPixelStorei; |
| 246 GLPtr<GrGLPopGroupMarkerProc> fPopGroupMarker; |
| 247 GLPtr<GrGLPushGroupMarkerProc> fPushGroupMarker; |
238 GLPtr<GrGLQueryCounterProc> fQueryCounter; | 248 GLPtr<GrGLQueryCounterProc> fQueryCounter; |
239 GLPtr<GrGLReadBufferProc> fReadBuffer; | 249 GLPtr<GrGLReadBufferProc> fReadBuffer; |
240 GLPtr<GrGLReadPixelsProc> fReadPixels; | 250 GLPtr<GrGLReadPixelsProc> fReadPixels; |
241 GLPtr<GrGLRenderbufferStorageProc> fRenderbufferStorage; | 251 GLPtr<GrGLRenderbufferStorageProc> fRenderbufferStorage; |
242 | 252 |
243 // On OpenGL ES there are multiple incompatible extensions that add sup
port for MSAA | 253 // On OpenGL ES there are multiple incompatible extensions that add sup
port for MSAA |
244 // and ES3 adds MSAA support to the standard. On an ES3 driver we may s
till use the | 254 // and ES3 adds MSAA support to the standard. On an ES3 driver we may s
till use the |
245 // older extensions for performance reasons or due to ES3 driver bugs.
We want the function | 255 // older extensions for performance reasons or due to ES3 driver bugs.
We want the function |
246 // that creates the GrGLInterface to provide all available functions an
d internally | 256 // that creates the GrGLInterface to provide all available functions an
d internally |
247 // we will select among them. They all have a method called glRenderbuf
ferStorageMultisample*. | 257 // we will select among them. They all have a method called glRenderbuf
ferStorageMultisample*. |
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
438 GLPtrAlias<GrGLGetQueryivProc> fGetQueryiv; | 448 GLPtrAlias<GrGLGetQueryivProc> fGetQueryiv; |
439 GLPtrAlias<GrGLGetProgramInfoLogProc> fGetProgramInfoLog; | 449 GLPtrAlias<GrGLGetProgramInfoLogProc> fGetProgramInfoLog; |
440 GLPtrAlias<GrGLGetProgramivProc> fGetProgramiv; | 450 GLPtrAlias<GrGLGetProgramivProc> fGetProgramiv; |
441 GLPtrAlias<GrGLGetRenderbufferParameterivProc> fGetRenderbufferParameteriv; | 451 GLPtrAlias<GrGLGetRenderbufferParameterivProc> fGetRenderbufferParameteriv; |
442 GLPtrAlias<GrGLGetShaderInfoLogProc> fGetShaderInfoLog; | 452 GLPtrAlias<GrGLGetShaderInfoLogProc> fGetShaderInfoLog; |
443 GLPtrAlias<GrGLGetShaderivProc> fGetShaderiv; | 453 GLPtrAlias<GrGLGetShaderivProc> fGetShaderiv; |
444 GLPtrAlias<GrGLGetStringProc> fGetString; | 454 GLPtrAlias<GrGLGetStringProc> fGetString; |
445 GLPtrAlias<GrGLGetStringiProc> fGetStringi; | 455 GLPtrAlias<GrGLGetStringiProc> fGetStringi; |
446 GLPtrAlias<GrGLGetTexLevelParameterivProc> fGetTexLevelParameteriv; | 456 GLPtrAlias<GrGLGetTexLevelParameterivProc> fGetTexLevelParameteriv; |
447 GLPtrAlias<GrGLGetUniformLocationProc> fGetUniformLocation; | 457 GLPtrAlias<GrGLGetUniformLocationProc> fGetUniformLocation; |
| 458 GLPtrAlias<GrGLInsertEventMarkerProc> fInsertEventMarker; |
448 GLPtrAlias<GrGLLineWidthProc> fLineWidth; | 459 GLPtrAlias<GrGLLineWidthProc> fLineWidth; |
449 GLPtrAlias<GrGLLinkProgramProc> fLinkProgram; | 460 GLPtrAlias<GrGLLinkProgramProc> fLinkProgram; |
450 GLPtrAlias<GrGLLoadIdentityProc> fLoadIdentity; | 461 GLPtrAlias<GrGLLoadIdentityProc> fLoadIdentity; |
451 GLPtrAlias<GrGLLoadMatrixfProc> fLoadMatrixf; | 462 GLPtrAlias<GrGLLoadMatrixfProc> fLoadMatrixf; |
452 GLPtrAlias<GrGLMapBufferProc> fMapBuffer; | 463 GLPtrAlias<GrGLMapBufferProc> fMapBuffer; |
453 GLPtrAlias<GrGLMatrixModeProc> fMatrixMode; | 464 GLPtrAlias<GrGLMatrixModeProc> fMatrixMode; |
454 GLPtrAlias<GrGLPixelStoreiProc> fPixelStorei; | 465 GLPtrAlias<GrGLPixelStoreiProc> fPixelStorei; |
| 466 GLPtrAlias<GrGLPopGroupMarkerProc> fPopGroupMarker; |
| 467 GLPtrAlias<GrGLPushGroupMarkerProc> fPushGroupMarker; |
455 GLPtrAlias<GrGLQueryCounterProc> fQueryCounter; | 468 GLPtrAlias<GrGLQueryCounterProc> fQueryCounter; |
456 GLPtrAlias<GrGLReadBufferProc> fReadBuffer; | 469 GLPtrAlias<GrGLReadBufferProc> fReadBuffer; |
457 GLPtrAlias<GrGLReadPixelsProc> fReadPixels; | 470 GLPtrAlias<GrGLReadPixelsProc> fReadPixels; |
458 GLPtrAlias<GrGLRenderbufferStorageProc> fRenderbufferStorage; | 471 GLPtrAlias<GrGLRenderbufferStorageProc> fRenderbufferStorage; |
459 GLPtrAlias<GrGLRenderbufferStorageMultisampleProc> fRenderbufferStorageMulti
sampleES2EXT; | 472 GLPtrAlias<GrGLRenderbufferStorageMultisampleProc> fRenderbufferStorageMulti
sampleES2EXT; |
460 GLPtrAlias<GrGLRenderbufferStorageMultisampleProc> fRenderbufferStorageMulti
sampleES2APPLE; | 473 GLPtrAlias<GrGLRenderbufferStorageMultisampleProc> fRenderbufferStorageMulti
sampleES2APPLE; |
461 GLPtrAlias<GrGLRenderbufferStorageMultisampleProc> fRenderbufferStorageMulti
sample; | 474 GLPtrAlias<GrGLRenderbufferStorageMultisampleProc> fRenderbufferStorageMulti
sample; |
462 GLPtrAlias<GrGLBindUniformLocation> fBindUniformLocation; | 475 GLPtrAlias<GrGLBindUniformLocation> fBindUniformLocation; |
463 GLPtrAlias<GrGLResolveMultisampleFramebufferProc> fResolveMultisampleFramebu
ffer; | 476 GLPtrAlias<GrGLResolveMultisampleFramebufferProc> fResolveMultisampleFramebu
ffer; |
464 GLPtrAlias<GrGLScissorProc> fScissor; | 477 GLPtrAlias<GrGLScissorProc> fScissor; |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
555 | 568 |
556 // Per-GL func callback | 569 // Per-GL func callback |
557 #if GR_GL_PER_GL_FUNC_CALLBACK | 570 #if GR_GL_PER_GL_FUNC_CALLBACK |
558 GrGLInterfaceCallbackProc fCallback; | 571 GrGLInterfaceCallbackProc fCallback; |
559 GrGLInterfaceCallbackData fCallbackData; | 572 GrGLInterfaceCallbackData fCallbackData; |
560 #endif | 573 #endif |
561 | 574 |
562 }; | 575 }; |
563 | 576 |
564 #endif | 577 #endif |
OLD | NEW |