OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 | 8 |
9 #include "gl/GrGLInterface.h" | 9 #include "gl/GrGLInterface.h" |
10 #include "gl/GrGLExtensions.h" | 10 #include "gl/GrGLExtensions.h" |
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
371 | 371 |
372 if (kDesktop_GrGLBinding == binding) { | 372 if (kDesktop_GrGLBinding == binding) { |
373 if (glVer >= GR_GL_VER(3, 0) || extensions.has("GL_ARB_vertex_array_obje
ct")) { | 373 if (glVer >= GR_GL_VER(3, 0) || extensions.has("GL_ARB_vertex_array_obje
ct")) { |
374 if (NULL == fBindVertexArray || | 374 if (NULL == fBindVertexArray || |
375 NULL == fDeleteVertexArrays || | 375 NULL == fDeleteVertexArrays || |
376 NULL == fGenVertexArrays) { | 376 NULL == fGenVertexArrays) { |
377 return false; | 377 return false; |
378 } | 378 } |
379 } | 379 } |
380 } else { | 380 } else { |
381 if (extensions.has("GL_OES_vertex_array_object")) { | 381 if (glVer >= GR_GL_VER(3,0) || extensions.has("GL_OES_vertex_array_objec
t")) { |
382 if (NULL == fBindVertexArray || | 382 if (NULL == fBindVertexArray || |
383 NULL == fDeleteVertexArrays || | 383 NULL == fDeleteVertexArrays || |
384 NULL == fGenVertexArrays) { | 384 NULL == fGenVertexArrays) { |
385 return false; | 385 return false; |
386 } | 386 } |
387 } | 387 } |
388 } | 388 } |
389 | 389 |
390 return true; | 390 return true; |
391 } | 391 } |
OLD | NEW |