blob: 700ce9ee14cc6bd3d2fd0ab0d86d183943dfb628 [file] [log] [blame]
twiz@google.com59a190b2011-03-14 21:23:01 +00001/*
2 Copyright 2011 Google Inc.
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15 */
16
17
18#ifndef GrGLInterface_DEFINED
19#define GrGLInterface_DEFINED
20
21#include "GrGLPlatformIncludes.h"
bsalomon@google.com91826102011-03-21 19:51:57 +000022#include "GrTypes.h"
twiz@google.com59a190b2011-03-14 21:23:01 +000023
24#if !defined(GR_GL_FUNCTION_TYPE)
25 #define GR_GL_FUNCTION_TYPE
26#endif
27
28////////////////////////////////////////////////////////////////////////////////
29
30/**
31 * Helpers for glGetString()
32 */
33bool has_gl_extension(const char* ext);
34void gl_version(int* major, int* minor);
35
36////////////////////////////////////////////////////////////////////////////////
37
38/*
39 * Routines managing the global interface used to invoke OpenGL calls.
40 */
41struct GrGLInterface;
bsalomon@google.com91826102011-03-21 19:51:57 +000042GR_API GrGLInterface* GrGLGetGLInterface();
43GR_API void GrGLSetGLInterface(GrGLInterface* gl_interface);
twiz@google.com59a190b2011-03-14 21:23:01 +000044
45/*
46 * Populates the global GrGLInterface pointer with an instance pointing to the
47 * GL implementation linked with the executable.
48 */
49extern void GrGLSetDefaultGLInterface();
50
twiz@google.com0f31ca72011-03-18 17:38:11 +000051typedef unsigned int GrGLenum;
52typedef unsigned char GrGLboolean;
53typedef unsigned int GrGLbitfield;
54typedef signed char GrGLbyte;
55typedef short GrGLshort;
56typedef int GrGLint;
57typedef int GrGLsizei;
58typedef unsigned char GrGLubyte;
59typedef unsigned short GrGLushort;
60typedef unsigned int GrGLuint;
61typedef float GrGLfloat;
62typedef float GrGLclampf;
63typedef double GrGLdouble;
64typedef double GrGLclampd;
65typedef void GrGLvoid;
66
twiz@google.comb65e0cb2011-03-18 20:41:44 +000067enum GrGLBinding {
68 kDesktop_GrGLBinding = 0x01,
69 kES1_GrGLBinding = 0x02,
70 kES2_GrGLBinding = 0x04
71};
72
twiz@google.com59a190b2011-03-14 21:23:01 +000073extern "C" {
74/*
75 * The following interface exports the OpenGL entry points used by the system.
76 * Use of OpenGL calls is disallowed. All calls should be invoked through
77 * the global instance of this struct, defined above.
78 *
79 * IMPORTANT NOTE: The OpenGL entry points exposed here include both core GL
80 * functions, and extensions. The system assumes that the address of the
81 * extension pointer will be valid across contexts.
82 */
83struct GrGLInterface {
twiz@google.com0f31ca72011-03-18 17:38:11 +000084 typedef GrGLvoid (GR_GL_FUNCTION_TYPE *GrGLActiveTextureProc)(GrGLenum texture);
85 typedef GrGLvoid (GR_GL_FUNCTION_TYPE *GrGLAttachShaderProc)(GrGLuint program, GrGLuint shader);
86 typedef GrGLvoid (GR_GL_FUNCTION_TYPE *GrGLBindAttribLocationProc)(GrGLuint program, GrGLuint index, const char* name);
87 typedef GrGLvoid (GR_GL_FUNCTION_TYPE *GrGLBindBufferProc)(GrGLenum target, GrGLuint buffer);
88 typedef GrGLvoid (GR_GL_FUNCTION_TYPE *GrGLBindTextureProc)(GrGLenum target, GrGLuint texture);
89 typedef GrGLvoid (GR_GL_FUNCTION_TYPE *GrGLBlendColorProc)(GrGLclampf red, GrGLclampf green, GrGLclampf blue, GrGLclampf alpha);
90 typedef GrGLvoid (GR_GL_FUNCTION_TYPE *GrGLBlendFuncProc)(GrGLenum sfactor, GrGLenum dfactor);
91 typedef GrGLvoid (GR_GL_FUNCTION_TYPE *GrGLBufferDataProc)(GrGLenum target, GrGLsizei size, const GrGLvoid* data, GrGLenum usage);
92 typedef GrGLvoid (GR_GL_FUNCTION_TYPE *GrGLBufferSubDataProc)(GrGLenum target, GrGLint offset, GrGLsizei size, const GrGLvoid* data);
93 typedef GrGLvoid (GR_GL_FUNCTION_TYPE *GrGLClearProc)(GrGLbitfield mask);
94 typedef GrGLvoid (GR_GL_FUNCTION_TYPE *GrGLClearColorProc)(GrGLclampf red, GrGLclampf green, GrGLclampf blue, GrGLclampf alpha);
95 typedef GrGLvoid (GR_GL_FUNCTION_TYPE *GrGLClearStencilProc)(GrGLint s);
96 typedef GrGLvoid (GR_GL_FUNCTION_TYPE *GrGLClientActiveTextureProc)(GrGLenum texture);
97 typedef GrGLvoid (GR_GL_FUNCTION_TYPE *GrGLColor4ubProc)(GrGLubyte red, GrGLubyte green, GrGLubyte blue, GrGLubyte alpha);
98 typedef GrGLvoid (GR_GL_FUNCTION_TYPE *GrGLColorMaskProc)(GrGLboolean red, GrGLboolean green, GrGLboolean blue, GrGLboolean alpha);
99 typedef GrGLvoid (GR_GL_FUNCTION_TYPE *GrGLColorPointerProc)(GrGLint size, GrGLenum type, GrGLsizei stride, const GrGLvoid* pointer);
100 typedef GrGLvoid (GR_GL_FUNCTION_TYPE *GrGLCompileShaderProc)(GrGLuint shader);
101 typedef GrGLvoid (GR_GL_FUNCTION_TYPE *GrGLCompressedTexImage2DProc)(GrGLenum target, GrGLint level, GrGLenum internalformat, GrGLsizei width, GrGLsizei height, GrGLint border, GrGLsizei imageSize, const GrGLvoid* data);
102 typedef GrGLuint (GR_GL_FUNCTION_TYPE *GrGLCreateProgramProc)(void);
103 typedef GrGLuint (GR_GL_FUNCTION_TYPE *GrGLCreateShaderProc)(GrGLenum type);
104 typedef GrGLvoid (GR_GL_FUNCTION_TYPE *GrGLCullFaceProc)(GrGLenum mode);
105 typedef GrGLvoid (GR_GL_FUNCTION_TYPE *GrGLDeleteBuffersProc)(GrGLsizei n, const GrGLuint* buffers);
106 typedef GrGLvoid (GR_GL_FUNCTION_TYPE *GrGLDeleteProgramProc)(GrGLuint program);
107 typedef GrGLvoid (GR_GL_FUNCTION_TYPE *GrGLDeleteShaderProc)(GrGLuint shader);
108 typedef GrGLvoid (GR_GL_FUNCTION_TYPE *GrGLDeleteTexturesProc)(GrGLsizei n, const GrGLuint* textures);
109 typedef GrGLvoid (GR_GL_FUNCTION_TYPE *GrGLDepthMaskProc)(GrGLboolean flag);
110 typedef GrGLvoid (GR_GL_FUNCTION_TYPE *GrGLDisableProc)(GrGLenum cap);
111 typedef GrGLvoid (GR_GL_FUNCTION_TYPE *GrGLDisableClientStateProc)(GrGLenum array);
112 typedef GrGLvoid (GR_GL_FUNCTION_TYPE *GrGLDisableVertexAttribArrayProc)(GrGLuint index);
113 typedef GrGLvoid (GR_GL_FUNCTION_TYPE *GrGLDrawArraysProc)(GrGLenum mode, GrGLint first, GrGLsizei count);
114 typedef GrGLvoid (GR_GL_FUNCTION_TYPE *GrGLDrawElementsProc)(GrGLenum mode, GrGLsizei count, GrGLenum type, const GrGLvoid* indices);
115 typedef GrGLvoid (GR_GL_FUNCTION_TYPE *GrGLEnableProc)(GrGLenum cap);
116 typedef GrGLvoid (GR_GL_FUNCTION_TYPE *GrGLEnableClientStateProc)(GrGLenum cap);
117 typedef GrGLvoid (GR_GL_FUNCTION_TYPE *GrGLEnableVertexAttribArrayProc)(GrGLuint index);
118 typedef GrGLvoid (GR_GL_FUNCTION_TYPE *GrGLFrontFaceProc)(GrGLenum mode);
119 typedef GrGLvoid (GR_GL_FUNCTION_TYPE *GrGLGenBuffersProc)(GrGLsizei n, GrGLuint* buffers);
120 typedef GrGLenum (GR_GL_FUNCTION_TYPE *GrGLGetErrorProc)(void);
121 typedef GrGLvoid (GR_GL_FUNCTION_TYPE *GrGLGenTexturesProc)(GrGLsizei n, GrGLuint* textures);
122 typedef GrGLvoid (GR_GL_FUNCTION_TYPE *GrGLGetBufferParameterivProc)(GrGLenum target, GrGLenum pname, GrGLint* params);
123 typedef GrGLvoid (GR_GL_FUNCTION_TYPE *GrGLGetIntegervProc)(GrGLenum pname, GrGLint* params);
124 typedef GrGLvoid (GR_GL_FUNCTION_TYPE *GrGLGetProgramInfoLogProc)(GrGLuint program, GrGLsizei bufsize, GrGLsizei* length, char* infolog);
125 typedef GrGLvoid (GR_GL_FUNCTION_TYPE *GrGLGetProgramivProc)(GrGLuint program, GrGLenum pname, GrGLint* params);
126 typedef GrGLvoid (GR_GL_FUNCTION_TYPE *GrGLGetShaderInfoLogProc)(GrGLuint shader, GrGLsizei bufsize, GrGLsizei* length, char* infolog);
127 typedef GrGLvoid (GR_GL_FUNCTION_TYPE *GrGLGetShaderivProc)(GrGLuint shader, GrGLenum pname, GrGLint* params);
128 typedef const GrGLubyte* (GR_GL_FUNCTION_TYPE *GrGLGetStringProc)(GrGLenum name);
129 typedef GrGLint (GR_GL_FUNCTION_TYPE *GrGLGetUniformLocationProc)(GrGLuint program, const char* name);
130 typedef GrGLvoid (GR_GL_FUNCTION_TYPE *GrGLLineWidthProc)(GrGLfloat width);
131 typedef GrGLvoid (GR_GL_FUNCTION_TYPE *GrGLLinkProgramProc)(GrGLuint program);
132 typedef GrGLvoid (GR_GL_FUNCTION_TYPE *GrGLLoadMatrixfProc)(const GrGLfloat* m);
133 typedef GrGLvoid (GR_GL_FUNCTION_TYPE *GrGLMatrixModeProc)(GrGLenum mode);
134 typedef GrGLvoid (GR_GL_FUNCTION_TYPE *GrGLPixelStoreiProc)(GrGLenum pname, GrGLint param);
135 typedef GrGLvoid (GR_GL_FUNCTION_TYPE *GrGLPointSizeProc)(GrGLfloat size);
136 typedef GrGLvoid (GR_GL_FUNCTION_TYPE *GrGLReadPixelsProc)(GrGLint x, GrGLint y, GrGLsizei width, GrGLsizei height, GrGLenum format, GrGLenum type, GrGLvoid* pixels);
137 typedef GrGLvoid (GR_GL_FUNCTION_TYPE *GrGLScissorProc)(GrGLint x, GrGLint y, GrGLsizei width, GrGLsizei height);
138 typedef GrGLvoid (GR_GL_FUNCTION_TYPE *GrGLShadeModelProc)(GrGLenum mode);
139 typedef GrGLvoid (GR_GL_FUNCTION_TYPE *GrGLShaderSourceProc)(GrGLuint shader, GrGLsizei count, const char** str, const GrGLint* length);
140 typedef GrGLvoid (GR_GL_FUNCTION_TYPE *GrGLStencilFuncProc)(GrGLenum func, GrGLint ref, GrGLuint mask);
141 typedef GrGLvoid (GR_GL_FUNCTION_TYPE *GrGLStencilFuncSeparateProc)(GrGLenum face, GrGLenum func, GrGLint ref, GrGLuint mask);
142 typedef GrGLvoid (GR_GL_FUNCTION_TYPE *GrGLStencilMaskProc)(GrGLuint mask);
143 typedef GrGLvoid (GR_GL_FUNCTION_TYPE *GrGLStencilMaskSeparateProc)(GrGLenum face, GrGLuint mask);
144 typedef GrGLvoid (GR_GL_FUNCTION_TYPE *GrGLStencilOpProc)(GrGLenum fail, GrGLenum zfail, GrGLenum zpass);
145 typedef GrGLvoid (GR_GL_FUNCTION_TYPE *GrGLStencilOpSeparateProc)(GrGLenum face, GrGLenum fail, GrGLenum zfail, GrGLenum zpass);
146 typedef GrGLvoid (GR_GL_FUNCTION_TYPE *GrGLTexCoordPointerProc)(GrGLint size, GrGLenum type, GrGLsizei stride, const GrGLvoid* pointer);
147 typedef GrGLvoid (GR_GL_FUNCTION_TYPE *GrGLTexEnviProc)(GrGLenum target, GrGLenum pname, GrGLint param);
148 typedef GrGLvoid (GR_GL_FUNCTION_TYPE *GrGLTexImage2DProc)(GrGLenum target, GrGLint level, GrGLint internalformat, GrGLsizei width, GrGLsizei height, GrGLint border, GrGLenum format, GrGLenum type, const GrGLvoid* pixels);
149 typedef GrGLvoid (GR_GL_FUNCTION_TYPE *GrGLTexParameteriProc)(GrGLenum target, GrGLenum pname, GrGLint param);
150 typedef GrGLvoid (GR_GL_FUNCTION_TYPE *GrGLTexSubImage2DProc)(GrGLenum target, GrGLint level, GrGLint xoffset, GrGLint yoffset, GrGLsizei width, GrGLsizei height, GrGLenum format, GrGLenum type, const GrGLvoid* pixels);
151 typedef GrGLvoid (GR_GL_FUNCTION_TYPE *GrGLUniform1fvProc)(GrGLint location, GrGLsizei count, const GrGLfloat* v);
152 typedef GrGLvoid (GR_GL_FUNCTION_TYPE *GrGLUniform1iProc)(GrGLint location, GrGLint x);
153 typedef GrGLvoid (GR_GL_FUNCTION_TYPE *GrGLUniform4fvProc)(GrGLint location, GrGLsizei count, const GrGLfloat* v);
154 typedef GrGLvoid (GR_GL_FUNCTION_TYPE *GrGLUniformMatrix3fvProc)(GrGLint location, GrGLsizei count, GrGLboolean transpose, const GrGLfloat* value);
155 typedef GrGLvoid (GR_GL_FUNCTION_TYPE *GrGLUseProgramProc)(GrGLuint program);
156 typedef GrGLvoid (GR_GL_FUNCTION_TYPE *GrGLVertexAttrib4fvProc)(GrGLuint indx, const GrGLfloat* values);
157 typedef GrGLvoid (GR_GL_FUNCTION_TYPE *GrGLVertexAttribPointerProc)(GrGLuint indx, GrGLint size, GrGLenum type, GrGLboolean normalized, GrGLsizei stride, const GrGLvoid* ptr);
158 typedef GrGLvoid (GR_GL_FUNCTION_TYPE *GrGLVertexPointerProc)(GrGLint size, GrGLenum type, GrGLsizei stride, const GrGLvoid* pointer);
159 typedef GrGLvoid (GR_GL_FUNCTION_TYPE *GrGLViewportProc)(GrGLint x, GrGLint y, GrGLsizei width, GrGLsizei height);
twiz@google.com59a190b2011-03-14 21:23:01 +0000160
161 // FBO Extension Functions
twiz@google.com0f31ca72011-03-18 17:38:11 +0000162 typedef GrGLvoid (GR_GL_FUNCTION_TYPE *GrGLBindFramebufferProc)(GrGLenum target, GrGLuint framebuffer);
163 typedef GrGLvoid (GR_GL_FUNCTION_TYPE *GrGLBindRenderbufferProc)(GrGLenum target, GrGLuint renderbuffer);
164 typedef GrGLenum (GR_GL_FUNCTION_TYPE *GrGLCheckFramebufferStatusProc)(GrGLenum target);
165 typedef GrGLvoid (GR_GL_FUNCTION_TYPE *GrGLDeleteFramebuffersProc)(GrGLsizei n, const GrGLuint *framebuffers);
166 typedef GrGLvoid (GR_GL_FUNCTION_TYPE *GrGLDeleteRenderbuffersProc)(GrGLsizei n, const GrGLuint *renderbuffers);
167 typedef GrGLvoid (GR_GL_FUNCTION_TYPE *GrGLFramebufferRenderbufferProc)(GrGLenum target, GrGLenum attachment, GrGLenum renderbuffertarget, GrGLuint renderbuffer);
168 typedef GrGLvoid (GR_GL_FUNCTION_TYPE *GrGLFramebufferTexture2DProc)(GrGLenum target, GrGLenum attachment, GrGLenum textarget, GrGLuint texture, GrGLint level);
169 typedef GrGLvoid (GR_GL_FUNCTION_TYPE *GrGLGenFramebuffersProc)(GrGLsizei n, GrGLuint *framebuffers);
170 typedef GrGLvoid (GR_GL_FUNCTION_TYPE *GrGLGenRenderbuffersProc)(GrGLsizei n, GrGLuint *renderbuffers);
171 typedef GrGLvoid (GR_GL_FUNCTION_TYPE *GrGLRenderbufferStorageProc)(GrGLenum target, GrGLenum internalformat, GrGLsizei width, GrGLsizei height);
twiz@google.com59a190b2011-03-14 21:23:01 +0000172
173 // Multisampling Extension Functions
174 // same prototype for ARB_FBO, EXT_FBO, GL 3.0, & Apple ES extension
twiz@google.com0f31ca72011-03-18 17:38:11 +0000175 typedef GrGLvoid (GR_GL_FUNCTION_TYPE *GrGLRenderbufferStorageMultisampleProc)(GrGLenum target, GrGLsizei samples, GrGLenum internalformat, GrGLsizei width, GrGLsizei height);
twiz@google.com59a190b2011-03-14 21:23:01 +0000176 // desktop: ext_fbo_blit, arb_fbo, gl 3.0
twiz@google.com0f31ca72011-03-18 17:38:11 +0000177 typedef GrGLvoid (GR_GL_FUNCTION_TYPE *GrGLBlitFramebufferProc)(GrGLint srcX0, GrGLint srcY0, GrGLint srcX1, GrGLint srcY1, GrGLint dstX0, GrGLint dstY0, GrGLint dstX1, GrGLint dstY1, GrGLbitfield mask, GrGLenum filter);
twiz@google.com59a190b2011-03-14 21:23:01 +0000178 // apple's es extension
twiz@google.com0f31ca72011-03-18 17:38:11 +0000179 typedef GrGLvoid (GR_GL_FUNCTION_TYPE *GrGLResolveMultisampleFramebufferProc)();
twiz@google.com59a190b2011-03-14 21:23:01 +0000180
twiz@google.com59a190b2011-03-14 21:23:01 +0000181 // Buffer mapping (extension in ES).
twiz@google.com0f31ca72011-03-18 17:38:11 +0000182 typedef GrGLvoid* (GR_GL_FUNCTION_TYPE *GrGLMapBufferProc)(GrGLenum target, GrGLenum access);
183 typedef GrGLboolean (GR_GL_FUNCTION_TYPE *GrGLUnmapBufferProc)(GrGLenum target);
twiz@google.com59a190b2011-03-14 21:23:01 +0000184
twiz@google.comb65e0cb2011-03-18 20:41:44 +0000185 // Indicator variable specifying the type of GL implementation
186 // exported: GLES{1|2} or Desktop.
187 GrGLBinding fBindingsExported;
188
twiz@google.com59a190b2011-03-14 21:23:01 +0000189 GrGLActiveTextureProc fActiveTexture;
190 GrGLAttachShaderProc fAttachShader;
191 GrGLBindAttribLocationProc fBindAttribLocation;
192 GrGLBindBufferProc fBindBuffer;
193 GrGLBindTextureProc fBindTexture;
194 GrGLBlendFuncProc fBlendFunc;
bsalomon@google.com080773c2011-03-15 19:09:25 +0000195 GrGLBlendColorProc fBlendColor;
twiz@google.com59a190b2011-03-14 21:23:01 +0000196 GrGLBufferDataProc fBufferData;
197 GrGLBufferSubDataProc fBufferSubData;
198 GrGLClearProc fClear;
199 GrGLClearColorProc fClearColor;
200 GrGLClearStencilProc fClearStencil;
201 GrGLClientActiveTextureProc fClientActiveTexture;
202 GrGLColor4ubProc fColor4ub;
203 GrGLColorMaskProc fColorMask;
204 GrGLColorPointerProc fColorPointer;
205 GrGLCompileShaderProc fCompileShader;
206 GrGLCompressedTexImage2DProc fCompressedTexImage2D;
207 GrGLCreateProgramProc fCreateProgram;
208 GrGLCreateShaderProc fCreateShader;
209 GrGLCullFaceProc fCullFace;
210 GrGLDeleteBuffersProc fDeleteBuffers;
211 GrGLDeleteProgramProc fDeleteProgram;
212 GrGLDeleteShaderProc fDeleteShader;
213 GrGLDeleteTexturesProc fDeleteTextures;
214 GrGLDepthMaskProc fDepthMask;
215 GrGLDisableProc fDisable;
216 GrGLDisableClientStateProc fDisableClientState;
217 GrGLDisableVertexAttribArrayProc fDisableVertexAttribArray;
218 GrGLDrawArraysProc fDrawArrays;
219 GrGLDrawElementsProc fDrawElements;
220 GrGLEnableProc fEnable;
221 GrGLEnableClientStateProc fEnableClientState;
222 GrGLEnableVertexAttribArrayProc fEnableVertexAttribArray;
223 GrGLFrontFaceProc fFrontFace;
224 GrGLGenBuffersProc fGenBuffers;
225 GrGLGenTexturesProc fGenTextures;
226 GrGLGetBufferParameterivProc fGetBufferParameteriv;
227 GrGLGetErrorProc fGetError;
228 GrGLGetIntegervProc fGetIntegerv;
229 GrGLGetProgramInfoLogProc fGetProgramInfoLog;
230 GrGLGetProgramivProc fGetProgramiv;
231 GrGLGetShaderInfoLogProc fGetShaderInfoLog;
232 GrGLGetShaderivProc fGetShaderiv;
233 GrGLGetStringProc fGetString;
234 GrGLGetUniformLocationProc fGetUniformLocation;
235 GrGLLineWidthProc fLineWidth;
236 GrGLLinkProgramProc fLinkProgram;
237 GrGLLoadMatrixfProc fLoadMatrixf;
238 GrGLMatrixModeProc fMatrixMode;
239 GrGLPixelStoreiProc fPixelStorei;
240 GrGLPointSizeProc fPointSize;
241 GrGLReadPixelsProc fReadPixels;
242 GrGLScissorProc fScissor;
243 GrGLShadeModelProc fShadeModel;
244 GrGLShaderSourceProc fShaderSource;
245 GrGLStencilFuncProc fStencilFunc;
246 GrGLStencilFuncSeparateProc fStencilFuncSeparate;
247 GrGLStencilMaskProc fStencilMask;
248 GrGLStencilMaskSeparateProc fStencilMaskSeparate;
249 GrGLStencilOpProc fStencilOp;
250 GrGLStencilOpSeparateProc fStencilOpSeparate;
251 GrGLTexCoordPointerProc fTexCoordPointer;
252 GrGLTexEnviProc fTexEnvi;
253 GrGLTexImage2DProc fTexImage2D;
254 GrGLTexParameteriProc fTexParameteri;
255 GrGLTexSubImage2DProc fTexSubImage2D;
256 GrGLUniform1fvProc fUniform1fv;
257 GrGLUniform1iProc fUniform1i;
258 GrGLUniform4fvProc fUniform4fv;
259 GrGLUniformMatrix3fvProc fUniformMatrix3fv;
260 GrGLUseProgramProc fUseProgram;
261 GrGLVertexAttrib4fvProc fVertexAttrib4fv;
262 GrGLVertexAttribPointerProc fVertexAttribPointer;
263 GrGLVertexPointerProc fVertexPointer;
264 GrGLViewportProc fViewport;
265
266 // FBO Extension Functions
267 GrGLBindFramebufferProc fBindFramebuffer;
268 GrGLBindRenderbufferProc fBindRenderbuffer;
269 GrGLCheckFramebufferStatusProc fCheckFramebufferStatus;
270 GrGLDeleteFramebuffersProc fDeleteFramebuffers;
271 GrGLDeleteRenderbuffersProc fDeleteRenderbuffers;
272 GrGLFramebufferRenderbufferProc fFramebufferRenderbuffer;
273 GrGLFramebufferTexture2DProc fFramebufferTexture2D;
274 GrGLGenFramebuffersProc fGenFramebuffers;
275 GrGLGenRenderbuffersProc fGenRenderbuffers;
276 GrGLRenderbufferStorageProc fRenderbufferStorage;
277
278 // Multisampling Extension Functions
279 // same prototype for ARB_FBO, EXT_FBO, GL 3.0, & Apple ES extension
280 GrGLRenderbufferStorageMultisampleProc fRenderbufferStorageMultisample;
281 // desktop: ext_fbo_blit, arb_fbo, gl 3.0
282 GrGLBlitFramebufferProc fBlitFramebuffer;
283 // apple's es extension
284 GrGLResolveMultisampleFramebufferProc fResolveMultisampleFramebuffer;
285
twiz@google.com59a190b2011-03-14 21:23:01 +0000286 // Buffer mapping (extension in ES).
287 GrGLMapBufferProc fMapBuffer;
288 GrGLUnmapBufferProc fUnmapBuffer;
289};
290
291} // extern "C"
292
293#endif