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