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 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
195 WGL_SET_PROC(Uniform4fv); | 195 WGL_SET_PROC(Uniform4fv); |
196 WGL_SET_PROC(Uniform4iv); | 196 WGL_SET_PROC(Uniform4iv); |
197 WGL_SET_PROC(UniformMatrix2fv); | 197 WGL_SET_PROC(UniformMatrix2fv); |
198 WGL_SET_PROC(UniformMatrix3fv); | 198 WGL_SET_PROC(UniformMatrix3fv); |
199 WGL_SET_PROC(UniformMatrix4fv); | 199 WGL_SET_PROC(UniformMatrix4fv); |
200 WGL_SET_PROC(UseProgram); | 200 WGL_SET_PROC(UseProgram); |
201 WGL_SET_PROC(VertexAttrib4fv); | 201 WGL_SET_PROC(VertexAttrib4fv); |
202 WGL_SET_PROC(VertexAttribPointer); | 202 WGL_SET_PROC(VertexAttribPointer); |
203 WGL_SET_PROC(BindFragDataLocationIndexed); | 203 WGL_SET_PROC(BindFragDataLocationIndexed); |
204 | 204 |
| 205 if (glVer >= GR_GL_VER(3,0) || extensions.has("GL_ARB_vertex_array_objec
t")) { |
| 206 // no ARB suffix for GL_ARB_vertex_array_object |
| 207 WGL_SET_PROC(BindVertexArray); |
| 208 WGL_SET_PROC(DeleteVertexArrays); |
| 209 WGL_SET_PROC(GenVertexArrays); |
| 210 } |
| 211 |
205 // First look for GL3.0 FBO or GL_ARB_framebuffer_object (same since | 212 // First look for GL3.0 FBO or GL_ARB_framebuffer_object (same since |
206 // GL_ARB_framebuffer_object doesn't use ARB suffix.) | 213 // GL_ARB_framebuffer_object doesn't use ARB suffix.) |
207 if (glVer > GR_GL_VER(3,0) || extensions.has("GL_ARB_framebuffer_object"
)) { | 214 if (glVer >= GR_GL_VER(3,0) || extensions.has("GL_ARB_framebuffer_object
")) { |
208 WGL_SET_PROC(GenFramebuffers); | 215 WGL_SET_PROC(GenFramebuffers); |
209 WGL_SET_PROC(GetFramebufferAttachmentParameteriv); | 216 WGL_SET_PROC(GetFramebufferAttachmentParameteriv); |
210 WGL_SET_PROC(GetRenderbufferParameteriv); | 217 WGL_SET_PROC(GetRenderbufferParameteriv); |
211 WGL_SET_PROC(BindFramebuffer); | 218 WGL_SET_PROC(BindFramebuffer); |
212 WGL_SET_PROC(FramebufferTexture2D); | 219 WGL_SET_PROC(FramebufferTexture2D); |
213 WGL_SET_PROC(CheckFramebufferStatus); | 220 WGL_SET_PROC(CheckFramebufferStatus); |
214 WGL_SET_PROC(DeleteFramebuffers); | 221 WGL_SET_PROC(DeleteFramebuffers); |
215 WGL_SET_PROC(RenderbufferStorage); | 222 WGL_SET_PROC(RenderbufferStorage); |
216 WGL_SET_PROC(GenRenderbuffers); | 223 WGL_SET_PROC(GenRenderbuffers); |
217 WGL_SET_PROC(DeleteRenderbuffers); | 224 WGL_SET_PROC(DeleteRenderbuffers); |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
298 WGL_SET_PROC_SUFFIX(PointAlongPath, NV); | 305 WGL_SET_PROC_SUFFIX(PointAlongPath, NV); |
299 } | 306 } |
300 | 307 |
301 interface->fBindingsExported = kDesktop_GrGLBinding; | 308 interface->fBindingsExported = kDesktop_GrGLBinding; |
302 | 309 |
303 return interface; | 310 return interface; |
304 } else { | 311 } else { |
305 return NULL; | 312 return NULL; |
306 } | 313 } |
307 } | 314 } |
OLD | NEW |