blob: 44a9c7ca2a3a87c9421a60f73f73c5ee2e28e7d9 [file] [log] [blame]
twiz@google.com59a190b2011-03-14 21:23:01 +00001/*
epoger@google.comec3ed6a2011-07-28 14:26:00 +00002 * 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.com59a190b2011-03-14 21:23:01 +00006 */
7
twiz@google.com59a190b2011-03-14 21:23:01 +00008#ifndef GrGLInterface_DEFINED
9#define GrGLInterface_DEFINED
10
bsalomon@google.com637d5e92012-05-07 21:33:56 +000011#include "GrGLFunctions.h"
commit-bot@chromium.orga4de8c22013-09-09 13:38:37 +000012#include "SkRefCnt.h"
twiz@google.com59a190b2011-03-14 21:23:01 +000013
twiz@google.com59a190b2011-03-14 21:23:01 +000014////////////////////////////////////////////////////////////////////////////////
15
16/**
bsalomon@google.com89ec61e2012-02-10 20:05:18 +000017 * Classifies GL contexts (currently as Desktop vs. ES2). This is a bitfield.
18 * A GrGLInterface (defined below) may support multiple bindings.
19 */
20enum GrGLBinding {
21 kNone_GrGLBinding = 0x0,
22
23 kDesktop_GrGLBinding = 0x01,
bsalomon@google.comeb170702013-08-15 18:57:53 +000024 kES_GrGLBinding = 0x02, // ES2+ only
bsalomon@google.com89ec61e2012-02-10 20:05:18 +000025
26 // for iteration of GrGLBindings
bsalomon@google.comb447d212012-02-10 20:25:36 +000027 kFirstGrGLBinding = kDesktop_GrGLBinding,
bsalomon@google.comeb170702013-08-15 18:57:53 +000028 kLastGrGLBinding = kES_GrGLBinding
bsalomon@google.com89ec61e2012-02-10 20:05:18 +000029};
30
bsalomon@google.com46b450a2013-08-15 19:45:26 +000031// Temporary alias until Chromium can be updated.
32static const GrGLBinding kES2_GrGLBinding = kES_GrGLBinding;
33
bsalomon@google.com89ec61e2012-02-10 20:05:18 +000034////////////////////////////////////////////////////////////////////////////////
35
36/**
bsalomon@google.com0b77d682011-08-19 13:28:54 +000037 * Rather than depend on platform-specific GL headers and libraries, we require
38 * the client to provide a struct of GL function pointers. This struct can be
39 * specified per-GrContext as a parameter to GrContext::Create. If NULL is
40 * passed to Create then the "default" GL interface is used. If the default is
41 * also NULL GrContext creation will fail.
42 *
bsalomon@google.com6fb736f2011-09-16 18:51:57 +000043 * The default interface is returned by GrGLDefaultInterface. This function's
robertphillips@google.com0da37192012-03-19 14:42:13 +000044 * implementation is platform-specific. Several have been provided, along with
45 * an implementation that simply returns NULL. It is implementation-specific
bsalomon@google.com6fb736f2011-09-16 18:51:57 +000046 * whether the same GrGLInterface is returned or whether a new one is created
47 * at each call. Some platforms may not be able to use a single GrGLInterface
48 * because extension function ptrs vary across contexts. Note that GrGLInterface
rmistry@google.comfbfcd562012-08-23 18:09:54 +000049 * is ref-counted. So if the same object is returned by multiple calls to
bsalomon@google.com6fb736f2011-09-16 18:51:57 +000050 * GrGLDefaultInterface, each should bump the ref count.
bsalomon@google.com56bfc5a2011-09-01 13:28:16 +000051 *
52 * By defining GR_GL_PER_GL_CALL_IFACE_CALLBACK to 1 the client can specify a
53 * callback function that will be called prior to each GL function call. See
54 * comments in GrGLConfig.h
twiz@google.com59a190b2011-03-14 21:23:01 +000055 */
twiz@google.com59a190b2011-03-14 21:23:01 +000056
bsalomon@google.com0b77d682011-08-19 13:28:54 +000057struct GrGLInterface;
58
bsalomon@google.com6fb736f2011-09-16 18:51:57 +000059const GrGLInterface* GrGLDefaultInterface();
twiz@google.com59a190b2011-03-14 21:23:01 +000060
bsalomon@google.com57f5d982011-10-24 21:17:53 +000061/**
62 * Creates a GrGLInterface for a "native" GL context (e.g. WGL on windows,
63 * GLX on linux, AGL on Mac). On platforms that have context-specific function
rmistry@google.comfbfcd562012-08-23 18:09:54 +000064 * pointers for GL extensions (e.g. windows) the returned interface is only
bsalomon@google.com57f5d982011-10-24 21:17:53 +000065 * valid for the context that was current at creation.
66 */
bsalomon@google.com373a6632011-10-19 20:43:20 +000067const GrGLInterface* GrGLCreateNativeInterface();
68
robertphillips@google.comd3b9fbb2012-03-28 16:19:11 +000069#if SK_MESA
bsalomon@google.com57f5d982011-10-24 21:17:53 +000070/**
71 * Creates a GrGLInterface for an OSMesa context.
72 */
bsalomon@google.com373a6632011-10-19 20:43:20 +000073const GrGLInterface* GrGLCreateMesaInterface();
robertphillips@google.comd3b9fbb2012-03-28 16:19:11 +000074#endif
75
76#if SK_ANGLE
77/**
78 * Creates a GrGLInterface for an ANGLE context.
79 */
80const GrGLInterface* GrGLCreateANGLEInterface();
81#endif
bsalomon@google.com373a6632011-10-19 20:43:20 +000082
bsalomon@google.com74913722011-10-27 20:44:19 +000083/**
84 * Creates a null GrGLInterface that doesn't draw anything. Used for measuring
85 * CPU overhead.
86 */
87const GrGLInterface* GrGLCreateNullInterface();
88
robertphillips@google.com0da37192012-03-19 14:42:13 +000089/**
rmistry@google.comfbfcd562012-08-23 18:09:54 +000090 * Creates a debugging GrGLInterface that doesn't draw anything. Used for
robertphillips@google.com0da37192012-03-19 14:42:13 +000091 * finding memory leaks and invalid memory accesses.
92 */
93const GrGLInterface* GrGLCreateDebugInterface();
94
bsalomon@google.com56bfc5a2011-09-01 13:28:16 +000095#if GR_GL_PER_GL_FUNC_CALLBACK
96typedef void (*GrGLInterfaceCallbackProc)(const GrGLInterface*);
97typedef intptr_t GrGLInterfaceCallbackData;
98#endif
99
bsalomon@google.combf2a4692011-05-04 12:35:39 +0000100/*
bsalomon@google.comcc61b172012-05-07 21:45:48 +0000101 * GrContext uses the following interface to make all calls into OpenGL. When a
102 * GrContext is created it is given a GrGLInterface. The interface's function
103 * pointers must be valid for the OpenGL context associated with the GrContext.
104 * On some platforms, such as Windows, function pointers for OpenGL extensions
105 * may vary between OpenGL contexts. So the caller must be careful to use a
106 * GrGLInterface initialized for the correct context. All functions that should
107 * be available based on the OpenGL's version and extension string must be
108 * non-NULL or GrContext creation will fail. This can be tested with the
109 * validate() method when the OpenGL context has been made current.
bsalomon@google.combf2a4692011-05-04 12:35:39 +0000110 */
commit-bot@chromium.orga4de8c22013-09-09 13:38:37 +0000111struct SK_API GrGLInterface : public SkRefCnt {
bsalomon@google.comba800e22012-03-29 21:04:52 +0000112private:
bsalomon@google.com9c1f1ac2012-05-07 17:09:37 +0000113 // simple wrapper class that exists only to initialize a pointer to NULL
bsalomon@google.comba800e22012-03-29 21:04:52 +0000114 template <typename FNPTR_TYPE> class GLPtr {
115 public:
116 GLPtr() : fPtr(NULL) {}
117 GLPtr operator =(FNPTR_TYPE ptr) { fPtr = ptr; return *this; }
118 operator FNPTR_TYPE() const { return fPtr; }
119 private:
120 FNPTR_TYPE fPtr;
121 };
bsalomon@google.com0b77d682011-08-19 13:28:54 +0000122
commit-bot@chromium.orga4de8c22013-09-09 13:38:37 +0000123 typedef SkRefCnt INHERITED;
robertphillips@google.com15e9d3e2012-06-21 20:25:03 +0000124
bsalomon@google.comba800e22012-03-29 21:04:52 +0000125public:
robertphillips@google.com15e9d3e2012-06-21 20:25:03 +0000126 SK_DECLARE_INST_COUNT(GrGLInterface)
127
bsalomon@google.com0b77d682011-08-19 13:28:54 +0000128 GrGLInterface();
129
bsalomon@google.com89ec61e2012-02-10 20:05:18 +0000130 // Validates that the GrGLInterface supports a binding. This means that
131 // the GrGLinterface advertises the binding in fBindingsExported and all
bsalomon@google.comcc61b172012-05-07 21:45:48 +0000132 // the necessary function pointers have been initialized. The interface is
133 // validated for the current OpenGL context.
bsalomon@google.com89ec61e2012-02-10 20:05:18 +0000134 bool validate(GrGLBinding binding) const;
135
twiz@google.comb65e0cb2011-03-18 20:41:44 +0000136 // Indicator variable specifying the type of GL implementation
bsalomon@google.comba800e22012-03-29 21:04:52 +0000137 // exported: GLES2 and/or Desktop.
twiz@google.comb65e0cb2011-03-18 20:41:44 +0000138 GrGLBinding fBindingsExported;
139
bsalomon@google.comba800e22012-03-29 21:04:52 +0000140 GLPtr<GrGLActiveTextureProc> fActiveTexture;
141 GLPtr<GrGLAttachShaderProc> fAttachShader;
142 GLPtr<GrGLBeginQueryProc> fBeginQuery;
143 GLPtr<GrGLBindAttribLocationProc> fBindAttribLocation;
144 GLPtr<GrGLBindBufferProc> fBindBuffer;
145 GLPtr<GrGLBindFragDataLocationProc> fBindFragDataLocation;
146 GLPtr<GrGLBindFragDataLocationIndexedProc> fBindFragDataLocationIndexed;
147 GLPtr<GrGLBindFramebufferProc> fBindFramebuffer;
148 GLPtr<GrGLBindRenderbufferProc> fBindRenderbuffer;
149 GLPtr<GrGLBindTextureProc> fBindTexture;
bsalomon@google.comecd84842013-03-01 15:36:02 +0000150 GLPtr<GrGLBindVertexArrayProc> fBindVertexArray;
bsalomon@google.comba800e22012-03-29 21:04:52 +0000151 GLPtr<GrGLBlendColorProc> fBlendColor;
152 GLPtr<GrGLBlendFuncProc> fBlendFunc;
153 GLPtr<GrGLBlitFramebufferProc> fBlitFramebuffer;
154 GLPtr<GrGLBufferDataProc> fBufferData;
155 GLPtr<GrGLBufferSubDataProc> fBufferSubData;
156 GLPtr<GrGLCheckFramebufferStatusProc> fCheckFramebufferStatus;
157 GLPtr<GrGLClearProc> fClear;
158 GLPtr<GrGLClearColorProc> fClearColor;
159 GLPtr<GrGLClearStencilProc> fClearStencil;
commit-bot@chromium.org46fbfe02013-08-30 15:52:12 +0000160 GLPtr<GrGLClientActiveTextureProc> fClientActiveTexture;
bsalomon@google.comba800e22012-03-29 21:04:52 +0000161 GLPtr<GrGLColorMaskProc> fColorMask;
bsalomon@google.comba800e22012-03-29 21:04:52 +0000162 GLPtr<GrGLCompileShaderProc> fCompileShader;
163 GLPtr<GrGLCompressedTexImage2DProc> fCompressedTexImage2D;
commit-bot@chromium.org98168bb2013-04-11 22:00:34 +0000164 GLPtr<GrGLCopyTexSubImage2DProc> fCopyTexSubImage2D;
bsalomon@google.comba800e22012-03-29 21:04:52 +0000165 GLPtr<GrGLCreateProgramProc> fCreateProgram;
166 GLPtr<GrGLCreateShaderProc> fCreateShader;
167 GLPtr<GrGLCullFaceProc> fCullFace;
168 GLPtr<GrGLDeleteBuffersProc> fDeleteBuffers;
169 GLPtr<GrGLDeleteFramebuffersProc> fDeleteFramebuffers;
170 GLPtr<GrGLDeleteProgramProc> fDeleteProgram;
171 GLPtr<GrGLDeleteQueriesProc> fDeleteQueries;
172 GLPtr<GrGLDeleteRenderbuffersProc> fDeleteRenderbuffers;
173 GLPtr<GrGLDeleteShaderProc> fDeleteShader;
174 GLPtr<GrGLDeleteTexturesProc> fDeleteTextures;
bsalomon@google.comecd84842013-03-01 15:36:02 +0000175 GLPtr<GrGLDeleteVertexArraysProc> fDeleteVertexArrays;
bsalomon@google.comba800e22012-03-29 21:04:52 +0000176 GLPtr<GrGLDepthMaskProc> fDepthMask;
177 GLPtr<GrGLDisableProc> fDisable;
commit-bot@chromium.org46fbfe02013-08-30 15:52:12 +0000178 GLPtr<GrGLDisableClientStateProc> fDisableClientState;
bsalomon@google.comba800e22012-03-29 21:04:52 +0000179 GLPtr<GrGLDisableVertexAttribArrayProc> fDisableVertexAttribArray;
180 GLPtr<GrGLDrawArraysProc> fDrawArrays;
181 GLPtr<GrGLDrawBufferProc> fDrawBuffer;
182 GLPtr<GrGLDrawBuffersProc> fDrawBuffers;
183 GLPtr<GrGLDrawElementsProc> fDrawElements;
184 GLPtr<GrGLEnableProc> fEnable;
commit-bot@chromium.org46fbfe02013-08-30 15:52:12 +0000185 GLPtr<GrGLEnableClientStateProc> fEnableClientState;
bsalomon@google.comba800e22012-03-29 21:04:52 +0000186 GLPtr<GrGLEnableVertexAttribArrayProc> fEnableVertexAttribArray;
187 GLPtr<GrGLEndQueryProc> fEndQuery;
188 GLPtr<GrGLFinishProc> fFinish;
189 GLPtr<GrGLFlushProc> fFlush;
190 GLPtr<GrGLFramebufferRenderbufferProc> fFramebufferRenderbuffer;
191 GLPtr<GrGLFramebufferTexture2DProc> fFramebufferTexture2D;
bsalomon@google.comf3a60c02013-03-19 19:06:09 +0000192 GLPtr<GrGLFramebufferTexture2DMultisampleProc> fFramebufferTexture2DMultisample;
bsalomon@google.comba800e22012-03-29 21:04:52 +0000193 GLPtr<GrGLFrontFaceProc> fFrontFace;
194 GLPtr<GrGLGenBuffersProc> fGenBuffers;
195 GLPtr<GrGLGenFramebuffersProc> fGenFramebuffers;
commit-bot@chromium.orgcffff792013-07-26 16:36:04 +0000196 GLPtr<GrGLGenerateMipmapProc> fGenerateMipmap;
bsalomon@google.comba800e22012-03-29 21:04:52 +0000197 GLPtr<GrGLGenQueriesProc> fGenQueries;
198 GLPtr<GrGLGenRenderbuffersProc> fGenRenderbuffers;
199 GLPtr<GrGLGenTexturesProc> fGenTextures;
bsalomon@google.comecd84842013-03-01 15:36:02 +0000200 GLPtr<GrGLGenVertexArraysProc> fGenVertexArrays;
bsalomon@google.comba800e22012-03-29 21:04:52 +0000201 GLPtr<GrGLGetBufferParameterivProc> fGetBufferParameteriv;
202 GLPtr<GrGLGetErrorProc> fGetError;
203 GLPtr<GrGLGetFramebufferAttachmentParameterivProc> fGetFramebufferAttachmentParameteriv;
204 GLPtr<GrGLGetIntegervProc> fGetIntegerv;
205 GLPtr<GrGLGetQueryObjecti64vProc> fGetQueryObjecti64v;
206 GLPtr<GrGLGetQueryObjectivProc> fGetQueryObjectiv;
207 GLPtr<GrGLGetQueryObjectui64vProc> fGetQueryObjectui64v;
208 GLPtr<GrGLGetQueryObjectuivProc> fGetQueryObjectuiv;
209 GLPtr<GrGLGetQueryivProc> fGetQueryiv;
210 GLPtr<GrGLGetProgramInfoLogProc> fGetProgramInfoLog;
211 GLPtr<GrGLGetProgramivProc> fGetProgramiv;
212 GLPtr<GrGLGetRenderbufferParameterivProc> fGetRenderbufferParameteriv;
213 GLPtr<GrGLGetShaderInfoLogProc> fGetShaderInfoLog;
214 GLPtr<GrGLGetShaderivProc> fGetShaderiv;
215 GLPtr<GrGLGetStringProc> fGetString;
bsalomon@google.com1744f972013-02-26 21:46:32 +0000216 GLPtr<GrGLGetStringiProc> fGetStringi;
bsalomon@google.comba800e22012-03-29 21:04:52 +0000217 GLPtr<GrGLGetTexLevelParameterivProc> fGetTexLevelParameteriv;
218 GLPtr<GrGLGetUniformLocationProc> fGetUniformLocation;
219 GLPtr<GrGLLineWidthProc> fLineWidth;
220 GLPtr<GrGLLinkProgramProc> fLinkProgram;
commit-bot@chromium.orgf5897f82013-09-03 17:50:50 +0000221 GLPtr<GrGLLoadIdentityProc> fLoadIdentity;
222 GLPtr<GrGLLoadMatrixfProc> fLoadMatrixf;
bsalomon@google.comba800e22012-03-29 21:04:52 +0000223 GLPtr<GrGLMapBufferProc> fMapBuffer;
commit-bot@chromium.orgf5897f82013-09-03 17:50:50 +0000224 GLPtr<GrGLMatrixModeProc> fMatrixMode;
bsalomon@google.comba800e22012-03-29 21:04:52 +0000225 GLPtr<GrGLPixelStoreiProc> fPixelStorei;
226 GLPtr<GrGLQueryCounterProc> fQueryCounter;
227 GLPtr<GrGLReadBufferProc> fReadBuffer;
228 GLPtr<GrGLReadPixelsProc> fReadPixels;
229 GLPtr<GrGLRenderbufferStorageProc> fRenderbufferStorage;
commit-bot@chromium.orga8e5a062013-09-05 23:44:09 +0000230
231#if !GR_GL_IGNORE_ES3_MSAA
232 // On OpenGL ES there are multiple incompatible extensions that add support for MSAA
233 // and ES3 adds MSAA support to the standard. On an ES3 driver we may still use the
234 // older extensions for performance reasons or due to ES3 driver bugs. We want the function
235 // that creates the GrGLInterface to provide all available functions and internally
236 // we will select among them. They all have a method called glRenderbufferStorageMultisample*.
237 // So we have separate function pointers for GL_IMG/EXT_multisampled_to_texture,
238 // GL_CHROMIUM/ANGLE_framebuffer_multisample/ES3, and GL_APPLE_framebuffer_multisample
239 // variations.
240 //
241 // If a driver supports multiple GL_ARB_framebuffer_multisample-style extensions then we will
242 // assume the function pointers for the standard (or equivalent GL_ARB) version have
243 // been preferred over GL_EXT, GL_CHROMIUM, or GL_ANGLE variations that have reduced
244 // functionality.
245
246 // GL_EXT_multisampled_render_to_texture (preferred) or GL_IMG_multisampled_render_to_texture
247 GLPtr<GrGLRenderbufferStorageMultisampleProc> fRenderbufferStorageMultisampleES2EXT;
248 // GL_APPLE_framebuffer_multisample
249 GLPtr<GrGLRenderbufferStorageMultisampleProc> fRenderbufferStorageMultisampleES2APPLE;
250#endif
251 // This is used to store the pointer for GL_ARB/EXT/ANGLE/CHROMIUM_framebuffer_multisample or
252 // the standard function in ES3+ or GL 3.0+.
bsalomon@google.comba800e22012-03-29 21:04:52 +0000253 GLPtr<GrGLRenderbufferStorageMultisampleProc> fRenderbufferStorageMultisample;
commit-bot@chromium.orga8e5a062013-09-05 23:44:09 +0000254
bsalomon@google.comba800e22012-03-29 21:04:52 +0000255 GLPtr<GrGLResolveMultisampleFramebufferProc> fResolveMultisampleFramebuffer;
256 GLPtr<GrGLScissorProc> fScissor;
257 GLPtr<GrGLShaderSourceProc> fShaderSource;
258 GLPtr<GrGLStencilFuncProc> fStencilFunc;
259 GLPtr<GrGLStencilFuncSeparateProc> fStencilFuncSeparate;
260 GLPtr<GrGLStencilMaskProc> fStencilMask;
261 GLPtr<GrGLStencilMaskSeparateProc> fStencilMaskSeparate;
262 GLPtr<GrGLStencilOpProc> fStencilOp;
263 GLPtr<GrGLStencilOpSeparateProc> fStencilOpSeparate;
commit-bot@chromium.org46fbfe02013-08-30 15:52:12 +0000264 GLPtr<GrGLTexGenfProc> fTexGenf;
265 GLPtr<GrGLTexGenfvProc> fTexGenfv;
266 GLPtr<GrGLTexGeniProc> fTexGeni;
bsalomon@google.comba800e22012-03-29 21:04:52 +0000267 GLPtr<GrGLTexImage2DProc> fTexImage2D;
268 GLPtr<GrGLTexParameteriProc> fTexParameteri;
bsalomon@google.com4d063de2012-05-31 17:59:23 +0000269 GLPtr<GrGLTexParameterivProc> fTexParameteriv;
bsalomon@google.comba800e22012-03-29 21:04:52 +0000270 GLPtr<GrGLTexSubImage2DProc> fTexSubImage2D;
271 GLPtr<GrGLTexStorage2DProc> fTexStorage2D;
robertphillips@google.coma6ffb582013-04-29 16:50:17 +0000272 GLPtr<GrGLDiscardFramebufferProc> fDiscardFramebuffer;
bsalomon@google.comba800e22012-03-29 21:04:52 +0000273 GLPtr<GrGLUniform1fProc> fUniform1f;
274 GLPtr<GrGLUniform1iProc> fUniform1i;
275 GLPtr<GrGLUniform1fvProc> fUniform1fv;
276 GLPtr<GrGLUniform1ivProc> fUniform1iv;
277 GLPtr<GrGLUniform2fProc> fUniform2f;
278 GLPtr<GrGLUniform2iProc> fUniform2i;
279 GLPtr<GrGLUniform2fvProc> fUniform2fv;
280 GLPtr<GrGLUniform2ivProc> fUniform2iv;
281 GLPtr<GrGLUniform3fProc> fUniform3f;
282 GLPtr<GrGLUniform3iProc> fUniform3i;
283 GLPtr<GrGLUniform3fvProc> fUniform3fv;
284 GLPtr<GrGLUniform3ivProc> fUniform3iv;
285 GLPtr<GrGLUniform4fProc> fUniform4f;
286 GLPtr<GrGLUniform4iProc> fUniform4i;
287 GLPtr<GrGLUniform4fvProc> fUniform4fv;
288 GLPtr<GrGLUniform4ivProc> fUniform4iv;
289 GLPtr<GrGLUniformMatrix2fvProc> fUniformMatrix2fv;
290 GLPtr<GrGLUniformMatrix3fvProc> fUniformMatrix3fv;
291 GLPtr<GrGLUniformMatrix4fvProc> fUniformMatrix4fv;
292 GLPtr<GrGLUnmapBufferProc> fUnmapBuffer;
293 GLPtr<GrGLUseProgramProc> fUseProgram;
294 GLPtr<GrGLVertexAttrib4fvProc> fVertexAttrib4fv;
295 GLPtr<GrGLVertexAttribPointerProc> fVertexAttribPointer;
commit-bot@chromium.org46fbfe02013-08-30 15:52:12 +0000296 GLPtr<GrGLVertexPointerProc> fVertexPointer;
bsalomon@google.comba800e22012-03-29 21:04:52 +0000297 GLPtr<GrGLViewportProc> fViewport;
bsalomon@google.com271cffc2011-05-20 14:13:56 +0000298
bsalomon@google.comfe11cb62012-06-06 15:17:54 +0000299 // Experimental: Functions for GL_NV_path_rendering. These will be
rmistry@google.comfbfcd562012-08-23 18:09:54 +0000300 // alphabetized with the above functions once this is fully supported
bsalomon@google.comfe11cb62012-06-06 15:17:54 +0000301 // (and functions we are unlikely to use will possibly be omitted).
bsalomon@google.comfe11cb62012-06-06 15:17:54 +0000302 GLPtr<GrGLPathCommandsProc> fPathCommands;
303 GLPtr<GrGLPathCoordsProc> fPathCoords;
304 GLPtr<GrGLPathSubCommandsProc> fPathSubCommands;
305 GLPtr<GrGLPathSubCoordsProc> fPathSubCoords;
306 GLPtr<GrGLPathStringProc> fPathString;
307 GLPtr<GrGLPathGlyphsProc> fPathGlyphs;
308 GLPtr<GrGLPathGlyphRangeProc> fPathGlyphRange;
309 GLPtr<GrGLWeightPathsProc> fWeightPaths;
310 GLPtr<GrGLCopyPathProc> fCopyPath;
311 GLPtr<GrGLInterpolatePathsProc> fInterpolatePaths;
312 GLPtr<GrGLTransformPathProc> fTransformPath;
313 GLPtr<GrGLPathParameterivProc> fPathParameteriv;
314 GLPtr<GrGLPathParameteriProc> fPathParameteri;
315 GLPtr<GrGLPathParameterfvProc> fPathParameterfv;
316 GLPtr<GrGLPathParameterfProc> fPathParameterf;
317 GLPtr<GrGLPathDashArrayProc> fPathDashArray;
318 GLPtr<GrGLGenPathsProc> fGenPaths;
319 GLPtr<GrGLDeletePathsProc> fDeletePaths;
320 GLPtr<GrGLIsPathProc> fIsPath;
321 GLPtr<GrGLPathStencilFuncProc> fPathStencilFunc;
322 GLPtr<GrGLPathStencilDepthOffsetProc> fPathStencilDepthOffset;
323 GLPtr<GrGLStencilFillPathProc> fStencilFillPath;
324 GLPtr<GrGLStencilStrokePathProc> fStencilStrokePath;
325 GLPtr<GrGLStencilFillPathInstancedProc> fStencilFillPathInstanced;
326 GLPtr<GrGLStencilStrokePathInstancedProc> fStencilStrokePathInstanced;
327 GLPtr<GrGLPathCoverDepthFuncProc> fPathCoverDepthFunc;
328 GLPtr<GrGLPathColorGenProc> fPathColorGen;
329 GLPtr<GrGLPathTexGenProc> fPathTexGen;
330 GLPtr<GrGLPathFogGenProc> fPathFogGen;
331 GLPtr<GrGLCoverFillPathProc> fCoverFillPath;
332 GLPtr<GrGLCoverStrokePathProc> fCoverStrokePath;
333 GLPtr<GrGLCoverFillPathInstancedProc> fCoverFillPathInstanced;
334 GLPtr<GrGLCoverStrokePathInstancedProc> fCoverStrokePathInstanced;
335 GLPtr<GrGLGetPathParameterivProc> fGetPathParameteriv;
336 GLPtr<GrGLGetPathParameterfvProc> fGetPathParameterfv;
337 GLPtr<GrGLGetPathCommandsProc> fGetPathCommands;
338 GLPtr<GrGLGetPathCoordsProc> fGetPathCoords;
339 GLPtr<GrGLGetPathDashArrayProc> fGetPathDashArray;
340 GLPtr<GrGLGetPathMetricsProc> fGetPathMetrics;
341 GLPtr<GrGLGetPathMetricRangeProc> fGetPathMetricRange;
342 GLPtr<GrGLGetPathSpacingProc> fGetPathSpacing;
343 GLPtr<GrGLGetPathColorGenivProc> fGetPathColorGeniv;
344 GLPtr<GrGLGetPathColorGenfvProc> fGetPathColorGenfv;
345 GLPtr<GrGLGetPathTexGenivProc> fGetPathTexGeniv;
346 GLPtr<GrGLGetPathTexGenfvProc> fGetPathTexGenfv;
347 GLPtr<GrGLIsPointInFillPathProc> fIsPointInFillPath;
348 GLPtr<GrGLIsPointInStrokePathProc> fIsPointInStrokePath;
349 GLPtr<GrGLGetPathLengthProc> fGetPathLength;
350 GLPtr<GrGLPointAlongPathProc> fPointAlongPath;
351
bsalomon@google.com56bfc5a2011-09-01 13:28:16 +0000352 // Per-GL func callback
353#if GR_GL_PER_GL_FUNC_CALLBACK
354 GrGLInterfaceCallbackProc fCallback;
355 GrGLInterfaceCallbackData fCallbackData;
356#endif
357
bsalomon@google.combf2a4692011-05-04 12:35:39 +0000358};
twiz@google.com59a190b2011-03-14 21:23:01 +0000359
360#endif