| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 Google Inc. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 | 8 |
| 9 #include "gl/GrGLInterface.h" | 9 #include "gl/GrGLInterface.h" |
| 10 #include "gl/GrGLExtensions.h" | 10 #include "gl/GrGLExtensions.h" |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 , fBindVertexArray(&fFunctions.fBindVertexArray) | 108 , fBindVertexArray(&fFunctions.fBindVertexArray) |
| 109 , fBlendColor(&fFunctions.fBlendColor) | 109 , fBlendColor(&fFunctions.fBlendColor) |
| 110 , fBlendFunc(&fFunctions.fBlendFunc) | 110 , fBlendFunc(&fFunctions.fBlendFunc) |
| 111 , fBlitFramebuffer(&fFunctions.fBlitFramebuffer) | 111 , fBlitFramebuffer(&fFunctions.fBlitFramebuffer) |
| 112 , fBufferData(&fFunctions.fBufferData) | 112 , fBufferData(&fFunctions.fBufferData) |
| 113 , fBufferSubData(&fFunctions.fBufferSubData) | 113 , fBufferSubData(&fFunctions.fBufferSubData) |
| 114 , fCheckFramebufferStatus(&fFunctions.fCheckFramebufferStatus) | 114 , fCheckFramebufferStatus(&fFunctions.fCheckFramebufferStatus) |
| 115 , fClear(&fFunctions.fClear) | 115 , fClear(&fFunctions.fClear) |
| 116 , fClearColor(&fFunctions.fClearColor) | 116 , fClearColor(&fFunctions.fClearColor) |
| 117 , fClearStencil(&fFunctions.fClearStencil) | 117 , fClearStencil(&fFunctions.fClearStencil) |
| 118 , fClientActiveTexture(&fFunctions.fClientActiveTexture) | |
| 119 , fColorMask(&fFunctions.fColorMask) | 118 , fColorMask(&fFunctions.fColorMask) |
| 120 , fCompileShader(&fFunctions.fCompileShader) | 119 , fCompileShader(&fFunctions.fCompileShader) |
| 121 , fCompressedTexImage2D(&fFunctions.fCompressedTexImage2D) | 120 , fCompressedTexImage2D(&fFunctions.fCompressedTexImage2D) |
| 122 , fCopyTexSubImage2D(&fFunctions.fCopyTexSubImage2D) | 121 , fCopyTexSubImage2D(&fFunctions.fCopyTexSubImage2D) |
| 123 , fCreateProgram(&fFunctions.fCreateProgram) | 122 , fCreateProgram(&fFunctions.fCreateProgram) |
| 124 , fCreateShader(&fFunctions.fCreateShader) | 123 , fCreateShader(&fFunctions.fCreateShader) |
| 125 , fCullFace(&fFunctions.fCullFace) | 124 , fCullFace(&fFunctions.fCullFace) |
| 126 , fDeleteBuffers(&fFunctions.fDeleteBuffers) | 125 , fDeleteBuffers(&fFunctions.fDeleteBuffers) |
| 127 , fDeleteFramebuffers(&fFunctions.fDeleteFramebuffers) | 126 , fDeleteFramebuffers(&fFunctions.fDeleteFramebuffers) |
| 128 , fDeleteProgram(&fFunctions.fDeleteProgram) | 127 , fDeleteProgram(&fFunctions.fDeleteProgram) |
| 129 , fDeleteQueries(&fFunctions.fDeleteQueries) | 128 , fDeleteQueries(&fFunctions.fDeleteQueries) |
| 130 , fDeleteRenderbuffers(&fFunctions.fDeleteRenderbuffers) | 129 , fDeleteRenderbuffers(&fFunctions.fDeleteRenderbuffers) |
| 131 , fDeleteShader(&fFunctions.fDeleteShader) | 130 , fDeleteShader(&fFunctions.fDeleteShader) |
| 132 , fDeleteTextures(&fFunctions.fDeleteTextures) | 131 , fDeleteTextures(&fFunctions.fDeleteTextures) |
| 133 , fDeleteVertexArrays(&fFunctions.fDeleteVertexArrays) | 132 , fDeleteVertexArrays(&fFunctions.fDeleteVertexArrays) |
| 134 , fDepthMask(&fFunctions.fDepthMask) | 133 , fDepthMask(&fFunctions.fDepthMask) |
| 135 , fDisable(&fFunctions.fDisable) | 134 , fDisable(&fFunctions.fDisable) |
| 136 , fDisableClientState(&fFunctions.fDisableClientState) | |
| 137 , fDisableVertexAttribArray(&fFunctions.fDisableVertexAttribArray) | 135 , fDisableVertexAttribArray(&fFunctions.fDisableVertexAttribArray) |
| 138 , fDrawArrays(&fFunctions.fDrawArrays) | 136 , fDrawArrays(&fFunctions.fDrawArrays) |
| 139 , fDrawBuffer(&fFunctions.fDrawBuffer) | 137 , fDrawBuffer(&fFunctions.fDrawBuffer) |
| 140 , fDrawBuffers(&fFunctions.fDrawBuffers) | 138 , fDrawBuffers(&fFunctions.fDrawBuffers) |
| 141 , fDrawElements(&fFunctions.fDrawElements) | 139 , fDrawElements(&fFunctions.fDrawElements) |
| 142 , fEnable(&fFunctions.fEnable) | 140 , fEnable(&fFunctions.fEnable) |
| 143 , fEnableClientState(&fFunctions.fEnableClientState) | |
| 144 , fEnableVertexAttribArray(&fFunctions.fEnableVertexAttribArray) | 141 , fEnableVertexAttribArray(&fFunctions.fEnableVertexAttribArray) |
| 145 , fEndQuery(&fFunctions.fEndQuery) | 142 , fEndQuery(&fFunctions.fEndQuery) |
| 146 , fFinish(&fFunctions.fFinish) | 143 , fFinish(&fFunctions.fFinish) |
| 147 , fFlush(&fFunctions.fFlush) | 144 , fFlush(&fFunctions.fFlush) |
| 148 , fFramebufferRenderbuffer(&fFunctions.fFramebufferRenderbuffer) | 145 , fFramebufferRenderbuffer(&fFunctions.fFramebufferRenderbuffer) |
| 149 , fFramebufferTexture2D(&fFunctions.fFramebufferTexture2D) | 146 , fFramebufferTexture2D(&fFunctions.fFramebufferTexture2D) |
| 150 , fFramebufferTexture2DMultisample(&fFunctions.fFramebufferTexture2DMultisam
ple) | 147 , fFramebufferTexture2DMultisample(&fFunctions.fFramebufferTexture2DMultisam
ple) |
| 151 , fFrontFace(&fFunctions.fFrontFace) | 148 , fFrontFace(&fFunctions.fFrontFace) |
| 152 , fGenBuffers(&fFunctions.fGenBuffers) | 149 , fGenBuffers(&fFunctions.fGenBuffers) |
| 153 , fGenFramebuffers(&fFunctions.fGenFramebuffers) | 150 , fGenFramebuffers(&fFunctions.fGenFramebuffers) |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 194 , fBindUniformLocation(&fFunctions.fBindUniformLocation) | 191 , fBindUniformLocation(&fFunctions.fBindUniformLocation) |
| 195 , fResolveMultisampleFramebuffer(&fFunctions.fResolveMultisampleFramebuffer) | 192 , fResolveMultisampleFramebuffer(&fFunctions.fResolveMultisampleFramebuffer) |
| 196 , fScissor(&fFunctions.fScissor) | 193 , fScissor(&fFunctions.fScissor) |
| 197 , fShaderSource(&fFunctions.fShaderSource) | 194 , fShaderSource(&fFunctions.fShaderSource) |
| 198 , fStencilFunc(&fFunctions.fStencilFunc) | 195 , fStencilFunc(&fFunctions.fStencilFunc) |
| 199 , fStencilFuncSeparate(&fFunctions.fStencilFuncSeparate) | 196 , fStencilFuncSeparate(&fFunctions.fStencilFuncSeparate) |
| 200 , fStencilMask(&fFunctions.fStencilMask) | 197 , fStencilMask(&fFunctions.fStencilMask) |
| 201 , fStencilMaskSeparate(&fFunctions.fStencilMaskSeparate) | 198 , fStencilMaskSeparate(&fFunctions.fStencilMaskSeparate) |
| 202 , fStencilOp(&fFunctions.fStencilOp) | 199 , fStencilOp(&fFunctions.fStencilOp) |
| 203 , fStencilOpSeparate(&fFunctions.fStencilOpSeparate) | 200 , fStencilOpSeparate(&fFunctions.fStencilOpSeparate) |
| 204 , fTexGenf(&fFunctions.fTexGenf) | |
| 205 , fTexGenfv(&fFunctions.fTexGenfv) | 201 , fTexGenfv(&fFunctions.fTexGenfv) |
| 206 , fTexGeni(&fFunctions.fTexGeni) | 202 , fTexGeni(&fFunctions.fTexGeni) |
| 207 , fTexImage2D(&fFunctions.fTexImage2D) | 203 , fTexImage2D(&fFunctions.fTexImage2D) |
| 208 , fTexParameteri(&fFunctions.fTexParameteri) | 204 , fTexParameteri(&fFunctions.fTexParameteri) |
| 209 , fTexParameteriv(&fFunctions.fTexParameteriv) | 205 , fTexParameteriv(&fFunctions.fTexParameteriv) |
| 210 , fTexSubImage2D(&fFunctions.fTexSubImage2D) | 206 , fTexSubImage2D(&fFunctions.fTexSubImage2D) |
| 211 , fTexStorage2D(&fFunctions.fTexStorage2D) | 207 , fTexStorage2D(&fFunctions.fTexStorage2D) |
| 212 , fDiscardFramebuffer(&fFunctions.fDiscardFramebuffer) | 208 , fDiscardFramebuffer(&fFunctions.fDiscardFramebuffer) |
| 213 , fUniform1f(&fFunctions.fUniform1f) | 209 , fUniform1f(&fFunctions.fUniform1f) |
| 214 , fUniform1i(&fFunctions.fUniform1i) | 210 , fUniform1i(&fFunctions.fUniform1i) |
| (...skipping 11 matching lines...) Expand all Loading... |
| 226 , fUniform4i(&fFunctions.fUniform4i) | 222 , fUniform4i(&fFunctions.fUniform4i) |
| 227 , fUniform4fv(&fFunctions.fUniform4fv) | 223 , fUniform4fv(&fFunctions.fUniform4fv) |
| 228 , fUniform4iv(&fFunctions.fUniform4iv) | 224 , fUniform4iv(&fFunctions.fUniform4iv) |
| 229 , fUniformMatrix2fv(&fFunctions.fUniformMatrix2fv) | 225 , fUniformMatrix2fv(&fFunctions.fUniformMatrix2fv) |
| 230 , fUniformMatrix3fv(&fFunctions.fUniformMatrix3fv) | 226 , fUniformMatrix3fv(&fFunctions.fUniformMatrix3fv) |
| 231 , fUniformMatrix4fv(&fFunctions.fUniformMatrix4fv) | 227 , fUniformMatrix4fv(&fFunctions.fUniformMatrix4fv) |
| 232 , fUnmapBuffer(&fFunctions.fUnmapBuffer) | 228 , fUnmapBuffer(&fFunctions.fUnmapBuffer) |
| 233 , fUseProgram(&fFunctions.fUseProgram) | 229 , fUseProgram(&fFunctions.fUseProgram) |
| 234 , fVertexAttrib4fv(&fFunctions.fVertexAttrib4fv) | 230 , fVertexAttrib4fv(&fFunctions.fVertexAttrib4fv) |
| 235 , fVertexAttribPointer(&fFunctions.fVertexAttribPointer) | 231 , fVertexAttribPointer(&fFunctions.fVertexAttribPointer) |
| 236 , fVertexPointer(&fFunctions.fVertexPointer) | |
| 237 , fViewport(&fFunctions.fViewport) | 232 , fViewport(&fFunctions.fViewport) |
| 238 , fPathCommands(&fFunctions.fPathCommands) | 233 , fPathCommands(&fFunctions.fPathCommands) |
| 239 , fPathCoords(&fFunctions.fPathCoords) | 234 , fPathCoords(&fFunctions.fPathCoords) |
| 240 , fPathSubCommands(&fFunctions.fPathSubCommands) | 235 , fPathSubCommands(&fFunctions.fPathSubCommands) |
| 241 , fPathSubCoords(&fFunctions.fPathSubCoords) | 236 , fPathSubCoords(&fFunctions.fPathSubCoords) |
| 242 , fPathString(&fFunctions.fPathString) | 237 , fPathString(&fFunctions.fPathString) |
| 243 , fPathGlyphs(&fFunctions.fPathGlyphs) | 238 , fPathGlyphs(&fFunctions.fPathGlyphs) |
| 244 , fPathGlyphRange(&fFunctions.fPathGlyphRange) | 239 , fPathGlyphRange(&fFunctions.fPathGlyphRange) |
| 245 , fWeightPaths(&fFunctions.fWeightPaths) | 240 , fWeightPaths(&fFunctions.fWeightPaths) |
| 246 , fCopyPath(&fFunctions.fCopyPath) | 241 , fCopyPath(&fFunctions.fCopyPath) |
| (...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 476 NULL == fFunctions.fGetQueryObjectui64v) { | 471 NULL == fFunctions.fGetQueryObjectui64v) { |
| 477 return false; | 472 return false; |
| 478 } | 473 } |
| 479 } | 474 } |
| 480 if (glVer >= GR_GL_VER(3,3) || fExtensions.has("GL_ARB_timer_query")) { | 475 if (glVer >= GR_GL_VER(3,3) || fExtensions.has("GL_ARB_timer_query")) { |
| 481 if (NULL == fFunctions.fQueryCounter) { | 476 if (NULL == fFunctions.fQueryCounter) { |
| 482 return false; | 477 return false; |
| 483 } | 478 } |
| 484 } | 479 } |
| 485 if (!isCoreProfile) { | 480 if (!isCoreProfile) { |
| 486 if (NULL == fFunctions.fClientActiveTexture || | 481 if (NULL == fFunctions.fLoadIdentity || |
| 487 NULL == fFunctions.fDisableClientState || | |
| 488 NULL == fFunctions.fEnableClientState || | |
| 489 NULL == fFunctions.fLoadIdentity || | |
| 490 NULL == fFunctions.fLoadMatrixf || | 482 NULL == fFunctions.fLoadMatrixf || |
| 491 NULL == fFunctions.fMatrixMode || | 483 NULL == fFunctions.fMatrixMode || |
| 492 NULL == fFunctions.fTexGenf || | |
| 493 NULL == fFunctions.fTexGenfv || | 484 NULL == fFunctions.fTexGenfv || |
| 494 NULL == fFunctions.fTexGeni || | 485 NULL == fFunctions.fTexGeni) { |
| 495 NULL == fFunctions.fVertexPointer) { | |
| 496 return false; | 486 return false; |
| 497 } | 487 } |
| 498 } | 488 } |
| 499 if (fExtensions.has("GL_NV_path_rendering")) { | 489 if (fExtensions.has("GL_NV_path_rendering")) { |
| 500 if (NULL == fFunctions.fPathCommands || | 490 if (NULL == fFunctions.fPathCommands || |
| 501 NULL == fFunctions.fPathCoords || | 491 NULL == fFunctions.fPathCoords || |
| 502 NULL == fFunctions.fPathSubCommands || | 492 NULL == fFunctions.fPathSubCommands || |
| 503 NULL == fFunctions.fPathSubCoords || | 493 NULL == fFunctions.fPathSubCoords || |
| 504 NULL == fFunctions.fPathString || | 494 NULL == fFunctions.fPathString || |
| 505 NULL == fFunctions.fPathGlyphs || | 495 NULL == fFunctions.fPathGlyphs || |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 680 if (fExtensions.has("GL_EXT_debug_marker")) { | 670 if (fExtensions.has("GL_EXT_debug_marker")) { |
| 681 if (NULL == fFunctions.fInsertEventMarker || | 671 if (NULL == fFunctions.fInsertEventMarker || |
| 682 NULL == fFunctions.fPushGroupMarker || | 672 NULL == fFunctions.fPushGroupMarker || |
| 683 NULL == fFunctions.fPopGroupMarker) { | 673 NULL == fFunctions.fPopGroupMarker) { |
| 684 return false; | 674 return false; |
| 685 } | 675 } |
| 686 } | 676 } |
| 687 #endif | 677 #endif |
| 688 return true; | 678 return true; |
| 689 } | 679 } |
| OLD | NEW |