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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 interface->fShaderSource = glShaderSource; | 72 interface->fShaderSource = glShaderSource; |
73 interface->fStencilFunc = glStencilFunc; | 73 interface->fStencilFunc = glStencilFunc; |
74 interface->fStencilFuncSeparate = glStencilFuncSeparate; | 74 interface->fStencilFuncSeparate = glStencilFuncSeparate; |
75 interface->fStencilMask = glStencilMask; | 75 interface->fStencilMask = glStencilMask; |
76 interface->fStencilMaskSeparate = glStencilMaskSeparate; | 76 interface->fStencilMaskSeparate = glStencilMaskSeparate; |
77 interface->fStencilOp = glStencilOp; | 77 interface->fStencilOp = glStencilOp; |
78 interface->fStencilOpSeparate = glStencilOpSeparate; | 78 interface->fStencilOpSeparate = glStencilOpSeparate; |
79 // mac uses GLenum for internalFormat param (non-standard) | 79 // mac uses GLenum for internalFormat param (non-standard) |
80 // amounts to int vs. uint. | 80 // amounts to int vs. uint. |
81 interface->fTexImage2D = (GrGLTexImage2DProc)glTexImage2D; | 81 interface->fTexImage2D = (GrGLTexImage2DProc)glTexImage2D; |
82 #if GL_ARB_texture_storage | 82 #if GL_ARB_texture_storage |
83 interface->fTexStorage2D = glTexStorage2D; | 83 interface->fTexStorage2D = glTexStorage2D; |
84 #elif GL_EXT_texture_storage | 84 #elif GL_EXT_texture_storage |
85 interface->fTexStorage2D = glTexStorage2DEXT; | 85 interface->fTexStorage2D = glTexStorage2DEXT; |
86 #endif | 86 #endif |
87 interface->fTexParameteri = glTexParameteri; | 87 interface->fTexParameteri = glTexParameteri; |
88 interface->fTexParameteriv = glTexParameteriv; | 88 interface->fTexParameteriv = glTexParameteriv; |
89 interface->fTexSubImage2D = glTexSubImage2D; | 89 interface->fTexSubImage2D = glTexSubImage2D; |
90 interface->fUniform1f = glUniform1f; | 90 interface->fUniform1f = glUniform1f; |
91 interface->fUniform1i = glUniform1i; | 91 interface->fUniform1i = glUniform1i; |
92 interface->fUniform1fv = glUniform1fv; | 92 interface->fUniform1fv = glUniform1fv; |
93 interface->fUniform1iv = glUniform1iv; | 93 interface->fUniform1iv = glUniform1iv; |
94 interface->fUniform2f = glUniform2f; | 94 interface->fUniform2f = glUniform2f; |
95 interface->fUniform2i = glUniform2i; | 95 interface->fUniform2i = glUniform2i; |
96 interface->fUniform2fv = glUniform2fv; | 96 interface->fUniform2fv = glUniform2fv; |
(...skipping 20 matching lines...) Expand all Loading... |
117 interface->fBindFramebuffer = glBindFramebuffer; | 117 interface->fBindFramebuffer = glBindFramebuffer; |
118 interface->fFramebufferTexture2D = glFramebufferTexture2D; | 118 interface->fFramebufferTexture2D = glFramebufferTexture2D; |
119 interface->fCheckFramebufferStatus = glCheckFramebufferStatus; | 119 interface->fCheckFramebufferStatus = glCheckFramebufferStatus; |
120 interface->fDeleteFramebuffers = glDeleteFramebuffers; | 120 interface->fDeleteFramebuffers = glDeleteFramebuffers; |
121 interface->fRenderbufferStorage = glRenderbufferStorage; | 121 interface->fRenderbufferStorage = glRenderbufferStorage; |
122 interface->fGenRenderbuffers = glGenRenderbuffers; | 122 interface->fGenRenderbuffers = glGenRenderbuffers; |
123 interface->fDeleteRenderbuffers = glDeleteRenderbuffers; | 123 interface->fDeleteRenderbuffers = glDeleteRenderbuffers; |
124 interface->fFramebufferRenderbuffer = glFramebufferRenderbuffer; | 124 interface->fFramebufferRenderbuffer = glFramebufferRenderbuffer; |
125 interface->fBindRenderbuffer = glBindRenderbuffer; | 125 interface->fBindRenderbuffer = glBindRenderbuffer; |
126 | 126 |
127 #if GL_OES_mapbuffer | 127 #if GL_OES_mapbuffer |
128 interface->fMapBuffer = glMapBufferOES; | 128 interface->fMapBuffer = glMapBufferOES; |
129 interface->fUnmapBuffer = glUnmapBufferOES; | 129 interface->fUnmapBuffer = glUnmapBufferOES; |
130 #endif | 130 #endif |
131 | 131 |
132 #if GL_APPLE_framebuffer_multisample | 132 #if GL_APPLE_framebuffer_multisample |
133 interface->fRenderbufferStorageMultisample = glRenderbufferStorageMultis
ampleAPPLE; | 133 interface->fRenderbufferStorageMultisample = glRenderbufferStorageMultis
ampleAPPLE; |
134 interface->fResolveMultisampleFramebuffer = glResolveMultisampleFramebuf
ferAPPLE; | 134 interface->fResolveMultisampleFramebuffer = glResolveMultisampleFramebuf
ferAPPLE; |
135 #endif | 135 #endif |
136 interface->fBindFragDataLocationIndexed = NULL; | 136 |
| 137 #if GL_OES_vertex_array_object |
| 138 interface->fBindVertexArray = glBindVertexArrayOES; |
| 139 interface->fDeleteVertexArrays = glDeleteVertexArraysOES; |
| 140 interface->fGenVertexArrays = glGenVertexArraysOES; |
| 141 #endif |
137 | 142 |
138 interface->fBindingsExported = kES2_GrGLBinding; | 143 interface->fBindingsExported = kES2_GrGLBinding; |
139 } | 144 } |
140 glInterface.get()->ref(); | 145 glInterface.get()->ref(); |
141 return glInterface.get(); | 146 return glInterface.get(); |
142 } | 147 } |
OLD | NEW |