blob: 9438a158665d7c7d75a98038c544637565b2b6e6 [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/**
commit-bot@chromium.org9e90aed2014-01-16 16:35:09 +000017 * Classifies GL contexts by which standard they implement (currently as Desktop
18 * vs. ES).
bsalomon@google.com89ec61e2012-02-10 20:05:18 +000019 */
commit-bot@chromium.org9e90aed2014-01-16 16:35:09 +000020enum GrGLStandard {
21 kNone_GrGLStandard,
22 kGL_GrGLStandard,
23 kGLES_GrGLStandard,
bsalomon@google.com89ec61e2012-02-10 20:05:18 +000024};
25
commit-bot@chromium.orgcc190eb2014-01-16 18:49:01 +000026// Temporary aliases until Chromium can be updated.
27typedef GrGLStandard GrGLBinding;
commit-bot@chromium.org9e90aed2014-01-16 16:35:09 +000028static const GrGLStandard kES2_GrGLBinding = kGLES_GrGLStandard;
commit-bot@chromium.orgcc190eb2014-01-16 18:49:01 +000029static const GrGLStandard kDesktop_GrGLBinding = kGL_GrGLStandard;
bsalomon@google.com46b450a2013-08-15 19:45:26 +000030
bsalomon@google.com89ec61e2012-02-10 20:05:18 +000031////////////////////////////////////////////////////////////////////////////////
32
33/**
bsalomon@google.com0b77d682011-08-19 13:28:54 +000034 * Rather than depend on platform-specific GL headers and libraries, we require
35 * the client to provide a struct of GL function pointers. This struct can be
36 * specified per-GrContext as a parameter to GrContext::Create. If NULL is
commit-bot@chromium.orga3b15ed2014-01-15 19:32:03 +000037 * passed to Create then a "default" GL interface is created. If the default is
bsalomon@google.com0b77d682011-08-19 13:28:54 +000038 * also NULL GrContext creation will fail.
39 *
bsalomon@google.com6fb736f2011-09-16 18:51:57 +000040 * The default interface is returned by GrGLDefaultInterface. This function's
robertphillips@google.com0da37192012-03-19 14:42:13 +000041 * implementation is platform-specific. Several have been provided, along with
commit-bot@chromium.orga3b15ed2014-01-15 19:32:03 +000042 * an implementation that simply returns NULL.
bsalomon@google.com56bfc5a2011-09-01 13:28:16 +000043 *
44 * By defining GR_GL_PER_GL_CALL_IFACE_CALLBACK to 1 the client can specify a
45 * callback function that will be called prior to each GL function call. See
46 * comments in GrGLConfig.h
twiz@google.com59a190b2011-03-14 21:23:01 +000047 */
twiz@google.com59a190b2011-03-14 21:23:01 +000048
bsalomon@google.com0b77d682011-08-19 13:28:54 +000049struct GrGLInterface;
50
bsalomon@google.com6fb736f2011-09-16 18:51:57 +000051const GrGLInterface* GrGLDefaultInterface();
twiz@google.com59a190b2011-03-14 21:23:01 +000052
bsalomon@google.com57f5d982011-10-24 21:17:53 +000053/**
54 * Creates a GrGLInterface for a "native" GL context (e.g. WGL on windows,
commit-bot@chromium.orga3b15ed2014-01-15 19:32:03 +000055 * GLX on linux, AGL on Mac). The interface is only valid for the GL context
56 * that is current when the interface is created.
bsalomon@google.com57f5d982011-10-24 21:17:53 +000057 */
bsalomon@google.com373a6632011-10-19 20:43:20 +000058const GrGLInterface* GrGLCreateNativeInterface();
59
robertphillips@google.comd3b9fbb2012-03-28 16:19:11 +000060#if SK_MESA
bsalomon@google.com57f5d982011-10-24 21:17:53 +000061/**
62 * Creates a GrGLInterface for an OSMesa context.
63 */
bsalomon@google.com373a6632011-10-19 20:43:20 +000064const GrGLInterface* GrGLCreateMesaInterface();
robertphillips@google.comd3b9fbb2012-03-28 16:19:11 +000065#endif
66
67#if SK_ANGLE
68/**
69 * Creates a GrGLInterface for an ANGLE context.
70 */
71const GrGLInterface* GrGLCreateANGLEInterface();
72#endif
bsalomon@google.com373a6632011-10-19 20:43:20 +000073
bsalomon@google.com74913722011-10-27 20:44:19 +000074/**
75 * Creates a null GrGLInterface that doesn't draw anything. Used for measuring
76 * CPU overhead.
77 */
commit-bot@chromium.orgaae7c2a2013-11-25 20:39:27 +000078const SK_API GrGLInterface* GrGLCreateNullInterface();
bsalomon@google.com74913722011-10-27 20:44:19 +000079
robertphillips@google.com0da37192012-03-19 14:42:13 +000080/**
rmistry@google.comfbfcd562012-08-23 18:09:54 +000081 * Creates a debugging GrGLInterface that doesn't draw anything. Used for
robertphillips@google.com0da37192012-03-19 14:42:13 +000082 * finding memory leaks and invalid memory accesses.
83 */
84const GrGLInterface* GrGLCreateDebugInterface();
85
bsalomon@google.com56bfc5a2011-09-01 13:28:16 +000086#if GR_GL_PER_GL_FUNC_CALLBACK
87typedef void (*GrGLInterfaceCallbackProc)(const GrGLInterface*);
88typedef intptr_t GrGLInterfaceCallbackData;
89#endif
90
bsalomon@google.combf2a4692011-05-04 12:35:39 +000091/*
bsalomon@google.comcc61b172012-05-07 21:45:48 +000092 * GrContext uses the following interface to make all calls into OpenGL. When a
93 * GrContext is created it is given a GrGLInterface. The interface's function
94 * pointers must be valid for the OpenGL context associated with the GrContext.
95 * On some platforms, such as Windows, function pointers for OpenGL extensions
96 * may vary between OpenGL contexts. So the caller must be careful to use a
97 * GrGLInterface initialized for the correct context. All functions that should
98 * be available based on the OpenGL's version and extension string must be
99 * non-NULL or GrContext creation will fail. This can be tested with the
100 * validate() method when the OpenGL context has been made current.
bsalomon@google.combf2a4692011-05-04 12:35:39 +0000101 */
commit-bot@chromium.orga4de8c22013-09-09 13:38:37 +0000102struct SK_API GrGLInterface : public SkRefCnt {
bsalomon@google.comba800e22012-03-29 21:04:52 +0000103private:
bsalomon@google.com9c1f1ac2012-05-07 17:09:37 +0000104 // simple wrapper class that exists only to initialize a pointer to NULL
bsalomon@google.comba800e22012-03-29 21:04:52 +0000105 template <typename FNPTR_TYPE> class GLPtr {
106 public:
107 GLPtr() : fPtr(NULL) {}
108 GLPtr operator =(FNPTR_TYPE ptr) { fPtr = ptr; return *this; }
109 operator FNPTR_TYPE() const { return fPtr; }
110 private:
111 FNPTR_TYPE fPtr;
112 };
bsalomon@google.com0b77d682011-08-19 13:28:54 +0000113
commit-bot@chromium.orga4de8c22013-09-09 13:38:37 +0000114 typedef SkRefCnt INHERITED;
robertphillips@google.com15e9d3e2012-06-21 20:25:03 +0000115
bsalomon@google.comba800e22012-03-29 21:04:52 +0000116public:
robertphillips@google.com15e9d3e2012-06-21 20:25:03 +0000117 SK_DECLARE_INST_COUNT(GrGLInterface)
118
bsalomon@google.com0b77d682011-08-19 13:28:54 +0000119 GrGLInterface();
120
commit-bot@chromium.org9e90aed2014-01-16 16:35:09 +0000121 // Validates that the GrGLInterface supports its advertised standard. This means the necessary
122 // function pointers have been initialized for both the GL version and any advertised
123 // extensions.
124 bool validate() const;
bsalomon@google.com89ec61e2012-02-10 20:05:18 +0000125
commit-bot@chromium.org9e90aed2014-01-16 16:35:09 +0000126 // Indicates the type of GL implementation
127 union {
128 GrGLStandard fStandard;
129 GrGLStandard fBindingsExported; // Legacy name, will be remove when Chromium is updated.
130 };
twiz@google.comb65e0cb2011-03-18 20:41:44 +0000131
bsalomon@google.comba800e22012-03-29 21:04:52 +0000132 GLPtr<GrGLActiveTextureProc> fActiveTexture;
133 GLPtr<GrGLAttachShaderProc> fAttachShader;
134 GLPtr<GrGLBeginQueryProc> fBeginQuery;
135 GLPtr<GrGLBindAttribLocationProc> fBindAttribLocation;
136 GLPtr<GrGLBindBufferProc> fBindBuffer;
137 GLPtr<GrGLBindFragDataLocationProc> fBindFragDataLocation;
138 GLPtr<GrGLBindFragDataLocationIndexedProc> fBindFragDataLocationIndexed;
139 GLPtr<GrGLBindFramebufferProc> fBindFramebuffer;
140 GLPtr<GrGLBindRenderbufferProc> fBindRenderbuffer;
141 GLPtr<GrGLBindTextureProc> fBindTexture;
bsalomon@google.comecd84842013-03-01 15:36:02 +0000142 GLPtr<GrGLBindVertexArrayProc> fBindVertexArray;
bsalomon@google.comba800e22012-03-29 21:04:52 +0000143 GLPtr<GrGLBlendColorProc> fBlendColor;
144 GLPtr<GrGLBlendFuncProc> fBlendFunc;
145 GLPtr<GrGLBlitFramebufferProc> fBlitFramebuffer;
146 GLPtr<GrGLBufferDataProc> fBufferData;
147 GLPtr<GrGLBufferSubDataProc> fBufferSubData;
148 GLPtr<GrGLCheckFramebufferStatusProc> fCheckFramebufferStatus;
149 GLPtr<GrGLClearProc> fClear;
150 GLPtr<GrGLClearColorProc> fClearColor;
151 GLPtr<GrGLClearStencilProc> fClearStencil;
commit-bot@chromium.org46fbfe02013-08-30 15:52:12 +0000152 GLPtr<GrGLClientActiveTextureProc> fClientActiveTexture;
bsalomon@google.comba800e22012-03-29 21:04:52 +0000153 GLPtr<GrGLColorMaskProc> fColorMask;
bsalomon@google.comba800e22012-03-29 21:04:52 +0000154 GLPtr<GrGLCompileShaderProc> fCompileShader;
155 GLPtr<GrGLCompressedTexImage2DProc> fCompressedTexImage2D;
commit-bot@chromium.org98168bb2013-04-11 22:00:34 +0000156 GLPtr<GrGLCopyTexSubImage2DProc> fCopyTexSubImage2D;
bsalomon@google.comba800e22012-03-29 21:04:52 +0000157 GLPtr<GrGLCreateProgramProc> fCreateProgram;
158 GLPtr<GrGLCreateShaderProc> fCreateShader;
159 GLPtr<GrGLCullFaceProc> fCullFace;
160 GLPtr<GrGLDeleteBuffersProc> fDeleteBuffers;
161 GLPtr<GrGLDeleteFramebuffersProc> fDeleteFramebuffers;
162 GLPtr<GrGLDeleteProgramProc> fDeleteProgram;
163 GLPtr<GrGLDeleteQueriesProc> fDeleteQueries;
164 GLPtr<GrGLDeleteRenderbuffersProc> fDeleteRenderbuffers;
165 GLPtr<GrGLDeleteShaderProc> fDeleteShader;
166 GLPtr<GrGLDeleteTexturesProc> fDeleteTextures;
bsalomon@google.comecd84842013-03-01 15:36:02 +0000167 GLPtr<GrGLDeleteVertexArraysProc> fDeleteVertexArrays;
bsalomon@google.comba800e22012-03-29 21:04:52 +0000168 GLPtr<GrGLDepthMaskProc> fDepthMask;
169 GLPtr<GrGLDisableProc> fDisable;
commit-bot@chromium.org46fbfe02013-08-30 15:52:12 +0000170 GLPtr<GrGLDisableClientStateProc> fDisableClientState;
bsalomon@google.comba800e22012-03-29 21:04:52 +0000171 GLPtr<GrGLDisableVertexAttribArrayProc> fDisableVertexAttribArray;
172 GLPtr<GrGLDrawArraysProc> fDrawArrays;
173 GLPtr<GrGLDrawBufferProc> fDrawBuffer;
174 GLPtr<GrGLDrawBuffersProc> fDrawBuffers;
175 GLPtr<GrGLDrawElementsProc> fDrawElements;
176 GLPtr<GrGLEnableProc> fEnable;
commit-bot@chromium.org46fbfe02013-08-30 15:52:12 +0000177 GLPtr<GrGLEnableClientStateProc> fEnableClientState;
bsalomon@google.comba800e22012-03-29 21:04:52 +0000178 GLPtr<GrGLEnableVertexAttribArrayProc> fEnableVertexAttribArray;
179 GLPtr<GrGLEndQueryProc> fEndQuery;
180 GLPtr<GrGLFinishProc> fFinish;
181 GLPtr<GrGLFlushProc> fFlush;
182 GLPtr<GrGLFramebufferRenderbufferProc> fFramebufferRenderbuffer;
183 GLPtr<GrGLFramebufferTexture2DProc> fFramebufferTexture2D;
bsalomon@google.comf3a60c02013-03-19 19:06:09 +0000184 GLPtr<GrGLFramebufferTexture2DMultisampleProc> fFramebufferTexture2DMultisample;
bsalomon@google.comba800e22012-03-29 21:04:52 +0000185 GLPtr<GrGLFrontFaceProc> fFrontFace;
186 GLPtr<GrGLGenBuffersProc> fGenBuffers;
187 GLPtr<GrGLGenFramebuffersProc> fGenFramebuffers;
commit-bot@chromium.orgcffff792013-07-26 16:36:04 +0000188 GLPtr<GrGLGenerateMipmapProc> fGenerateMipmap;
bsalomon@google.comba800e22012-03-29 21:04:52 +0000189 GLPtr<GrGLGenQueriesProc> fGenQueries;
190 GLPtr<GrGLGenRenderbuffersProc> fGenRenderbuffers;
191 GLPtr<GrGLGenTexturesProc> fGenTextures;
bsalomon@google.comecd84842013-03-01 15:36:02 +0000192 GLPtr<GrGLGenVertexArraysProc> fGenVertexArrays;
bsalomon@google.comba800e22012-03-29 21:04:52 +0000193 GLPtr<GrGLGetBufferParameterivProc> fGetBufferParameteriv;
194 GLPtr<GrGLGetErrorProc> fGetError;
195 GLPtr<GrGLGetFramebufferAttachmentParameterivProc> fGetFramebufferAttachmentParameteriv;
196 GLPtr<GrGLGetIntegervProc> fGetIntegerv;
197 GLPtr<GrGLGetQueryObjecti64vProc> fGetQueryObjecti64v;
198 GLPtr<GrGLGetQueryObjectivProc> fGetQueryObjectiv;
199 GLPtr<GrGLGetQueryObjectui64vProc> fGetQueryObjectui64v;
200 GLPtr<GrGLGetQueryObjectuivProc> fGetQueryObjectuiv;
201 GLPtr<GrGLGetQueryivProc> fGetQueryiv;
202 GLPtr<GrGLGetProgramInfoLogProc> fGetProgramInfoLog;
203 GLPtr<GrGLGetProgramivProc> fGetProgramiv;
204 GLPtr<GrGLGetRenderbufferParameterivProc> fGetRenderbufferParameteriv;
205 GLPtr<GrGLGetShaderInfoLogProc> fGetShaderInfoLog;
206 GLPtr<GrGLGetShaderivProc> fGetShaderiv;
207 GLPtr<GrGLGetStringProc> fGetString;
bsalomon@google.com1744f972013-02-26 21:46:32 +0000208 GLPtr<GrGLGetStringiProc> fGetStringi;
bsalomon@google.comba800e22012-03-29 21:04:52 +0000209 GLPtr<GrGLGetTexLevelParameterivProc> fGetTexLevelParameteriv;
210 GLPtr<GrGLGetUniformLocationProc> fGetUniformLocation;
211 GLPtr<GrGLLineWidthProc> fLineWidth;
212 GLPtr<GrGLLinkProgramProc> fLinkProgram;
commit-bot@chromium.orgf5897f82013-09-03 17:50:50 +0000213 GLPtr<GrGLLoadIdentityProc> fLoadIdentity;
214 GLPtr<GrGLLoadMatrixfProc> fLoadMatrixf;
bsalomon@google.comba800e22012-03-29 21:04:52 +0000215 GLPtr<GrGLMapBufferProc> fMapBuffer;
commit-bot@chromium.orgf5897f82013-09-03 17:50:50 +0000216 GLPtr<GrGLMatrixModeProc> fMatrixMode;
bsalomon@google.comba800e22012-03-29 21:04:52 +0000217 GLPtr<GrGLPixelStoreiProc> fPixelStorei;
218 GLPtr<GrGLQueryCounterProc> fQueryCounter;
219 GLPtr<GrGLReadBufferProc> fReadBuffer;
220 GLPtr<GrGLReadPixelsProc> fReadPixels;
221 GLPtr<GrGLRenderbufferStorageProc> fRenderbufferStorage;
commit-bot@chromium.orga8e5a062013-09-05 23:44:09 +0000222
commit-bot@chromium.orga8e5a062013-09-05 23:44:09 +0000223 // 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.
236
237 // GL_EXT_multisampled_render_to_texture (preferred) or GL_IMG_multisampled_render_to_texture
238 GLPtr<GrGLRenderbufferStorageMultisampleProc> fRenderbufferStorageMultisampleES2EXT;
239 // GL_APPLE_framebuffer_multisample
240 GLPtr<GrGLRenderbufferStorageMultisampleProc> fRenderbufferStorageMultisampleES2APPLE;
commit-bot@chromium.org92b78842014-01-16 20:49:46 +0000241
commit-bot@chromium.orga8e5a062013-09-05 23:44:09 +0000242 // 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@google.comba800e22012-03-29 21:04:52 +0000244 GLPtr<GrGLRenderbufferStorageMultisampleProc> fRenderbufferStorageMultisample;
commit-bot@chromium.orga8e5a062013-09-05 23:44:09 +0000245
commit-bot@chromium.orgd3baf202013-11-07 22:06:08 +0000246 // Pointer to BindUniformLocationCHROMIUM from the GL_CHROMIUM_bind_uniform_location extension.
247 GLPtr<GrGLBindUniformLocation> fBindUniformLocation;
248
bsalomon@google.comba800e22012-03-29 21:04:52 +0000249 GLPtr<GrGLResolveMultisampleFramebufferProc> fResolveMultisampleFramebuffer;
250 GLPtr<GrGLScissorProc> fScissor;
251 GLPtr<GrGLShaderSourceProc> fShaderSource;
252 GLPtr<GrGLStencilFuncProc> fStencilFunc;
253 GLPtr<GrGLStencilFuncSeparateProc> fStencilFuncSeparate;
254 GLPtr<GrGLStencilMaskProc> fStencilMask;
255 GLPtr<GrGLStencilMaskSeparateProc> fStencilMaskSeparate;
256 GLPtr<GrGLStencilOpProc> fStencilOp;
257 GLPtr<GrGLStencilOpSeparateProc> fStencilOpSeparate;
commit-bot@chromium.org46fbfe02013-08-30 15:52:12 +0000258 GLPtr<GrGLTexGenfProc> fTexGenf;
259 GLPtr<GrGLTexGenfvProc> fTexGenfv;
260 GLPtr<GrGLTexGeniProc> fTexGeni;
bsalomon@google.comba800e22012-03-29 21:04:52 +0000261 GLPtr<GrGLTexImage2DProc> fTexImage2D;
262 GLPtr<GrGLTexParameteriProc> fTexParameteri;
bsalomon@google.com4d063de2012-05-31 17:59:23 +0000263 GLPtr<GrGLTexParameterivProc> fTexParameteriv;
bsalomon@google.comba800e22012-03-29 21:04:52 +0000264 GLPtr<GrGLTexSubImage2DProc> fTexSubImage2D;
265 GLPtr<GrGLTexStorage2DProc> fTexStorage2D;
robertphillips@google.coma6ffb582013-04-29 16:50:17 +0000266 GLPtr<GrGLDiscardFramebufferProc> fDiscardFramebuffer;
bsalomon@google.comba800e22012-03-29 21:04:52 +0000267 GLPtr<GrGLUniform1fProc> fUniform1f;
268 GLPtr<GrGLUniform1iProc> fUniform1i;
269 GLPtr<GrGLUniform1fvProc> fUniform1fv;
270 GLPtr<GrGLUniform1ivProc> fUniform1iv;
271 GLPtr<GrGLUniform2fProc> fUniform2f;
272 GLPtr<GrGLUniform2iProc> fUniform2i;
273 GLPtr<GrGLUniform2fvProc> fUniform2fv;
274 GLPtr<GrGLUniform2ivProc> fUniform2iv;
275 GLPtr<GrGLUniform3fProc> fUniform3f;
276 GLPtr<GrGLUniform3iProc> fUniform3i;
277 GLPtr<GrGLUniform3fvProc> fUniform3fv;
278 GLPtr<GrGLUniform3ivProc> fUniform3iv;
279 GLPtr<GrGLUniform4fProc> fUniform4f;
280 GLPtr<GrGLUniform4iProc> fUniform4i;
281 GLPtr<GrGLUniform4fvProc> fUniform4fv;
282 GLPtr<GrGLUniform4ivProc> fUniform4iv;
283 GLPtr<GrGLUniformMatrix2fvProc> fUniformMatrix2fv;
284 GLPtr<GrGLUniformMatrix3fvProc> fUniformMatrix3fv;
285 GLPtr<GrGLUniformMatrix4fvProc> fUniformMatrix4fv;
286 GLPtr<GrGLUnmapBufferProc> fUnmapBuffer;
287 GLPtr<GrGLUseProgramProc> fUseProgram;
288 GLPtr<GrGLVertexAttrib4fvProc> fVertexAttrib4fv;
289 GLPtr<GrGLVertexAttribPointerProc> fVertexAttribPointer;
commit-bot@chromium.org46fbfe02013-08-30 15:52:12 +0000290 GLPtr<GrGLVertexPointerProc> fVertexPointer;
bsalomon@google.comba800e22012-03-29 21:04:52 +0000291 GLPtr<GrGLViewportProc> fViewport;
bsalomon@google.com271cffc2011-05-20 14:13:56 +0000292
bsalomon@google.comfe11cb62012-06-06 15:17:54 +0000293 // Experimental: Functions for GL_NV_path_rendering. These will be
rmistry@google.comfbfcd562012-08-23 18:09:54 +0000294 // alphabetized with the above functions once this is fully supported
bsalomon@google.comfe11cb62012-06-06 15:17:54 +0000295 // (and functions we are unlikely to use will possibly be omitted).
bsalomon@google.comfe11cb62012-06-06 15:17:54 +0000296 GLPtr<GrGLPathCommandsProc> fPathCommands;
297 GLPtr<GrGLPathCoordsProc> fPathCoords;
298 GLPtr<GrGLPathSubCommandsProc> fPathSubCommands;
299 GLPtr<GrGLPathSubCoordsProc> fPathSubCoords;
300 GLPtr<GrGLPathStringProc> fPathString;
301 GLPtr<GrGLPathGlyphsProc> fPathGlyphs;
302 GLPtr<GrGLPathGlyphRangeProc> fPathGlyphRange;
303 GLPtr<GrGLWeightPathsProc> fWeightPaths;
304 GLPtr<GrGLCopyPathProc> fCopyPath;
305 GLPtr<GrGLInterpolatePathsProc> fInterpolatePaths;
306 GLPtr<GrGLTransformPathProc> fTransformPath;
307 GLPtr<GrGLPathParameterivProc> fPathParameteriv;
308 GLPtr<GrGLPathParameteriProc> fPathParameteri;
309 GLPtr<GrGLPathParameterfvProc> fPathParameterfv;
310 GLPtr<GrGLPathParameterfProc> fPathParameterf;
311 GLPtr<GrGLPathDashArrayProc> fPathDashArray;
312 GLPtr<GrGLGenPathsProc> fGenPaths;
313 GLPtr<GrGLDeletePathsProc> fDeletePaths;
314 GLPtr<GrGLIsPathProc> fIsPath;
315 GLPtr<GrGLPathStencilFuncProc> fPathStencilFunc;
316 GLPtr<GrGLPathStencilDepthOffsetProc> fPathStencilDepthOffset;
317 GLPtr<GrGLStencilFillPathProc> fStencilFillPath;
318 GLPtr<GrGLStencilStrokePathProc> fStencilStrokePath;
319 GLPtr<GrGLStencilFillPathInstancedProc> fStencilFillPathInstanced;
320 GLPtr<GrGLStencilStrokePathInstancedProc> fStencilStrokePathInstanced;
321 GLPtr<GrGLPathCoverDepthFuncProc> fPathCoverDepthFunc;
322 GLPtr<GrGLPathColorGenProc> fPathColorGen;
323 GLPtr<GrGLPathTexGenProc> fPathTexGen;
324 GLPtr<GrGLPathFogGenProc> fPathFogGen;
325 GLPtr<GrGLCoverFillPathProc> fCoverFillPath;
326 GLPtr<GrGLCoverStrokePathProc> fCoverStrokePath;
327 GLPtr<GrGLCoverFillPathInstancedProc> fCoverFillPathInstanced;
328 GLPtr<GrGLCoverStrokePathInstancedProc> fCoverStrokePathInstanced;
329 GLPtr<GrGLGetPathParameterivProc> fGetPathParameteriv;
330 GLPtr<GrGLGetPathParameterfvProc> fGetPathParameterfv;
331 GLPtr<GrGLGetPathCommandsProc> fGetPathCommands;
332 GLPtr<GrGLGetPathCoordsProc> fGetPathCoords;
333 GLPtr<GrGLGetPathDashArrayProc> fGetPathDashArray;
334 GLPtr<GrGLGetPathMetricsProc> fGetPathMetrics;
335 GLPtr<GrGLGetPathMetricRangeProc> fGetPathMetricRange;
336 GLPtr<GrGLGetPathSpacingProc> fGetPathSpacing;
337 GLPtr<GrGLGetPathColorGenivProc> fGetPathColorGeniv;
338 GLPtr<GrGLGetPathColorGenfvProc> fGetPathColorGenfv;
339 GLPtr<GrGLGetPathTexGenivProc> fGetPathTexGeniv;
340 GLPtr<GrGLGetPathTexGenfvProc> fGetPathTexGenfv;
341 GLPtr<GrGLIsPointInFillPathProc> fIsPointInFillPath;
342 GLPtr<GrGLIsPointInStrokePathProc> fIsPointInStrokePath;
343 GLPtr<GrGLGetPathLengthProc> fGetPathLength;
344 GLPtr<GrGLPointAlongPathProc> fPointAlongPath;
345
bsalomon@google.com56bfc5a2011-09-01 13:28:16 +0000346 // Per-GL func callback
347#if GR_GL_PER_GL_FUNC_CALLBACK
348 GrGLInterfaceCallbackProc fCallback;
349 GrGLInterfaceCallbackData fCallbackData;
350#endif
351
bsalomon@google.combf2a4692011-05-04 12:35:39 +0000352};
twiz@google.com59a190b2011-03-14 21:23:01 +0000353
354#endif