twiz@google.com | 59a190b | 2011-03-14 21:23:01 +0000 | [diff] [blame] | 1 | /* |
epoger@google.com | ec3ed6a | 2011-07-28 14:26:00 +0000 | [diff] [blame] | 2 | * Copyright 2011 Google Inc. |
| 3 | * |
| 4 | * Use of this source code is governed by a BSD-style license that can be |
| 5 | * found in the LICENSE file. |
twiz@google.com | 59a190b | 2011-03-14 21:23:01 +0000 | [diff] [blame] | 6 | */ |
| 7 | |
twiz@google.com | 59a190b | 2011-03-14 21:23:01 +0000 | [diff] [blame] | 8 | #ifndef GrGLInterface_DEFINED |
| 9 | #define GrGLInterface_DEFINED |
| 10 | |
bsalomon@google.com | 637d5e9 | 2012-05-07 21:33:56 +0000 | [diff] [blame] | 11 | #include "GrGLFunctions.h" |
commit-bot@chromium.org | 90313cc | 2014-01-17 15:05:38 +0000 | [diff] [blame] | 12 | #include "GrGLExtensions.h" |
commit-bot@chromium.org | a4de8c2 | 2013-09-09 13:38:37 +0000 | [diff] [blame] | 13 | #include "SkRefCnt.h" |
twiz@google.com | 59a190b | 2011-03-14 21:23:01 +0000 | [diff] [blame] | 14 | |
twiz@google.com | 59a190b | 2011-03-14 21:23:01 +0000 | [diff] [blame] | 15 | //////////////////////////////////////////////////////////////////////////////// |
| 16 | |
| 17 | /** |
bsalomon@google.com | 0b77d68 | 2011-08-19 13:28:54 +0000 | [diff] [blame] | 18 | * Rather than depend on platform-specific GL headers and libraries, we require |
| 19 | * the client to provide a struct of GL function pointers. This struct can be |
| 20 | * specified per-GrContext as a parameter to GrContext::Create. If NULL is |
commit-bot@chromium.org | a3b15ed | 2014-01-15 19:32:03 +0000 | [diff] [blame] | 21 | * passed to Create then a "default" GL interface is created. If the default is |
bsalomon@google.com | 0b77d68 | 2011-08-19 13:28:54 +0000 | [diff] [blame] | 22 | * also NULL GrContext creation will fail. |
| 23 | * |
bsalomon@google.com | 6fb736f | 2011-09-16 18:51:57 +0000 | [diff] [blame] | 24 | * The default interface is returned by GrGLDefaultInterface. This function's |
robertphillips@google.com | 0da3719 | 2012-03-19 14:42:13 +0000 | [diff] [blame] | 25 | * implementation is platform-specific. Several have been provided, along with |
commit-bot@chromium.org | a3b15ed | 2014-01-15 19:32:03 +0000 | [diff] [blame] | 26 | * an implementation that simply returns NULL. |
bsalomon@google.com | 56bfc5a | 2011-09-01 13:28:16 +0000 | [diff] [blame] | 27 | * |
| 28 | * By defining GR_GL_PER_GL_CALL_IFACE_CALLBACK to 1 the client can specify a |
| 29 | * callback function that will be called prior to each GL function call. See |
| 30 | * comments in GrGLConfig.h |
twiz@google.com | 59a190b | 2011-03-14 21:23:01 +0000 | [diff] [blame] | 31 | */ |
twiz@google.com | 59a190b | 2011-03-14 21:23:01 +0000 | [diff] [blame] | 32 | |
cdalton | d416a5b | 2015-06-23 13:23:44 -0700 | [diff] [blame] | 33 | typedef void(*GrGLFuncPtr)(); |
| 34 | |
bsalomon@google.com | 0b77d68 | 2011-08-19 13:28:54 +0000 | [diff] [blame] | 35 | struct GrGLInterface; |
| 36 | |
bsalomon@google.com | 6fb736f | 2011-09-16 18:51:57 +0000 | [diff] [blame] | 37 | const GrGLInterface* GrGLDefaultInterface(); |
twiz@google.com | 59a190b | 2011-03-14 21:23:01 +0000 | [diff] [blame] | 38 | |
bsalomon@google.com | 57f5d98 | 2011-10-24 21:17:53 +0000 | [diff] [blame] | 39 | /** |
| 40 | * Creates a GrGLInterface for a "native" GL context (e.g. WGL on windows, |
commit-bot@chromium.org | a3b15ed | 2014-01-15 19:32:03 +0000 | [diff] [blame] | 41 | * GLX on linux, AGL on Mac). The interface is only valid for the GL context |
| 42 | * that is current when the interface is created. |
bsalomon@google.com | 57f5d98 | 2011-10-24 21:17:53 +0000 | [diff] [blame] | 43 | */ |
halcanary | 0fc1dbe | 2015-09-21 08:22:19 -0700 | [diff] [blame] | 44 | SK_API const GrGLInterface* GrGLCreateNativeInterface(); |
bsalomon@google.com | 373a663 | 2011-10-19 20:43:20 +0000 | [diff] [blame] | 45 | |
bsalomon | 3724e57 | 2016-03-30 18:56:19 -0700 | [diff] [blame] | 46 | #if GR_GL_PER_GL_FUNC_CALLBACK |
| 47 | typedef void (*GrGLInterfaceCallbackProc)(const GrGLInterface*); |
| 48 | typedef intptr_t GrGLInterfaceCallbackData; |
hendrikw | 885bf09 | 2015-08-27 10:38:39 -0700 | [diff] [blame] | 49 | #endif |
| 50 | |
bsalomon@google.com | 7491372 | 2011-10-27 20:44:19 +0000 | [diff] [blame] | 51 | /** |
| 52 | * Creates a null GrGLInterface that doesn't draw anything. Used for measuring |
bsalomon | 3724e57 | 2016-03-30 18:56:19 -0700 | [diff] [blame] | 53 | * CPU overhead. TODO: We would like to move this to tools/gpu/gl/null but currently |
| 54 | * Chromium is using it in its unit tests. |
bsalomon@google.com | 7491372 | 2011-10-27 20:44:19 +0000 | [diff] [blame] | 55 | */ |
svaisanen | b988ecf | 2016-04-20 00:36:53 -0700 | [diff] [blame] | 56 | const SK_API GrGLInterface* GrGLCreateNullInterface(bool enableNVPR = false); |
bsalomon@google.com | 7491372 | 2011-10-27 20:44:19 +0000 | [diff] [blame] | 57 | |
commit-bot@chromium.org | a3baf3b | 2014-02-21 18:45:30 +0000 | [diff] [blame] | 58 | /** Function that returns a new interface identical to "interface" but with support for |
| 59 | test version of GL_EXT_debug_marker. */ |
| 60 | const GrGLInterface* GrGLInterfaceAddTestDebugMarker(const GrGLInterface*, |
| 61 | GrGLInsertEventMarkerProc insertEventMarkerFn, |
| 62 | GrGLPushGroupMarkerProc pushGroupMarkerFn, |
| 63 | GrGLPopGroupMarkerProc popGroupMarkerFn); |
| 64 | |
commit-bot@chromium.org | d8ed851 | 2014-01-24 20:49:44 +0000 | [diff] [blame] | 65 | /** |
bsalomon@google.com | cc61b17 | 2012-05-07 21:45:48 +0000 | [diff] [blame] | 66 | * GrContext uses the following interface to make all calls into OpenGL. When a |
| 67 | * GrContext is created it is given a GrGLInterface. The interface's function |
| 68 | * pointers must be valid for the OpenGL context associated with the GrContext. |
| 69 | * On some platforms, such as Windows, function pointers for OpenGL extensions |
| 70 | * may vary between OpenGL contexts. So the caller must be careful to use a |
| 71 | * GrGLInterface initialized for the correct context. All functions that should |
| 72 | * be available based on the OpenGL's version and extension string must be |
| 73 | * non-NULL or GrContext creation will fail. This can be tested with the |
| 74 | * validate() method when the OpenGL context has been made current. |
bsalomon@google.com | bf2a469 | 2011-05-04 12:35:39 +0000 | [diff] [blame] | 75 | */ |
commit-bot@chromium.org | a4de8c2 | 2013-09-09 13:38:37 +0000 | [diff] [blame] | 76 | struct SK_API GrGLInterface : public SkRefCnt { |
bsalomon@google.com | ba800e2 | 2012-03-29 21:04:52 +0000 | [diff] [blame] | 77 | private: |
commit-bot@chromium.org | a4de8c2 | 2013-09-09 13:38:37 +0000 | [diff] [blame] | 78 | typedef SkRefCnt INHERITED; |
robertphillips@google.com | 15e9d3e | 2012-06-21 20:25:03 +0000 | [diff] [blame] | 79 | |
bsalomon@google.com | ba800e2 | 2012-03-29 21:04:52 +0000 | [diff] [blame] | 80 | public: |
bsalomon@google.com | 0b77d68 | 2011-08-19 13:28:54 +0000 | [diff] [blame] | 81 | GrGLInterface(); |
| 82 | |
commit-bot@chromium.org | d8ed851 | 2014-01-24 20:49:44 +0000 | [diff] [blame] | 83 | static GrGLInterface* NewClone(const GrGLInterface*); |
| 84 | |
commit-bot@chromium.org | 9e90aed | 2014-01-16 16:35:09 +0000 | [diff] [blame] | 85 | // Validates that the GrGLInterface supports its advertised standard. This means the necessary |
| 86 | // function pointers have been initialized for both the GL version and any advertised |
| 87 | // extensions. |
| 88 | bool validate() const; |
bsalomon@google.com | 89ec61e | 2012-02-10 20:05:18 +0000 | [diff] [blame] | 89 | |
commit-bot@chromium.org | 9e90aed | 2014-01-16 16:35:09 +0000 | [diff] [blame] | 90 | // Indicates the type of GL implementation |
| 91 | union { |
| 92 | GrGLStandard fStandard; |
| 93 | GrGLStandard fBindingsExported; // Legacy name, will be remove when Chromium is updated. |
| 94 | }; |
twiz@google.com | b65e0cb | 2011-03-18 20:41:44 +0000 | [diff] [blame] | 95 | |
commit-bot@chromium.org | 90313cc | 2014-01-17 15:05:38 +0000 | [diff] [blame] | 96 | GrGLExtensions fExtensions; |
| 97 | |
commit-bot@chromium.org | f535561 | 2014-02-28 20:28:50 +0000 | [diff] [blame] | 98 | bool hasExtension(const char ext[]) const { return fExtensions.has(ext); } |
commit-bot@chromium.org | 90313cc | 2014-01-17 15:05:38 +0000 | [diff] [blame] | 99 | |
commit-bot@chromium.org | c72425a | 2014-01-21 16:09:18 +0000 | [diff] [blame] | 100 | /** |
| 101 | * The function pointers are in a struct so that we can have a compiler generated assignment |
| 102 | * operator. |
| 103 | */ |
| 104 | struct Functions { |
bsalomon | 9f2dc27 | 2016-02-08 07:22:17 -0800 | [diff] [blame] | 105 | GrGLFunction<GrGLActiveTextureProc> fActiveTexture; |
| 106 | GrGLFunction<GrGLAttachShaderProc> fAttachShader; |
| 107 | GrGLFunction<GrGLBeginQueryProc> fBeginQuery; |
| 108 | GrGLFunction<GrGLBindAttribLocationProc> fBindAttribLocation; |
| 109 | GrGLFunction<GrGLBindBufferProc> fBindBuffer; |
| 110 | GrGLFunction<GrGLBindFragDataLocationProc> fBindFragDataLocation; |
| 111 | GrGLFunction<GrGLBindFragDataLocationIndexedProc> fBindFragDataLocationIndexed; |
| 112 | GrGLFunction<GrGLBindFramebufferProc> fBindFramebuffer; |
| 113 | GrGLFunction<GrGLBindRenderbufferProc> fBindRenderbuffer; |
| 114 | GrGLFunction<GrGLBindTextureProc> fBindTexture; |
Brian Salomon | 0b63ceb | 2016-11-15 12:36:29 -0500 | [diff] [blame] | 115 | GrGLFunction<GrGLBindImageTextureProc> fBindImageTexture; |
bsalomon | 9f2dc27 | 2016-02-08 07:22:17 -0800 | [diff] [blame] | 116 | GrGLFunction<GrGLBindVertexArrayProc> fBindVertexArray; |
| 117 | GrGLFunction<GrGLBlendBarrierProc> fBlendBarrier; |
| 118 | GrGLFunction<GrGLBlendColorProc> fBlendColor; |
| 119 | GrGLFunction<GrGLBlendEquationProc> fBlendEquation; |
| 120 | GrGLFunction<GrGLBlendFuncProc> fBlendFunc; |
| 121 | GrGLFunction<GrGLBlitFramebufferProc> fBlitFramebuffer; |
| 122 | GrGLFunction<GrGLBufferDataProc> fBufferData; |
| 123 | GrGLFunction<GrGLBufferSubDataProc> fBufferSubData; |
| 124 | GrGLFunction<GrGLCheckFramebufferStatusProc> fCheckFramebufferStatus; |
| 125 | GrGLFunction<GrGLClearProc> fClear; |
| 126 | GrGLFunction<GrGLClearColorProc> fClearColor; |
| 127 | GrGLFunction<GrGLClearStencilProc> fClearStencil; |
Brian Salomon | d17b4a6 | 2017-05-23 16:53:47 -0400 | [diff] [blame] | 128 | GrGLFunction<GrGLClearTexImageProc> fClearTexImage; |
| 129 | GrGLFunction<GrGLClearTexSubImageProc> fClearTexSubImage; |
bsalomon | 9f2dc27 | 2016-02-08 07:22:17 -0800 | [diff] [blame] | 130 | GrGLFunction<GrGLColorMaskProc> fColorMask; |
| 131 | GrGLFunction<GrGLCompileShaderProc> fCompileShader; |
| 132 | GrGLFunction<GrGLCompressedTexImage2DProc> fCompressedTexImage2D; |
| 133 | GrGLFunction<GrGLCompressedTexSubImage2DProc> fCompressedTexSubImage2D; |
| 134 | GrGLFunction<GrGLCopyTexSubImage2DProc> fCopyTexSubImage2D; |
| 135 | GrGLFunction<GrGLCreateProgramProc> fCreateProgram; |
| 136 | GrGLFunction<GrGLCreateShaderProc> fCreateShader; |
| 137 | GrGLFunction<GrGLCullFaceProc> fCullFace; |
| 138 | GrGLFunction<GrGLDeleteBuffersProc> fDeleteBuffers; |
| 139 | GrGLFunction<GrGLDeleteFramebuffersProc> fDeleteFramebuffers; |
| 140 | GrGLFunction<GrGLDeleteProgramProc> fDeleteProgram; |
| 141 | GrGLFunction<GrGLDeleteQueriesProc> fDeleteQueries; |
| 142 | GrGLFunction<GrGLDeleteRenderbuffersProc> fDeleteRenderbuffers; |
| 143 | GrGLFunction<GrGLDeleteShaderProc> fDeleteShader; |
| 144 | GrGLFunction<GrGLDeleteTexturesProc> fDeleteTextures; |
| 145 | GrGLFunction<GrGLDeleteVertexArraysProc> fDeleteVertexArrays; |
| 146 | GrGLFunction<GrGLDepthMaskProc> fDepthMask; |
| 147 | GrGLFunction<GrGLDisableProc> fDisable; |
| 148 | GrGLFunction<GrGLDisableVertexAttribArrayProc> fDisableVertexAttribArray; |
| 149 | GrGLFunction<GrGLDrawArraysProc> fDrawArrays; |
| 150 | GrGLFunction<GrGLDrawArraysIndirectProc> fDrawArraysIndirect; |
| 151 | GrGLFunction<GrGLDrawArraysInstancedProc> fDrawArraysInstanced; |
| 152 | GrGLFunction<GrGLDrawBufferProc> fDrawBuffer; |
| 153 | GrGLFunction<GrGLDrawBuffersProc> fDrawBuffers; |
| 154 | GrGLFunction<GrGLDrawElementsProc> fDrawElements; |
| 155 | GrGLFunction<GrGLDrawElementsIndirectProc> fDrawElementsIndirect; |
| 156 | GrGLFunction<GrGLDrawElementsInstancedProc> fDrawElementsInstanced; |
bsalomon | fc9527a | 2016-08-29 09:18:39 -0700 | [diff] [blame] | 157 | GrGLFunction<GrGLDrawRangeElementsProc> fDrawRangeElements; |
bsalomon | 9f2dc27 | 2016-02-08 07:22:17 -0800 | [diff] [blame] | 158 | GrGLFunction<GrGLEnableProc> fEnable; |
| 159 | GrGLFunction<GrGLEnableVertexAttribArrayProc> fEnableVertexAttribArray; |
| 160 | GrGLFunction<GrGLEndQueryProc> fEndQuery; |
| 161 | GrGLFunction<GrGLFinishProc> fFinish; |
| 162 | GrGLFunction<GrGLFlushProc> fFlush; |
| 163 | GrGLFunction<GrGLFlushMappedBufferRangeProc> fFlushMappedBufferRange; |
| 164 | GrGLFunction<GrGLFramebufferRenderbufferProc> fFramebufferRenderbuffer; |
| 165 | GrGLFunction<GrGLFramebufferTexture2DProc> fFramebufferTexture2D; |
| 166 | GrGLFunction<GrGLFramebufferTexture2DMultisampleProc> fFramebufferTexture2DMultisample; |
| 167 | GrGLFunction<GrGLFrontFaceProc> fFrontFace; |
| 168 | GrGLFunction<GrGLGenBuffersProc> fGenBuffers; |
| 169 | GrGLFunction<GrGLGenFramebuffersProc> fGenFramebuffers; |
| 170 | GrGLFunction<GrGLGenerateMipmapProc> fGenerateMipmap; |
| 171 | GrGLFunction<GrGLGenQueriesProc> fGenQueries; |
| 172 | GrGLFunction<GrGLGenRenderbuffersProc> fGenRenderbuffers; |
| 173 | GrGLFunction<GrGLGenTexturesProc> fGenTextures; |
| 174 | GrGLFunction<GrGLGenVertexArraysProc> fGenVertexArrays; |
| 175 | GrGLFunction<GrGLGetBufferParameterivProc> fGetBufferParameteriv; |
| 176 | GrGLFunction<GrGLGetErrorProc> fGetError; |
| 177 | GrGLFunction<GrGLGetFramebufferAttachmentParameterivProc> fGetFramebufferAttachmentParameteriv; |
| 178 | GrGLFunction<GrGLGetIntegervProc> fGetIntegerv; |
cdalton | eb79eea | 2016-02-26 10:39:34 -0800 | [diff] [blame] | 179 | GrGLFunction<GrGLGetMultisamplefvProc> fGetMultisamplefv; |
bsalomon | 9f2dc27 | 2016-02-08 07:22:17 -0800 | [diff] [blame] | 180 | GrGLFunction<GrGLGetQueryObjecti64vProc> fGetQueryObjecti64v; |
| 181 | GrGLFunction<GrGLGetQueryObjectivProc> fGetQueryObjectiv; |
| 182 | GrGLFunction<GrGLGetQueryObjectui64vProc> fGetQueryObjectui64v; |
| 183 | GrGLFunction<GrGLGetQueryObjectuivProc> fGetQueryObjectuiv; |
| 184 | GrGLFunction<GrGLGetQueryivProc> fGetQueryiv; |
| 185 | GrGLFunction<GrGLGetProgramInfoLogProc> fGetProgramInfoLog; |
| 186 | GrGLFunction<GrGLGetProgramivProc> fGetProgramiv; |
| 187 | GrGLFunction<GrGLGetRenderbufferParameterivProc> fGetRenderbufferParameteriv; |
| 188 | GrGLFunction<GrGLGetShaderInfoLogProc> fGetShaderInfoLog; |
| 189 | GrGLFunction<GrGLGetShaderivProc> fGetShaderiv; |
| 190 | GrGLFunction<GrGLGetShaderPrecisionFormatProc> fGetShaderPrecisionFormat; |
| 191 | GrGLFunction<GrGLGetStringProc> fGetString; |
| 192 | GrGLFunction<GrGLGetStringiProc> fGetStringi; |
| 193 | GrGLFunction<GrGLGetTexLevelParameterivProc> fGetTexLevelParameteriv; |
| 194 | GrGLFunction<GrGLGetUniformLocationProc> fGetUniformLocation; |
| 195 | GrGLFunction<GrGLInsertEventMarkerProc> fInsertEventMarker; |
| 196 | GrGLFunction<GrGLInvalidateBufferDataProc> fInvalidateBufferData; |
| 197 | GrGLFunction<GrGLInvalidateBufferSubDataProc> fInvalidateBufferSubData; |
| 198 | GrGLFunction<GrGLInvalidateFramebufferProc> fInvalidateFramebuffer; |
| 199 | GrGLFunction<GrGLInvalidateSubFramebufferProc> fInvalidateSubFramebuffer; |
| 200 | GrGLFunction<GrGLInvalidateTexImageProc> fInvalidateTexImage; |
| 201 | GrGLFunction<GrGLInvalidateTexSubImageProc> fInvalidateTexSubImage; |
| 202 | GrGLFunction<GrGLIsTextureProc> fIsTexture; |
| 203 | GrGLFunction<GrGLLineWidthProc> fLineWidth; |
| 204 | GrGLFunction<GrGLLinkProgramProc> fLinkProgram; |
| 205 | GrGLFunction<GrGLMapBufferProc> fMapBuffer; |
| 206 | GrGLFunction<GrGLMapBufferRangeProc> fMapBufferRange; |
| 207 | GrGLFunction<GrGLMapBufferSubDataProc> fMapBufferSubData; |
| 208 | GrGLFunction<GrGLMapTexSubImage2DProc> fMapTexSubImage2D; |
Brian Salomon | 0b63ceb | 2016-11-15 12:36:29 -0500 | [diff] [blame] | 209 | GrGLFunction<GrGLMemoryBarrierProc> fMemoryBarrier; |
| 210 | GrGLFunction<GrGLMemoryBarrierByRegionProc> fMemoryBarrierByRegion; |
csmartdalton | 5cebf8c | 2016-06-03 08:28:47 -0700 | [diff] [blame] | 211 | GrGLFunction<GrGLMultiDrawArraysIndirectProc> fMultiDrawArraysIndirect; |
| 212 | GrGLFunction<GrGLMultiDrawElementsIndirectProc> fMultiDrawElementsIndirect; |
bsalomon | 9f2dc27 | 2016-02-08 07:22:17 -0800 | [diff] [blame] | 213 | GrGLFunction<GrGLPixelStoreiProc> fPixelStorei; |
Jim Van Verth | 609e7cc | 2017-03-30 14:28:08 -0400 | [diff] [blame] | 214 | GrGLFunction<GrGLPolygonModeProc> fPolygonMode; |
bsalomon | 9f2dc27 | 2016-02-08 07:22:17 -0800 | [diff] [blame] | 215 | GrGLFunction<GrGLPopGroupMarkerProc> fPopGroupMarker; |
| 216 | GrGLFunction<GrGLPushGroupMarkerProc> fPushGroupMarker; |
| 217 | GrGLFunction<GrGLQueryCounterProc> fQueryCounter; |
| 218 | GrGLFunction<GrGLRasterSamplesProc> fRasterSamples; |
| 219 | GrGLFunction<GrGLReadBufferProc> fReadBuffer; |
| 220 | GrGLFunction<GrGLReadPixelsProc> fReadPixels; |
| 221 | GrGLFunction<GrGLRenderbufferStorageProc> fRenderbufferStorage; |
commit-bot@chromium.org | a8e5a06 | 2013-09-05 23:44:09 +0000 | [diff] [blame] | 222 | |
commit-bot@chromium.org | c72425a | 2014-01-21 16:09:18 +0000 | [diff] [blame] | 223 | // On OpenGL ES there are multiple incompatible extensions that add support for MSAA |
| 224 | // and ES3 adds MSAA support to the standard. On an ES3 driver we may still use the |
| 225 | // older extensions for performance reasons or due to ES3 driver bugs. We want the function |
| 226 | // that creates the GrGLInterface to provide all available functions and internally |
| 227 | // we will select among them. They all have a method called glRenderbufferStorageMultisample*. |
| 228 | // So we have separate function pointers for GL_IMG/EXT_multisampled_to_texture, |
| 229 | // GL_CHROMIUM/ANGLE_framebuffer_multisample/ES3, and GL_APPLE_framebuffer_multisample |
| 230 | // variations. |
| 231 | // |
| 232 | // If a driver supports multiple GL_ARB_framebuffer_multisample-style extensions then we will |
| 233 | // assume the function pointers for the standard (or equivalent GL_ARB) version have |
| 234 | // been preferred over GL_EXT, GL_CHROMIUM, or GL_ANGLE variations that have reduced |
| 235 | // functionality. |
commit-bot@chromium.org | a8e5a06 | 2013-09-05 23:44:09 +0000 | [diff] [blame] | 236 | |
commit-bot@chromium.org | c72425a | 2014-01-21 16:09:18 +0000 | [diff] [blame] | 237 | // GL_EXT_multisampled_render_to_texture (preferred) or GL_IMG_multisampled_render_to_texture |
bsalomon | 9f2dc27 | 2016-02-08 07:22:17 -0800 | [diff] [blame] | 238 | GrGLFunction<GrGLRenderbufferStorageMultisampleProc> fRenderbufferStorageMultisampleES2EXT; |
commit-bot@chromium.org | c72425a | 2014-01-21 16:09:18 +0000 | [diff] [blame] | 239 | // GL_APPLE_framebuffer_multisample |
bsalomon | 9f2dc27 | 2016-02-08 07:22:17 -0800 | [diff] [blame] | 240 | GrGLFunction<GrGLRenderbufferStorageMultisampleProc> fRenderbufferStorageMultisampleES2APPLE; |
commit-bot@chromium.org | 92b7884 | 2014-01-16 20:49:46 +0000 | [diff] [blame] | 241 | |
commit-bot@chromium.org | c72425a | 2014-01-21 16:09:18 +0000 | [diff] [blame] | 242 | // This is used to store the pointer for GL_ARB/EXT/ANGLE/CHROMIUM_framebuffer_multisample or |
| 243 | // the standard function in ES3+ or GL 3.0+. |
bsalomon | 9f2dc27 | 2016-02-08 07:22:17 -0800 | [diff] [blame] | 244 | GrGLFunction<GrGLRenderbufferStorageMultisampleProc> fRenderbufferStorageMultisample; |
commit-bot@chromium.org | a8e5a06 | 2013-09-05 23:44:09 +0000 | [diff] [blame] | 245 | |
commit-bot@chromium.org | c72425a | 2014-01-21 16:09:18 +0000 | [diff] [blame] | 246 | // Pointer to BindUniformLocationCHROMIUM from the GL_CHROMIUM_bind_uniform_location extension. |
bsalomon | 9f2dc27 | 2016-02-08 07:22:17 -0800 | [diff] [blame] | 247 | GrGLFunction<GrGLBindUniformLocationProc> fBindUniformLocation; |
commit-bot@chromium.org | d3baf20 | 2013-11-07 22:06:08 +0000 | [diff] [blame] | 248 | |
bsalomon | 9f2dc27 | 2016-02-08 07:22:17 -0800 | [diff] [blame] | 249 | GrGLFunction<GrGLResolveMultisampleFramebufferProc> fResolveMultisampleFramebuffer; |
| 250 | GrGLFunction<GrGLScissorProc> fScissor; |
| 251 | GrGLFunction<GrGLShaderSourceProc> fShaderSource; |
| 252 | GrGLFunction<GrGLStencilFuncProc> fStencilFunc; |
| 253 | GrGLFunction<GrGLStencilFuncSeparateProc> fStencilFuncSeparate; |
| 254 | GrGLFunction<GrGLStencilMaskProc> fStencilMask; |
| 255 | GrGLFunction<GrGLStencilMaskSeparateProc> fStencilMaskSeparate; |
| 256 | GrGLFunction<GrGLStencilOpProc> fStencilOp; |
| 257 | GrGLFunction<GrGLStencilOpSeparateProc> fStencilOpSeparate; |
cdalton | c04ce67 | 2016-03-11 14:07:38 -0800 | [diff] [blame] | 258 | GrGLFunction<GrGLTexBufferProc> fTexBuffer; |
cdalton | f8a6ce8 | 2016-04-11 13:02:05 -0700 | [diff] [blame] | 259 | GrGLFunction<GrGLTexBufferRangeProc> fTexBufferRange; |
bsalomon | 9f2dc27 | 2016-02-08 07:22:17 -0800 | [diff] [blame] | 260 | GrGLFunction<GrGLTexImage2DProc> fTexImage2D; |
| 261 | GrGLFunction<GrGLTexParameteriProc> fTexParameteri; |
| 262 | GrGLFunction<GrGLTexParameterivProc> fTexParameteriv; |
| 263 | GrGLFunction<GrGLTexSubImage2DProc> fTexSubImage2D; |
| 264 | GrGLFunction<GrGLTexStorage2DProc> fTexStorage2D; |
| 265 | GrGLFunction<GrGLTextureBarrierProc> fTextureBarrier; |
| 266 | GrGLFunction<GrGLDiscardFramebufferProc> fDiscardFramebuffer; |
| 267 | GrGLFunction<GrGLUniform1fProc> fUniform1f; |
| 268 | GrGLFunction<GrGLUniform1iProc> fUniform1i; |
| 269 | GrGLFunction<GrGLUniform1fvProc> fUniform1fv; |
| 270 | GrGLFunction<GrGLUniform1ivProc> fUniform1iv; |
| 271 | GrGLFunction<GrGLUniform2fProc> fUniform2f; |
| 272 | GrGLFunction<GrGLUniform2iProc> fUniform2i; |
| 273 | GrGLFunction<GrGLUniform2fvProc> fUniform2fv; |
| 274 | GrGLFunction<GrGLUniform2ivProc> fUniform2iv; |
| 275 | GrGLFunction<GrGLUniform3fProc> fUniform3f; |
| 276 | GrGLFunction<GrGLUniform3iProc> fUniform3i; |
| 277 | GrGLFunction<GrGLUniform3fvProc> fUniform3fv; |
| 278 | GrGLFunction<GrGLUniform3ivProc> fUniform3iv; |
| 279 | GrGLFunction<GrGLUniform4fProc> fUniform4f; |
| 280 | GrGLFunction<GrGLUniform4iProc> fUniform4i; |
| 281 | GrGLFunction<GrGLUniform4fvProc> fUniform4fv; |
| 282 | GrGLFunction<GrGLUniform4ivProc> fUniform4iv; |
| 283 | GrGLFunction<GrGLUniformMatrix2fvProc> fUniformMatrix2fv; |
| 284 | GrGLFunction<GrGLUniformMatrix3fvProc> fUniformMatrix3fv; |
| 285 | GrGLFunction<GrGLUniformMatrix4fvProc> fUniformMatrix4fv; |
| 286 | GrGLFunction<GrGLUnmapBufferProc> fUnmapBuffer; |
| 287 | GrGLFunction<GrGLUnmapBufferSubDataProc> fUnmapBufferSubData; |
| 288 | GrGLFunction<GrGLUnmapTexSubImage2DProc> fUnmapTexSubImage2D; |
| 289 | GrGLFunction<GrGLUseProgramProc> fUseProgram; |
| 290 | GrGLFunction<GrGLVertexAttrib1fProc> fVertexAttrib1f; |
| 291 | GrGLFunction<GrGLVertexAttrib2fvProc> fVertexAttrib2fv; |
| 292 | GrGLFunction<GrGLVertexAttrib3fvProc> fVertexAttrib3fv; |
| 293 | GrGLFunction<GrGLVertexAttrib4fvProc> fVertexAttrib4fv; |
| 294 | GrGLFunction<GrGLVertexAttribDivisorProc> fVertexAttribDivisor; |
cdalton | 793dc26 | 2016-02-08 10:11:47 -0800 | [diff] [blame] | 295 | GrGLFunction<GrGLVertexAttribIPointerProc> fVertexAttribIPointer; |
bsalomon | 9f2dc27 | 2016-02-08 07:22:17 -0800 | [diff] [blame] | 296 | GrGLFunction<GrGLVertexAttribPointerProc> fVertexAttribPointer; |
| 297 | GrGLFunction<GrGLViewportProc> fViewport; |
bsalomon@google.com | 271cffc | 2011-05-20 14:13:56 +0000 | [diff] [blame] | 298 | |
cdalton | 626e1ff | 2015-06-12 13:56:46 -0700 | [diff] [blame] | 299 | /* GL_NV_path_rendering */ |
bsalomon | 9f2dc27 | 2016-02-08 07:22:17 -0800 | [diff] [blame] | 300 | GrGLFunction<GrGLMatrixLoadfProc> fMatrixLoadf; |
| 301 | GrGLFunction<GrGLMatrixLoadIdentityProc> fMatrixLoadIdentity; |
| 302 | GrGLFunction<GrGLGetProgramResourceLocationProc> fGetProgramResourceLocation; |
| 303 | GrGLFunction<GrGLPathCommandsProc> fPathCommands; |
| 304 | GrGLFunction<GrGLPathParameteriProc> fPathParameteri; |
| 305 | GrGLFunction<GrGLPathParameterfProc> fPathParameterf; |
| 306 | GrGLFunction<GrGLGenPathsProc> fGenPaths; |
| 307 | GrGLFunction<GrGLDeletePathsProc> fDeletePaths; |
| 308 | GrGLFunction<GrGLIsPathProc> fIsPath; |
| 309 | GrGLFunction<GrGLPathStencilFuncProc> fPathStencilFunc; |
| 310 | GrGLFunction<GrGLStencilFillPathProc> fStencilFillPath; |
| 311 | GrGLFunction<GrGLStencilStrokePathProc> fStencilStrokePath; |
| 312 | GrGLFunction<GrGLStencilFillPathInstancedProc> fStencilFillPathInstanced; |
| 313 | GrGLFunction<GrGLStencilStrokePathInstancedProc> fStencilStrokePathInstanced; |
| 314 | GrGLFunction<GrGLCoverFillPathProc> fCoverFillPath; |
| 315 | GrGLFunction<GrGLCoverStrokePathProc> fCoverStrokePath; |
| 316 | GrGLFunction<GrGLCoverFillPathInstancedProc> fCoverFillPathInstanced; |
| 317 | GrGLFunction<GrGLCoverStrokePathInstancedProc> fCoverStrokePathInstanced; |
cdalton | c7103a1 | 2014-08-11 14:05:05 -0700 | [diff] [blame] | 318 | // NV_path_rendering v1.2 |
bsalomon | 9f2dc27 | 2016-02-08 07:22:17 -0800 | [diff] [blame] | 319 | GrGLFunction<GrGLStencilThenCoverFillPathProc> fStencilThenCoverFillPath; |
| 320 | GrGLFunction<GrGLStencilThenCoverStrokePathProc> fStencilThenCoverStrokePath; |
| 321 | GrGLFunction<GrGLStencilThenCoverFillPathInstancedProc> fStencilThenCoverFillPathInstanced; |
| 322 | GrGLFunction<GrGLStencilThenCoverStrokePathInstancedProc> fStencilThenCoverStrokePathInstanced; |
cdalton | c7103a1 | 2014-08-11 14:05:05 -0700 | [diff] [blame] | 323 | // NV_path_rendering v1.3 |
bsalomon | 9f2dc27 | 2016-02-08 07:22:17 -0800 | [diff] [blame] | 324 | GrGLFunction<GrGLProgramPathFragmentInputGenProc> fProgramPathFragmentInputGen; |
kkinnunen | 6bb6d40 | 2015-07-14 10:59:23 -0700 | [diff] [blame] | 325 | // CHROMIUM_path_rendering |
bsalomon | 9f2dc27 | 2016-02-08 07:22:17 -0800 | [diff] [blame] | 326 | GrGLFunction<GrGLBindFragmentInputLocationProc> fBindFragmentInputLocation; |
cdalton | 626e1ff | 2015-06-12 13:56:46 -0700 | [diff] [blame] | 327 | |
| 328 | /* NV_framebuffer_mixed_samples */ |
bsalomon | 9f2dc27 | 2016-02-08 07:22:17 -0800 | [diff] [blame] | 329 | GrGLFunction<GrGLCoverageModulationProc> fCoverageModulation; |
cdalton | 626e1ff | 2015-06-12 13:56:46 -0700 | [diff] [blame] | 330 | |
cdalton | 626e1ff | 2015-06-12 13:56:46 -0700 | [diff] [blame] | 331 | /* NV_bindless_texture */ |
| 332 | // We use the NVIDIA verson for now because it does not require dynamically uniform handles. |
| 333 | // We may switch the the ARB version and/or omit methods in the future. |
bsalomon | 9f2dc27 | 2016-02-08 07:22:17 -0800 | [diff] [blame] | 334 | GrGLFunction<GrGLGetTextureHandleProc> fGetTextureHandle; |
| 335 | GrGLFunction<GrGLGetTextureSamplerHandleProc> fGetTextureSamplerHandle; |
| 336 | GrGLFunction<GrGLMakeTextureHandleResidentProc> fMakeTextureHandleResident; |
| 337 | GrGLFunction<GrGLMakeTextureHandleNonResidentProc> fMakeTextureHandleNonResident; |
| 338 | GrGLFunction<GrGLGetImageHandleProc> fGetImageHandle; |
| 339 | GrGLFunction<GrGLMakeImageHandleResidentProc> fMakeImageHandleResident; |
| 340 | GrGLFunction<GrGLMakeImageHandleNonResidentProc> fMakeImageHandleNonResident; |
| 341 | GrGLFunction<GrGLIsTextureHandleResidentProc> fIsTextureHandleResident; |
| 342 | GrGLFunction<GrGLIsImageHandleResidentProc> fIsImageHandleResident; |
| 343 | GrGLFunction<GrGLUniformHandleui64Proc> fUniformHandleui64; |
| 344 | GrGLFunction<GrGLUniformHandleui64vProc> fUniformHandleui64v; |
| 345 | GrGLFunction<GrGLProgramUniformHandleui64Proc> fProgramUniformHandleui64; |
| 346 | GrGLFunction<GrGLProgramUniformHandleui64vProc> fProgramUniformHandleui64v; |
cdalton | 626e1ff | 2015-06-12 13:56:46 -0700 | [diff] [blame] | 347 | |
ethannicholas | 28ef445 | 2016-03-25 09:26:03 -0700 | [diff] [blame] | 348 | /* ARB_sample_shading */ |
| 349 | GrGLFunction<GrGLMinSampleShadingProc> fMinSampleShading; |
| 350 | |
cdalton | 626e1ff | 2015-06-12 13:56:46 -0700 | [diff] [blame] | 351 | /* EXT_direct_state_access */ |
| 352 | // We use the EXT verson because it is more expansive and interacts with more extensions |
| 353 | // than the ARB or core (4.5) versions. We may switch and/or omit methods in the future. |
bsalomon | 9f2dc27 | 2016-02-08 07:22:17 -0800 | [diff] [blame] | 354 | GrGLFunction<GrGLTextureParameteriProc> fTextureParameteri; |
| 355 | GrGLFunction<GrGLTextureParameterivProc> fTextureParameteriv; |
| 356 | GrGLFunction<GrGLTextureParameterfProc> fTextureParameterf; |
| 357 | GrGLFunction<GrGLTextureParameterfvProc> fTextureParameterfv; |
| 358 | GrGLFunction<GrGLTextureImage1DProc> fTextureImage1D; |
| 359 | GrGLFunction<GrGLTextureImage2DProc> fTextureImage2D; |
| 360 | GrGLFunction<GrGLTextureSubImage1DProc> fTextureSubImage1D; |
| 361 | GrGLFunction<GrGLTextureSubImage2DProc> fTextureSubImage2D; |
| 362 | GrGLFunction<GrGLCopyTextureImage1DProc> fCopyTextureImage1D; |
| 363 | GrGLFunction<GrGLCopyTextureImage2DProc> fCopyTextureImage2D; |
| 364 | GrGLFunction<GrGLCopyTextureSubImage1DProc> fCopyTextureSubImage1D; |
| 365 | GrGLFunction<GrGLCopyTextureSubImage2DProc> fCopyTextureSubImage2D; |
| 366 | GrGLFunction<GrGLGetTextureImageProc> fGetTextureImage; |
| 367 | GrGLFunction<GrGLGetTextureParameterfvProc> fGetTextureParameterfv; |
| 368 | GrGLFunction<GrGLGetTextureParameterivProc> fGetTextureParameteriv; |
| 369 | GrGLFunction<GrGLGetTextureLevelParameterfvProc> fGetTextureLevelParameterfv; |
| 370 | GrGLFunction<GrGLGetTextureLevelParameterivProc> fGetTextureLevelParameteriv; |
cdalton | 626e1ff | 2015-06-12 13:56:46 -0700 | [diff] [blame] | 371 | // OpenGL 1.2 |
bsalomon | 9f2dc27 | 2016-02-08 07:22:17 -0800 | [diff] [blame] | 372 | GrGLFunction<GrGLTextureImage3DProc> fTextureImage3D; |
| 373 | GrGLFunction<GrGLTextureSubImage3DProc> fTextureSubImage3D; |
| 374 | GrGLFunction<GrGLCopyTextureSubImage3DProc> fCopyTextureSubImage3D; |
| 375 | GrGLFunction<GrGLCompressedTextureImage3DProc> fCompressedTextureImage3D; |
| 376 | GrGLFunction<GrGLCompressedTextureImage2DProc> fCompressedTextureImage2D; |
| 377 | GrGLFunction<GrGLCompressedTextureImage1DProc> fCompressedTextureImage1D; |
| 378 | GrGLFunction<GrGLCompressedTextureSubImage3DProc> fCompressedTextureSubImage3D; |
| 379 | GrGLFunction<GrGLCompressedTextureSubImage2DProc> fCompressedTextureSubImage2D; |
| 380 | GrGLFunction<GrGLCompressedTextureSubImage1DProc> fCompressedTextureSubImage1D; |
| 381 | GrGLFunction<GrGLGetCompressedTextureImageProc> fGetCompressedTextureImage; |
cdalton | 626e1ff | 2015-06-12 13:56:46 -0700 | [diff] [blame] | 382 | // OpenGL 1.5 |
bsalomon | 9f2dc27 | 2016-02-08 07:22:17 -0800 | [diff] [blame] | 383 | GrGLFunction<GrGLNamedBufferDataProc> fNamedBufferData; |
| 384 | GrGLFunction<GrGLNamedBufferSubDataProc> fNamedBufferSubData; |
| 385 | GrGLFunction<GrGLMapNamedBufferProc> fMapNamedBuffer; |
| 386 | GrGLFunction<GrGLUnmapNamedBufferProc> fUnmapNamedBuffer; |
| 387 | GrGLFunction<GrGLGetNamedBufferParameterivProc> fGetNamedBufferParameteriv; |
| 388 | GrGLFunction<GrGLGetNamedBufferPointervProc> fGetNamedBufferPointerv; |
| 389 | GrGLFunction<GrGLGetNamedBufferSubDataProc> fGetNamedBufferSubData; |
cdalton | 626e1ff | 2015-06-12 13:56:46 -0700 | [diff] [blame] | 390 | // OpenGL 2.0 |
bsalomon | 9f2dc27 | 2016-02-08 07:22:17 -0800 | [diff] [blame] | 391 | GrGLFunction<GrGLProgramUniform1fProc> fProgramUniform1f; |
| 392 | GrGLFunction<GrGLProgramUniform2fProc> fProgramUniform2f; |
| 393 | GrGLFunction<GrGLProgramUniform3fProc> fProgramUniform3f; |
| 394 | GrGLFunction<GrGLProgramUniform4fProc> fProgramUniform4f; |
| 395 | GrGLFunction<GrGLProgramUniform1iProc> fProgramUniform1i; |
| 396 | GrGLFunction<GrGLProgramUniform2iProc> fProgramUniform2i; |
| 397 | GrGLFunction<GrGLProgramUniform3iProc> fProgramUniform3i; |
| 398 | GrGLFunction<GrGLProgramUniform4iProc> fProgramUniform4i; |
| 399 | GrGLFunction<GrGLProgramUniform1fvProc> fProgramUniform1fv; |
| 400 | GrGLFunction<GrGLProgramUniform2fvProc> fProgramUniform2fv; |
| 401 | GrGLFunction<GrGLProgramUniform3fvProc> fProgramUniform3fv; |
| 402 | GrGLFunction<GrGLProgramUniform4fvProc> fProgramUniform4fv; |
| 403 | GrGLFunction<GrGLProgramUniform1ivProc> fProgramUniform1iv; |
| 404 | GrGLFunction<GrGLProgramUniform2ivProc> fProgramUniform2iv; |
| 405 | GrGLFunction<GrGLProgramUniform3ivProc> fProgramUniform3iv; |
| 406 | GrGLFunction<GrGLProgramUniform4ivProc> fProgramUniform4iv; |
| 407 | GrGLFunction<GrGLProgramUniformMatrix2fvProc> fProgramUniformMatrix2fv; |
| 408 | GrGLFunction<GrGLProgramUniformMatrix3fvProc> fProgramUniformMatrix3fv; |
| 409 | GrGLFunction<GrGLProgramUniformMatrix4fvProc> fProgramUniformMatrix4fv; |
cdalton | 626e1ff | 2015-06-12 13:56:46 -0700 | [diff] [blame] | 410 | // OpenGL 2.1 |
bsalomon | 9f2dc27 | 2016-02-08 07:22:17 -0800 | [diff] [blame] | 411 | GrGLFunction<GrGLProgramUniformMatrix2x3fvProc> fProgramUniformMatrix2x3fv; |
| 412 | GrGLFunction<GrGLProgramUniformMatrix3x2fvProc> fProgramUniformMatrix3x2fv; |
| 413 | GrGLFunction<GrGLProgramUniformMatrix2x4fvProc> fProgramUniformMatrix2x4fv; |
| 414 | GrGLFunction<GrGLProgramUniformMatrix4x2fvProc> fProgramUniformMatrix4x2fv; |
| 415 | GrGLFunction<GrGLProgramUniformMatrix3x4fvProc> fProgramUniformMatrix3x4fv; |
| 416 | GrGLFunction<GrGLProgramUniformMatrix4x3fvProc> fProgramUniformMatrix4x3fv; |
cdalton | 626e1ff | 2015-06-12 13:56:46 -0700 | [diff] [blame] | 417 | // OpenGL 3.0 |
bsalomon | 9f2dc27 | 2016-02-08 07:22:17 -0800 | [diff] [blame] | 418 | GrGLFunction<GrGLNamedRenderbufferStorageProc> fNamedRenderbufferStorage; |
| 419 | GrGLFunction<GrGLGetNamedRenderbufferParameterivProc> fGetNamedRenderbufferParameteriv; |
| 420 | GrGLFunction<GrGLNamedRenderbufferStorageMultisampleProc> fNamedRenderbufferStorageMultisample; |
| 421 | GrGLFunction<GrGLCheckNamedFramebufferStatusProc> fCheckNamedFramebufferStatus; |
| 422 | GrGLFunction<GrGLNamedFramebufferTexture1DProc> fNamedFramebufferTexture1D; |
| 423 | GrGLFunction<GrGLNamedFramebufferTexture2DProc> fNamedFramebufferTexture2D; |
| 424 | GrGLFunction<GrGLNamedFramebufferTexture3DProc> fNamedFramebufferTexture3D; |
| 425 | GrGLFunction<GrGLNamedFramebufferRenderbufferProc> fNamedFramebufferRenderbuffer; |
| 426 | GrGLFunction<GrGLGetNamedFramebufferAttachmentParameterivProc> fGetNamedFramebufferAttachmentParameteriv; |
| 427 | GrGLFunction<GrGLGenerateTextureMipmapProc> fGenerateTextureMipmap; |
| 428 | GrGLFunction<GrGLFramebufferDrawBufferProc> fFramebufferDrawBuffer; |
| 429 | GrGLFunction<GrGLFramebufferDrawBuffersProc> fFramebufferDrawBuffers; |
| 430 | GrGLFunction<GrGLFramebufferReadBufferProc> fFramebufferReadBuffer; |
| 431 | GrGLFunction<GrGLGetFramebufferParameterivProc> fGetFramebufferParameteriv; |
| 432 | GrGLFunction<GrGLNamedCopyBufferSubDataProc> fNamedCopyBufferSubData; |
| 433 | GrGLFunction<GrGLVertexArrayVertexOffsetProc> fVertexArrayVertexOffset; |
| 434 | GrGLFunction<GrGLVertexArrayColorOffsetProc> fVertexArrayColorOffset; |
| 435 | GrGLFunction<GrGLVertexArrayEdgeFlagOffsetProc> fVertexArrayEdgeFlagOffset; |
| 436 | GrGLFunction<GrGLVertexArrayIndexOffsetProc> fVertexArrayIndexOffset; |
| 437 | GrGLFunction<GrGLVertexArrayNormalOffsetProc> fVertexArrayNormalOffset; |
| 438 | GrGLFunction<GrGLVertexArrayTexCoordOffsetProc> fVertexArrayTexCoordOffset; |
| 439 | GrGLFunction<GrGLVertexArrayMultiTexCoordOffsetProc> fVertexArrayMultiTexCoordOffset; |
| 440 | GrGLFunction<GrGLVertexArrayFogCoordOffsetProc> fVertexArrayFogCoordOffset; |
| 441 | GrGLFunction<GrGLVertexArraySecondaryColorOffsetProc> fVertexArraySecondaryColorOffset; |
| 442 | GrGLFunction<GrGLVertexArrayVertexAttribOffsetProc> fVertexArrayVertexAttribOffset; |
| 443 | GrGLFunction<GrGLVertexArrayVertexAttribIOffsetProc> fVertexArrayVertexAttribIOffset; |
| 444 | GrGLFunction<GrGLEnableVertexArrayProc> fEnableVertexArray; |
| 445 | GrGLFunction<GrGLDisableVertexArrayProc> fDisableVertexArray; |
| 446 | GrGLFunction<GrGLEnableVertexArrayAttribProc> fEnableVertexArrayAttrib; |
| 447 | GrGLFunction<GrGLDisableVertexArrayAttribProc> fDisableVertexArrayAttrib; |
| 448 | GrGLFunction<GrGLGetVertexArrayIntegervProc> fGetVertexArrayIntegerv; |
| 449 | GrGLFunction<GrGLGetVertexArrayPointervProc> fGetVertexArrayPointerv; |
| 450 | GrGLFunction<GrGLGetVertexArrayIntegeri_vProc> fGetVertexArrayIntegeri_v; |
| 451 | GrGLFunction<GrGLGetVertexArrayPointeri_vProc> fGetVertexArrayPointeri_v; |
| 452 | GrGLFunction<GrGLMapNamedBufferRangeProc> fMapNamedBufferRange; |
| 453 | GrGLFunction<GrGLFlushMappedNamedBufferRangeProc> fFlushMappedNamedBufferRange; |
cdalton | c04ce67 | 2016-03-11 14:07:38 -0800 | [diff] [blame] | 454 | // OpenGL 3.1 |
| 455 | GrGLFunction<GrGLTextureBufferProc> fTextureBuffer; |
cdalton | 626e1ff | 2015-06-12 13:56:46 -0700 | [diff] [blame] | 456 | |
jvanverth | 84741b3 | 2016-09-30 08:39:02 -0700 | [diff] [blame] | 457 | /* ARB_sync */ |
| 458 | GrGLFunction<GrGLFenceSyncProc> fFenceSync; |
Greg Daniel | dba7e7c | 2017-07-20 15:47:30 -0400 | [diff] [blame^] | 459 | GrGLFunction<GrGLIsSyncProc> fIsSync; |
jvanverth | 84741b3 | 2016-09-30 08:39:02 -0700 | [diff] [blame] | 460 | GrGLFunction<GrGLClientWaitSyncProc> fClientWaitSync; |
Greg Daniel | 6be3523 | 2017-03-01 17:01:09 -0500 | [diff] [blame] | 461 | GrGLFunction<GrGLWaitSyncProc> fWaitSync; |
jvanverth | 84741b3 | 2016-09-30 08:39:02 -0700 | [diff] [blame] | 462 | GrGLFunction<GrGLDeleteSyncProc> fDeleteSync; |
| 463 | |
Greg Daniel | 81e7bf8 | 2017-07-19 14:47:42 -0400 | [diff] [blame] | 464 | /* ARB_internalforamt_query */ |
| 465 | GrGLFunction<GrGLGetInternalformativProc> fGetInternalformativ; |
| 466 | |
cdalton | 626e1ff | 2015-06-12 13:56:46 -0700 | [diff] [blame] | 467 | /* KHR_debug */ |
bsalomon | 9f2dc27 | 2016-02-08 07:22:17 -0800 | [diff] [blame] | 468 | GrGLFunction<GrGLDebugMessageControlProc> fDebugMessageControl; |
| 469 | GrGLFunction<GrGLDebugMessageInsertProc> fDebugMessageInsert; |
| 470 | GrGLFunction<GrGLDebugMessageCallbackProc> fDebugMessageCallback; |
| 471 | GrGLFunction<GrGLGetDebugMessageLogProc> fGetDebugMessageLog; |
| 472 | GrGLFunction<GrGLPushDebugGroupProc> fPushDebugGroup; |
| 473 | GrGLFunction<GrGLPopDebugGroupProc> fPopDebugGroup; |
| 474 | GrGLFunction<GrGLObjectLabelProc> fObjectLabel; |
bsalomon | b1a32ad | 2015-11-16 06:48:44 -0800 | [diff] [blame] | 475 | |
csmartdalton | 9bc1187 | 2016-08-09 12:42:47 -0700 | [diff] [blame] | 476 | /* EXT_window_rectangles */ |
| 477 | GrGLFunction<GrGLWindowRectanglesProc> fWindowRectangles; |
| 478 | |
bsalomon | b1a32ad | 2015-11-16 06:48:44 -0800 | [diff] [blame] | 479 | /* EGL functions */ |
bsalomon | 9f2dc27 | 2016-02-08 07:22:17 -0800 | [diff] [blame] | 480 | GrGLFunction<GrEGLCreateImageProc> fEGLCreateImage; |
| 481 | GrGLFunction<GrEGLDestroyImageProc> fEGLDestroyImage; |
commit-bot@chromium.org | c72425a | 2014-01-21 16:09:18 +0000 | [diff] [blame] | 482 | } fFunctions; |
| 483 | |
bsalomon | 944bcf0 | 2014-07-29 08:01:52 -0700 | [diff] [blame] | 484 | // This exists for internal testing. |
| 485 | virtual void abandon() const {} |
bsalomon@google.com | bf2a469 | 2011-05-04 12:35:39 +0000 | [diff] [blame] | 486 | }; |
twiz@google.com | 59a190b | 2011-03-14 21:23:01 +0000 | [diff] [blame] | 487 | |
| 488 | #endif |