| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 Google Inc. |
| 4 * | 4 * |
| 5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
| 6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 | 9 |
| 10 #include "gl/GrGLInterface.h" | 10 #include "gl/GrGLInterface.h" |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 extensions.has("GL_ARB_imaging") || | 56 extensions.has("GL_ARB_imaging") || |
| 57 extensions.has("GL_EXT_blend_color")) { | 57 extensions.has("GL_EXT_blend_color")) { |
| 58 GR_GL_GET_PROC(BlendColor); | 58 GR_GL_GET_PROC(BlendColor); |
| 59 } | 59 } |
| 60 | 60 |
| 61 GR_GL_GET_PROC(BufferData); | 61 GR_GL_GET_PROC(BufferData); |
| 62 GR_GL_GET_PROC(BufferSubData); | 62 GR_GL_GET_PROC(BufferSubData); |
| 63 functions->fClear = glClear; | 63 functions->fClear = glClear; |
| 64 functions->fClearColor = glClearColor; | 64 functions->fClearColor = glClearColor; |
| 65 functions->fClearStencil = glClearStencil; | 65 functions->fClearStencil = glClearStencil; |
| 66 functions->fClientActiveTexture = glClientActiveTexture; | |
| 67 functions->fColorMask = glColorMask; | 66 functions->fColorMask = glColorMask; |
| 68 GR_GL_GET_PROC(CompileShader); | 67 GR_GL_GET_PROC(CompileShader); |
| 69 functions->fCompressedTexImage2D = glCompressedTexImage2D; | 68 functions->fCompressedTexImage2D = glCompressedTexImage2D; |
| 70 functions->fCopyTexSubImage2D = glCopyTexSubImage2D; | 69 functions->fCopyTexSubImage2D = glCopyTexSubImage2D; |
| 71 GR_GL_GET_PROC(CreateProgram); | 70 GR_GL_GET_PROC(CreateProgram); |
| 72 GR_GL_GET_PROC(CreateShader); | 71 GR_GL_GET_PROC(CreateShader); |
| 73 functions->fCullFace = glCullFace; | 72 functions->fCullFace = glCullFace; |
| 74 GR_GL_GET_PROC(DeleteBuffers); | 73 GR_GL_GET_PROC(DeleteBuffers); |
| 75 GR_GL_GET_PROC(DeleteProgram); | 74 GR_GL_GET_PROC(DeleteProgram); |
| 76 GR_GL_GET_PROC(DeleteQueries); | 75 GR_GL_GET_PROC(DeleteQueries); |
| 77 GR_GL_GET_PROC(DeleteShader); | 76 GR_GL_GET_PROC(DeleteShader); |
| 78 functions->fDeleteTextures = glDeleteTextures; | 77 functions->fDeleteTextures = glDeleteTextures; |
| 79 functions->fDepthMask = glDepthMask; | 78 functions->fDepthMask = glDepthMask; |
| 80 functions->fDisable = glDisable; | 79 functions->fDisable = glDisable; |
| 81 functions->fDisableClientState = glDisableClientState; | |
| 82 GR_GL_GET_PROC(DisableVertexAttribArray); | 80 GR_GL_GET_PROC(DisableVertexAttribArray); |
| 83 functions->fDrawArrays = glDrawArrays; | 81 functions->fDrawArrays = glDrawArrays; |
| 84 functions->fDrawBuffer = glDrawBuffer; | 82 functions->fDrawBuffer = glDrawBuffer; |
| 85 GR_GL_GET_PROC(DrawBuffers); | 83 GR_GL_GET_PROC(DrawBuffers); |
| 86 functions->fDrawElements = glDrawElements; | 84 functions->fDrawElements = glDrawElements; |
| 87 functions->fEnable = glEnable; | 85 functions->fEnable = glEnable; |
| 88 functions->fEnableClientState = glEnableClientState; | |
| 89 GR_GL_GET_PROC(EnableVertexAttribArray); | 86 GR_GL_GET_PROC(EnableVertexAttribArray); |
| 90 GR_GL_GET_PROC(EndQuery); | 87 GR_GL_GET_PROC(EndQuery); |
| 91 functions->fFinish = glFinish; | 88 functions->fFinish = glFinish; |
| 92 functions->fFlush = glFlush; | 89 functions->fFlush = glFlush; |
| 93 functions->fFrontFace = glFrontFace; | 90 functions->fFrontFace = glFrontFace; |
| 94 GR_GL_GET_PROC(GenBuffers); | 91 GR_GL_GET_PROC(GenBuffers); |
| 95 GR_GL_GET_PROC(GenerateMipmap); | 92 GR_GL_GET_PROC(GenerateMipmap); |
| 96 GR_GL_GET_PROC(GetBufferParameteriv); | 93 GR_GL_GET_PROC(GetBufferParameteriv); |
| 97 functions->fGetError = glGetError; | 94 functions->fGetError = glGetError; |
| 98 functions->fGetIntegerv = glGetIntegerv; | 95 functions->fGetIntegerv = glGetIntegerv; |
| (...skipping 26 matching lines...) Expand all Loading... |
| 125 functions->fReadPixels = glReadPixels; | 122 functions->fReadPixels = glReadPixels; |
| 126 functions->fScissor = glScissor; | 123 functions->fScissor = glScissor; |
| 127 GR_GL_GET_PROC(ShaderSource); | 124 GR_GL_GET_PROC(ShaderSource); |
| 128 functions->fStencilFunc = glStencilFunc; | 125 functions->fStencilFunc = glStencilFunc; |
| 129 GR_GL_GET_PROC(StencilFuncSeparate); | 126 GR_GL_GET_PROC(StencilFuncSeparate); |
| 130 functions->fStencilMask = glStencilMask; | 127 functions->fStencilMask = glStencilMask; |
| 131 GR_GL_GET_PROC(StencilMaskSeparate); | 128 GR_GL_GET_PROC(StencilMaskSeparate); |
| 132 functions->fStencilOp = glStencilOp; | 129 functions->fStencilOp = glStencilOp; |
| 133 GR_GL_GET_PROC(StencilOpSeparate); | 130 GR_GL_GET_PROC(StencilOpSeparate); |
| 134 functions->fTexImage2D = glTexImage2D; | 131 functions->fTexImage2D = glTexImage2D; |
| 135 functions->fTexGenf = glTexGenf; | |
| 136 functions->fTexGenfv = glTexGenfv; | 132 functions->fTexGenfv = glTexGenfv; |
| 137 functions->fTexGeni = glTexGeni; | 133 functions->fTexGeni = glTexGeni; |
| 138 functions->fTexParameteri = glTexParameteri; | 134 functions->fTexParameteri = glTexParameteri; |
| 139 functions->fTexParameteriv = glTexParameteriv; | 135 functions->fTexParameteriv = glTexParameteriv; |
| 140 if (glVer >= GR_GL_VER(4,2) || extensions.has("GL_ARB_texture_storage"))
{ | 136 if (glVer >= GR_GL_VER(4,2) || extensions.has("GL_ARB_texture_storage"))
{ |
| 141 GR_GL_GET_PROC(TexStorage2D); | 137 GR_GL_GET_PROC(TexStorage2D); |
| 142 } else if (extensions.has("GL_EXT_texture_storage")) { | 138 } else if (extensions.has("GL_EXT_texture_storage")) { |
| 143 GR_GL_GET_PROC_SUFFIX(TexStorage2D, EXT); | 139 GR_GL_GET_PROC_SUFFIX(TexStorage2D, EXT); |
| 144 } | 140 } |
| 145 functions->fTexSubImage2D = glTexSubImage2D; | 141 functions->fTexSubImage2D = glTexSubImage2D; |
| (...skipping 13 matching lines...) Expand all Loading... |
| 159 GR_GL_GET_PROC(Uniform4i); | 155 GR_GL_GET_PROC(Uniform4i); |
| 160 GR_GL_GET_PROC(Uniform4fv); | 156 GR_GL_GET_PROC(Uniform4fv); |
| 161 GR_GL_GET_PROC(Uniform4iv); | 157 GR_GL_GET_PROC(Uniform4iv); |
| 162 GR_GL_GET_PROC(UniformMatrix2fv); | 158 GR_GL_GET_PROC(UniformMatrix2fv); |
| 163 GR_GL_GET_PROC(UniformMatrix3fv); | 159 GR_GL_GET_PROC(UniformMatrix3fv); |
| 164 GR_GL_GET_PROC(UniformMatrix4fv); | 160 GR_GL_GET_PROC(UniformMatrix4fv); |
| 165 GR_GL_GET_PROC(UnmapBuffer); | 161 GR_GL_GET_PROC(UnmapBuffer); |
| 166 GR_GL_GET_PROC(UseProgram); | 162 GR_GL_GET_PROC(UseProgram); |
| 167 GR_GL_GET_PROC(VertexAttrib4fv); | 163 GR_GL_GET_PROC(VertexAttrib4fv); |
| 168 GR_GL_GET_PROC(VertexAttribPointer); | 164 GR_GL_GET_PROC(VertexAttribPointer); |
| 169 GR_GL_GET_PROC(VertexPointer); | |
| 170 functions->fViewport = glViewport; | 165 functions->fViewport = glViewport; |
| 171 GR_GL_GET_PROC(BindFragDataLocationIndexed); | 166 GR_GL_GET_PROC(BindFragDataLocationIndexed); |
| 172 | 167 |
| 173 if (glVer >= GR_GL_VER(3,0) || extensions.has("GL_ARB_vertex_array_objec
t")) { | 168 if (glVer >= GR_GL_VER(3,0) || extensions.has("GL_ARB_vertex_array_objec
t")) { |
| 174 // no ARB suffix for GL_ARB_vertex_array_object | 169 // no ARB suffix for GL_ARB_vertex_array_object |
| 175 GR_GL_GET_PROC(BindVertexArray); | 170 GR_GL_GET_PROC(BindVertexArray); |
| 176 GR_GL_GET_PROC(GenVertexArrays); | 171 GR_GL_GET_PROC(GenVertexArrays); |
| 177 GR_GL_GET_PROC(DeleteVertexArrays); | 172 GR_GL_GET_PROC(DeleteVertexArrays); |
| 178 } | 173 } |
| 179 | 174 |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 282 } | 277 } |
| 283 | 278 |
| 284 interface->fStandard = kGL_GrGLStandard; | 279 interface->fStandard = kGL_GrGLStandard; |
| 285 interface->fExtensions.swap(&extensions); | 280 interface->fExtensions.swap(&extensions); |
| 286 | 281 |
| 287 return interface; | 282 return interface; |
| 288 } else { | 283 } else { |
| 289 return NULL; | 284 return NULL; |
| 290 } | 285 } |
| 291 } | 286 } |
| OLD | NEW |