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