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/GrGLExtensions.h" | 10 #include "gl/GrGLExtensions.h" |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 GR_GL_GET_PROC(UniformMatrix2fv); | 157 GR_GL_GET_PROC(UniformMatrix2fv); |
158 GR_GL_GET_PROC(UniformMatrix3fv); | 158 GR_GL_GET_PROC(UniformMatrix3fv); |
159 GR_GL_GET_PROC(UniformMatrix4fv); | 159 GR_GL_GET_PROC(UniformMatrix4fv); |
160 GR_GL_GET_PROC(UnmapBuffer); | 160 GR_GL_GET_PROC(UnmapBuffer); |
161 GR_GL_GET_PROC(UseProgram); | 161 GR_GL_GET_PROC(UseProgram); |
162 GR_GL_GET_PROC(VertexAttrib4fv); | 162 GR_GL_GET_PROC(VertexAttrib4fv); |
163 GR_GL_GET_PROC(VertexAttribPointer); | 163 GR_GL_GET_PROC(VertexAttribPointer); |
164 interface->fViewport = glViewport; | 164 interface->fViewport = glViewport; |
165 GR_GL_GET_PROC(BindFragDataLocationIndexed); | 165 GR_GL_GET_PROC(BindFragDataLocationIndexed); |
166 | 166 |
| 167 if (glVer >= GR_GL_VER(3,0) || extensions.has("GL_ARB_vertex_array_objec
t")) { |
| 168 // no ARB suffix for GL_ARB_vertex_array_object |
| 169 GR_GL_GET_PROC(BindVertexArray); |
| 170 GR_GL_GET_PROC(GenVertexArrays); |
| 171 GR_GL_GET_PROC(DeleteVertexArrays); |
| 172 } |
| 173 |
167 // First look for GL3.0 FBO or GL_ARB_framebuffer_object (same since | 174 // First look for GL3.0 FBO or GL_ARB_framebuffer_object (same since |
168 // GL_ARB_framebuffer_object doesn't use ARB suffix.) | 175 // GL_ARB_framebuffer_object doesn't use ARB suffix.) |
169 if (glVer >= GR_GL_VER(3,0) || extensions.has("GL_ARB_framebuffer_object
")) { | 176 if (glVer >= GR_GL_VER(3,0) || extensions.has("GL_ARB_framebuffer_object
")) { |
170 GR_GL_GET_PROC(GenFramebuffers); | 177 GR_GL_GET_PROC(GenFramebuffers); |
171 GR_GL_GET_PROC(GetFramebufferAttachmentParameteriv); | 178 GR_GL_GET_PROC(GetFramebufferAttachmentParameteriv); |
172 GR_GL_GET_PROC(GetRenderbufferParameteriv); | 179 GR_GL_GET_PROC(GetRenderbufferParameteriv); |
173 GR_GL_GET_PROC(BindFramebuffer); | 180 GR_GL_GET_PROC(BindFramebuffer); |
174 GR_GL_GET_PROC(FramebufferTexture2D); | 181 GR_GL_GET_PROC(FramebufferTexture2D); |
175 GR_GL_GET_PROC(CheckFramebufferStatus); | 182 GR_GL_GET_PROC(CheckFramebufferStatus); |
176 GR_GL_GET_PROC(DeleteFramebuffers); | 183 GR_GL_GET_PROC(DeleteFramebuffers); |
(...skipping 28 matching lines...) Expand all Loading... |
205 delete interface; | 212 delete interface; |
206 return NULL; | 213 return NULL; |
207 } | 214 } |
208 interface->fBindingsExported = kDesktop_GrGLBinding; | 215 interface->fBindingsExported = kDesktop_GrGLBinding; |
209 | 216 |
210 return interface; | 217 return interface; |
211 } else { | 218 } else { |
212 return NULL; | 219 return NULL; |
213 } | 220 } |
214 } | 221 } |
OLD | NEW |