| twiz@google.com | 59a190b | 2011-03-14 21:23:01 +0000 | [diff] [blame] | 1 | /* |
| 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" |
| 22 | |
| 23 | #if !defined(GR_GL_FUNCTION_TYPE) |
| 24 | #define GR_GL_FUNCTION_TYPE |
| 25 | #endif |
| 26 | |
| 27 | //////////////////////////////////////////////////////////////////////////////// |
| 28 | |
| 29 | /** |
| 30 | * Helpers for glGetString() |
| 31 | */ |
| 32 | bool has_gl_extension(const char* ext); |
| 33 | void gl_version(int* major, int* minor); |
| 34 | |
| 35 | //////////////////////////////////////////////////////////////////////////////// |
| 36 | |
| 37 | /* |
| 38 | * Routines managing the global interface used to invoke OpenGL calls. |
| 39 | */ |
| 40 | struct GrGLInterface; |
| 41 | extern GrGLInterface* GrGLGetGLInterface(); |
| 42 | extern void GrGLSetGLInterface(GrGLInterface* gl_interface); |
| 43 | |
| 44 | /* |
| 45 | * Populates the global GrGLInterface pointer with an instance pointing to the |
| 46 | * GL implementation linked with the executable. |
| 47 | */ |
| 48 | extern void GrGLSetDefaultGLInterface(); |
| 49 | |
| 50 | extern "C" { |
| 51 | /* |
| 52 | * The following interface exports the OpenGL entry points used by the system. |
| 53 | * Use of OpenGL calls is disallowed. All calls should be invoked through |
| 54 | * the global instance of this struct, defined above. |
| 55 | * |
| 56 | * IMPORTANT NOTE: The OpenGL entry points exposed here include both core GL |
| 57 | * functions, and extensions. The system assumes that the address of the |
| 58 | * extension pointer will be valid across contexts. |
| 59 | */ |
| 60 | struct GrGLInterface { |
| 61 | typedef GLvoid (GR_GL_FUNCTION_TYPE *GrGLActiveTextureProc)(GLenum texture); |
| 62 | typedef GLvoid (GR_GL_FUNCTION_TYPE *GrGLAttachShaderProc)(GLuint program, GLuint shader); |
| 63 | typedef GLvoid (GR_GL_FUNCTION_TYPE *GrGLBindAttribLocationProc)(GLuint program, GLuint index, const char* name); |
| 64 | typedef GLvoid (GR_GL_FUNCTION_TYPE *GrGLBindBufferProc)(GLenum target, GLuint buffer); |
| 65 | typedef GLvoid (GR_GL_FUNCTION_TYPE *GrGLBindTextureProc)(GLenum target, GLuint texture); |
| bsalomon@google.com | 080773c | 2011-03-15 19:09:25 +0000 | [diff] [blame^] | 66 | typedef GLvoid (GR_GL_FUNCTION_TYPE *GrGLBlendColorProc)(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); |
| twiz@google.com | 59a190b | 2011-03-14 21:23:01 +0000 | [diff] [blame] | 67 | typedef GLvoid (GR_GL_FUNCTION_TYPE *GrGLBlendFuncProc)(GLenum sfactor, GLenum dfactor); |
| 68 | typedef GLvoid (GR_GL_FUNCTION_TYPE *GrGLBufferDataProc)(GLenum target, GLsizei size, const void* data, GLenum usage); |
| 69 | typedef GLvoid (GR_GL_FUNCTION_TYPE *GrGLBufferSubDataProc)(GLenum target, GLint offset, GLsizei size, const void* data); |
| 70 | typedef GLvoid (GR_GL_FUNCTION_TYPE *GrGLClearProc)(GLbitfield mask); |
| 71 | typedef GLvoid (GR_GL_FUNCTION_TYPE *GrGLClearColorProc)(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); |
| 72 | typedef GLvoid (GR_GL_FUNCTION_TYPE *GrGLClearStencilProc)(GLint s); |
| 73 | typedef GLvoid (GR_GL_FUNCTION_TYPE *GrGLClientActiveTextureProc)(GLenum texture); |
| 74 | typedef GLvoid (GR_GL_FUNCTION_TYPE *GrGLColor4ubProc)(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha); |
| 75 | typedef GLvoid (GR_GL_FUNCTION_TYPE *GrGLColorMaskProc)(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); |
| 76 | typedef GLvoid (GR_GL_FUNCTION_TYPE *GrGLColorPointerProc)(GLint size, GLenum type, GLsizei stride, const GLvoid* pointer); |
| 77 | typedef GLvoid (GR_GL_FUNCTION_TYPE *GrGLCompileShaderProc)(GLuint shader); |
| 78 | typedef GLvoid (GR_GL_FUNCTION_TYPE *GrGLCompressedTexImage2DProc)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void* data); |
| 79 | typedef GLuint (GR_GL_FUNCTION_TYPE *GrGLCreateProgramProc)(void); |
| 80 | typedef GLuint (GR_GL_FUNCTION_TYPE *GrGLCreateShaderProc)(GLenum type); |
| 81 | typedef GLvoid (GR_GL_FUNCTION_TYPE *GrGLCullFaceProc)(GLenum mode); |
| 82 | typedef GLvoid (GR_GL_FUNCTION_TYPE *GrGLDeleteBuffersProc)(GLsizei n, const GLuint* buffers); |
| 83 | typedef GLvoid (GR_GL_FUNCTION_TYPE *GrGLDeleteProgramProc)(GLuint program); |
| 84 | typedef GLvoid (GR_GL_FUNCTION_TYPE *GrGLDeleteShaderProc)(GLuint shader); |
| 85 | typedef GLvoid (GR_GL_FUNCTION_TYPE *GrGLDeleteTexturesProc)(GLsizei n, const GLuint* textures); |
| 86 | typedef GLvoid (GR_GL_FUNCTION_TYPE *GrGLDepthMaskProc)(GLboolean flag); |
| 87 | typedef GLvoid (GR_GL_FUNCTION_TYPE *GrGLDisableProc)(GLenum cap); |
| 88 | typedef GLvoid (GR_GL_FUNCTION_TYPE *GrGLDisableClientStateProc)(GLenum array); |
| 89 | typedef GLvoid (GR_GL_FUNCTION_TYPE *GrGLDisableVertexAttribArrayProc)(GLuint index); |
| 90 | typedef GLvoid (GR_GL_FUNCTION_TYPE *GrGLDrawArraysProc)(GLenum mode, GLint first, GLsizei count); |
| 91 | typedef GLvoid (GR_GL_FUNCTION_TYPE *GrGLDrawElementsProc)(GLenum mode, GLsizei count, GLenum type, const void* indices); |
| 92 | typedef GLvoid (GR_GL_FUNCTION_TYPE *GrGLEnableProc)(GLenum cap); |
| 93 | typedef GLvoid (GR_GL_FUNCTION_TYPE *GrGLEnableClientStateProc)(GLenum cap); |
| 94 | typedef GLvoid (GR_GL_FUNCTION_TYPE *GrGLEnableVertexAttribArrayProc)(GLuint index); |
| 95 | typedef GLvoid (GR_GL_FUNCTION_TYPE *GrGLFrontFaceProc)(GLenum mode); |
| 96 | typedef GLvoid (GR_GL_FUNCTION_TYPE *GrGLGenBuffersProc)(GLsizei n, GLuint* buffers); |
| 97 | typedef GLenum (GR_GL_FUNCTION_TYPE *GrGLGetErrorProc)(void); |
| 98 | typedef GLvoid (GR_GL_FUNCTION_TYPE *GrGLGenTexturesProc)(GLsizei n, GLuint* textures); |
| 99 | typedef GLvoid (GR_GL_FUNCTION_TYPE *GrGLGetBufferParameterivProc)(GLenum target, GLenum pname, GLint* params); |
| 100 | typedef GLvoid (GR_GL_FUNCTION_TYPE *GrGLGetIntegervProc)(GLenum pname, GLint* params); |
| 101 | typedef GLvoid (GR_GL_FUNCTION_TYPE *GrGLGetProgramInfoLogProc)(GLuint program, GLsizei bufsize, GLsizei* length, char* infolog); |
| 102 | typedef GLvoid (GR_GL_FUNCTION_TYPE *GrGLGetProgramivProc)(GLuint program, GLenum pname, GLint* params); |
| 103 | typedef GLvoid (GR_GL_FUNCTION_TYPE *GrGLGetShaderInfoLogProc)(GLuint shader, GLsizei bufsize, GLsizei* length, char* infolog); |
| 104 | typedef GLvoid (GR_GL_FUNCTION_TYPE *GrGLGetShaderivProc)(GLuint shader, GLenum pname, GLint* params); |
| 105 | typedef const GLubyte* (GR_GL_FUNCTION_TYPE *GrGLGetStringProc)(GLenum name); |
| 106 | typedef GLint (GR_GL_FUNCTION_TYPE *GrGLGetUniformLocationProc)(GLuint program, const char* name); |
| 107 | typedef GLvoid (GR_GL_FUNCTION_TYPE *GrGLLineWidthProc)(GLfloat width); |
| 108 | typedef GLvoid (GR_GL_FUNCTION_TYPE *GrGLLinkProgramProc)(GLuint program); |
| 109 | typedef GLvoid (GR_GL_FUNCTION_TYPE *GrGLLoadMatrixfProc)(const GLfloat* m); |
| 110 | typedef GLvoid (GR_GL_FUNCTION_TYPE *GrGLMatrixModeProc)(GLenum mode); |
| 111 | typedef GLvoid (GR_GL_FUNCTION_TYPE *GrGLPixelStoreiProc)(GLenum pname, GLint param); |
| 112 | typedef GLvoid (GR_GL_FUNCTION_TYPE *GrGLPointSizeProc)(GLfloat size); |
| 113 | typedef GLvoid (GR_GL_FUNCTION_TYPE *GrGLReadPixelsProc)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void* pixels); |
| 114 | typedef GLvoid (GR_GL_FUNCTION_TYPE *GrGLScissorProc)(GLint x, GLint y, GLsizei width, GLsizei height); |
| 115 | typedef GLvoid (GR_GL_FUNCTION_TYPE *GrGLShadeModelProc)(GLenum mode); |
| 116 | typedef GLvoid (GR_GL_FUNCTION_TYPE *GrGLShaderSourceProc)(GLuint shader, GLsizei count, const char** str, const GLint* length); |
| 117 | typedef GLvoid (GR_GL_FUNCTION_TYPE *GrGLStencilFuncProc)(GLenum func, GLint ref, GLuint mask); |
| 118 | typedef GLvoid (GR_GL_FUNCTION_TYPE *GrGLStencilFuncSeparateProc)(GLenum face, GLenum func, GLint ref, GLuint mask); |
| 119 | typedef GLvoid (GR_GL_FUNCTION_TYPE *GrGLStencilMaskProc)(GLuint mask); |
| 120 | typedef GLvoid (GR_GL_FUNCTION_TYPE *GrGLStencilMaskSeparateProc)(GLenum face, GLuint mask); |
| 121 | typedef GLvoid (GR_GL_FUNCTION_TYPE *GrGLStencilOpProc)(GLenum fail, GLenum zfail, GLenum zpass); |
| 122 | typedef GLvoid (GR_GL_FUNCTION_TYPE *GrGLStencilOpSeparateProc)(GLenum face, GLenum fail, GLenum zfail, GLenum zpass); |
| 123 | typedef GLvoid (GR_GL_FUNCTION_TYPE *GrGLTexCoordPointerProc)(GLint size, GLenum type, GLsizei stride, const GLvoid* pointer); |
| 124 | typedef GLvoid (GR_GL_FUNCTION_TYPE *GrGLTexEnviProc)(GLenum target, GLenum pname, GLint param); |
| 125 | typedef GLvoid (GR_GL_FUNCTION_TYPE *GrGLTexImage2DProc)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void* pixels); |
| 126 | typedef GLvoid (GR_GL_FUNCTION_TYPE *GrGLTexParameteriProc)(GLenum target, GLenum pname, GLint param); |
| 127 | typedef GLvoid (GR_GL_FUNCTION_TYPE *GrGLTexSubImage2DProc)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void* pixels); |
| 128 | typedef GLvoid (GR_GL_FUNCTION_TYPE *GrGLUniform1fvProc)(GLint location, GLsizei count, const GLfloat* v); |
| 129 | typedef GLvoid (GR_GL_FUNCTION_TYPE *GrGLUniform1iProc)(GLint location, GLint x); |
| 130 | typedef GLvoid (GR_GL_FUNCTION_TYPE *GrGLUniform4fvProc)(GLint location, GLsizei count, const GLfloat* v); |
| 131 | typedef GLvoid (GR_GL_FUNCTION_TYPE *GrGLUniformMatrix3fvProc)(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value); |
| 132 | typedef GLvoid (GR_GL_FUNCTION_TYPE *GrGLUseProgramProc)(GLuint program); |
| 133 | typedef GLvoid (GR_GL_FUNCTION_TYPE *GrGLVertexAttrib4fvProc)(GLuint indx, const GLfloat* values); |
| 134 | typedef GLvoid (GR_GL_FUNCTION_TYPE *GrGLVertexAttribPointerProc)(GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void* ptr); |
| 135 | typedef GLvoid (GR_GL_FUNCTION_TYPE *GrGLVertexPointerProc)(GLint size, GLenum type, GLsizei stride, const GLvoid* pointer); |
| 136 | typedef GLvoid (GR_GL_FUNCTION_TYPE *GrGLViewportProc)(GLint x, GLint y, GLsizei width, GLsizei height); |
| 137 | |
| 138 | // FBO Extension Functions |
| 139 | typedef GLvoid (GR_GL_FUNCTION_TYPE *GrGLBindFramebufferProc)(GLenum target, GLuint framebuffer); |
| 140 | typedef GLvoid (GR_GL_FUNCTION_TYPE *GrGLBindRenderbufferProc)(GLenum target, GLuint renderbuffer); |
| 141 | typedef GLenum (GR_GL_FUNCTION_TYPE *GrGLCheckFramebufferStatusProc)(GLenum target); |
| 142 | typedef GLvoid (GR_GL_FUNCTION_TYPE *GrGLDeleteFramebuffersProc)(GLsizei n, const GLuint *framebuffers); |
| 143 | typedef GLvoid (GR_GL_FUNCTION_TYPE *GrGLDeleteRenderbuffersProc)(GLsizei n, const GLuint *renderbuffers); |
| 144 | typedef GLvoid (GR_GL_FUNCTION_TYPE *GrGLFramebufferRenderbufferProc)(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); |
| 145 | typedef GLvoid (GR_GL_FUNCTION_TYPE *GrGLFramebufferTexture2DProc)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); |
| 146 | typedef GLvoid (GR_GL_FUNCTION_TYPE *GrGLGenFramebuffersProc)(GLsizei n, GLuint *framebuffers); |
| 147 | typedef GLvoid (GR_GL_FUNCTION_TYPE *GrGLGenRenderbuffersProc)(GLsizei n, GLuint *renderbuffers); |
| 148 | typedef GLvoid (GR_GL_FUNCTION_TYPE *GrGLRenderbufferStorageProc)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height); |
| 149 | |
| 150 | // Multisampling Extension Functions |
| 151 | // same prototype for ARB_FBO, EXT_FBO, GL 3.0, & Apple ES extension |
| 152 | typedef GLvoid (GR_GL_FUNCTION_TYPE *GrGLRenderbufferStorageMultisampleProc)(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); |
| 153 | // desktop: ext_fbo_blit, arb_fbo, gl 3.0 |
| 154 | typedef GLvoid (GR_GL_FUNCTION_TYPE *GrGLBlitFramebufferProc)(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); |
| 155 | // apple's es extension |
| 156 | typedef GLvoid (GR_GL_FUNCTION_TYPE *GrGLResolveMultisampleFramebufferProc)(); |
| 157 | |
| 158 | // IMG'e es extension |
| 159 | typedef GLvoid (GR_GL_FUNCTION_TYPE *GrGLFramebufferTexture2DMultisampleProc)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples); |
| 160 | |
| 161 | // Buffer mapping (extension in ES). |
| 162 | typedef GLvoid* (GR_GL_FUNCTION_TYPE *GrGLMapBufferProc)(GLenum target, GLenum access); |
| 163 | typedef GLboolean (GR_GL_FUNCTION_TYPE *GrGLUnmapBufferProc)(GLenum target); |
| 164 | |
| 165 | GrGLActiveTextureProc fActiveTexture; |
| 166 | GrGLAttachShaderProc fAttachShader; |
| 167 | GrGLBindAttribLocationProc fBindAttribLocation; |
| 168 | GrGLBindBufferProc fBindBuffer; |
| 169 | GrGLBindTextureProc fBindTexture; |
| 170 | GrGLBlendFuncProc fBlendFunc; |
| bsalomon@google.com | 080773c | 2011-03-15 19:09:25 +0000 | [diff] [blame^] | 171 | GrGLBlendColorProc fBlendColor; |
| twiz@google.com | 59a190b | 2011-03-14 21:23:01 +0000 | [diff] [blame] | 172 | GrGLBufferDataProc fBufferData; |
| 173 | GrGLBufferSubDataProc fBufferSubData; |
| 174 | GrGLClearProc fClear; |
| 175 | GrGLClearColorProc fClearColor; |
| 176 | GrGLClearStencilProc fClearStencil; |
| 177 | GrGLClientActiveTextureProc fClientActiveTexture; |
| 178 | GrGLColor4ubProc fColor4ub; |
| 179 | GrGLColorMaskProc fColorMask; |
| 180 | GrGLColorPointerProc fColorPointer; |
| 181 | GrGLCompileShaderProc fCompileShader; |
| 182 | GrGLCompressedTexImage2DProc fCompressedTexImage2D; |
| 183 | GrGLCreateProgramProc fCreateProgram; |
| 184 | GrGLCreateShaderProc fCreateShader; |
| 185 | GrGLCullFaceProc fCullFace; |
| 186 | GrGLDeleteBuffersProc fDeleteBuffers; |
| 187 | GrGLDeleteProgramProc fDeleteProgram; |
| 188 | GrGLDeleteShaderProc fDeleteShader; |
| 189 | GrGLDeleteTexturesProc fDeleteTextures; |
| 190 | GrGLDepthMaskProc fDepthMask; |
| 191 | GrGLDisableProc fDisable; |
| 192 | GrGLDisableClientStateProc fDisableClientState; |
| 193 | GrGLDisableVertexAttribArrayProc fDisableVertexAttribArray; |
| 194 | GrGLDrawArraysProc fDrawArrays; |
| 195 | GrGLDrawElementsProc fDrawElements; |
| 196 | GrGLEnableProc fEnable; |
| 197 | GrGLEnableClientStateProc fEnableClientState; |
| 198 | GrGLEnableVertexAttribArrayProc fEnableVertexAttribArray; |
| 199 | GrGLFrontFaceProc fFrontFace; |
| 200 | GrGLGenBuffersProc fGenBuffers; |
| 201 | GrGLGenTexturesProc fGenTextures; |
| 202 | GrGLGetBufferParameterivProc fGetBufferParameteriv; |
| 203 | GrGLGetErrorProc fGetError; |
| 204 | GrGLGetIntegervProc fGetIntegerv; |
| 205 | GrGLGetProgramInfoLogProc fGetProgramInfoLog; |
| 206 | GrGLGetProgramivProc fGetProgramiv; |
| 207 | GrGLGetShaderInfoLogProc fGetShaderInfoLog; |
| 208 | GrGLGetShaderivProc fGetShaderiv; |
| 209 | GrGLGetStringProc fGetString; |
| 210 | GrGLGetUniformLocationProc fGetUniformLocation; |
| 211 | GrGLLineWidthProc fLineWidth; |
| 212 | GrGLLinkProgramProc fLinkProgram; |
| 213 | GrGLLoadMatrixfProc fLoadMatrixf; |
| 214 | GrGLMatrixModeProc fMatrixMode; |
| 215 | GrGLPixelStoreiProc fPixelStorei; |
| 216 | GrGLPointSizeProc fPointSize; |
| 217 | GrGLReadPixelsProc fReadPixels; |
| 218 | GrGLScissorProc fScissor; |
| 219 | GrGLShadeModelProc fShadeModel; |
| 220 | GrGLShaderSourceProc fShaderSource; |
| 221 | GrGLStencilFuncProc fStencilFunc; |
| 222 | GrGLStencilFuncSeparateProc fStencilFuncSeparate; |
| 223 | GrGLStencilMaskProc fStencilMask; |
| 224 | GrGLStencilMaskSeparateProc fStencilMaskSeparate; |
| 225 | GrGLStencilOpProc fStencilOp; |
| 226 | GrGLStencilOpSeparateProc fStencilOpSeparate; |
| 227 | GrGLTexCoordPointerProc fTexCoordPointer; |
| 228 | GrGLTexEnviProc fTexEnvi; |
| 229 | GrGLTexImage2DProc fTexImage2D; |
| 230 | GrGLTexParameteriProc fTexParameteri; |
| 231 | GrGLTexSubImage2DProc fTexSubImage2D; |
| 232 | GrGLUniform1fvProc fUniform1fv; |
| 233 | GrGLUniform1iProc fUniform1i; |
| 234 | GrGLUniform4fvProc fUniform4fv; |
| 235 | GrGLUniformMatrix3fvProc fUniformMatrix3fv; |
| 236 | GrGLUseProgramProc fUseProgram; |
| 237 | GrGLVertexAttrib4fvProc fVertexAttrib4fv; |
| 238 | GrGLVertexAttribPointerProc fVertexAttribPointer; |
| 239 | GrGLVertexPointerProc fVertexPointer; |
| 240 | GrGLViewportProc fViewport; |
| 241 | |
| 242 | // FBO Extension Functions |
| 243 | GrGLBindFramebufferProc fBindFramebuffer; |
| 244 | GrGLBindRenderbufferProc fBindRenderbuffer; |
| 245 | GrGLCheckFramebufferStatusProc fCheckFramebufferStatus; |
| 246 | GrGLDeleteFramebuffersProc fDeleteFramebuffers; |
| 247 | GrGLDeleteRenderbuffersProc fDeleteRenderbuffers; |
| 248 | GrGLFramebufferRenderbufferProc fFramebufferRenderbuffer; |
| 249 | GrGLFramebufferTexture2DProc fFramebufferTexture2D; |
| 250 | GrGLGenFramebuffersProc fGenFramebuffers; |
| 251 | GrGLGenRenderbuffersProc fGenRenderbuffers; |
| 252 | GrGLRenderbufferStorageProc fRenderbufferStorage; |
| 253 | |
| 254 | // Multisampling Extension Functions |
| 255 | // same prototype for ARB_FBO, EXT_FBO, GL 3.0, & Apple ES extension |
| 256 | GrGLRenderbufferStorageMultisampleProc fRenderbufferStorageMultisample; |
| 257 | // desktop: ext_fbo_blit, arb_fbo, gl 3.0 |
| 258 | GrGLBlitFramebufferProc fBlitFramebuffer; |
| 259 | // apple's es extension |
| 260 | GrGLResolveMultisampleFramebufferProc fResolveMultisampleFramebuffer; |
| 261 | |
| 262 | // IMG'e es extension |
| 263 | GrGLFramebufferTexture2DMultisampleProc fFramebufferTexture2DMultisample; |
| 264 | |
| 265 | // Buffer mapping (extension in ES). |
| 266 | GrGLMapBufferProc fMapBuffer; |
| 267 | GrGLUnmapBufferProc fUnmapBuffer; |
| 268 | }; |
| 269 | |
| 270 | } // extern "C" |
| 271 | |
| 272 | #endif |