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 331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
342 return false; | 342 return false; |
343 } | 343 } |
344 } | 344 } |
345 | 345 |
346 if (kDesktop_GrGLBinding == binding && glVer >= GR_GL_VER(3, 0)) { | 346 if (kDesktop_GrGLBinding == binding && glVer >= GR_GL_VER(3, 0)) { |
347 if (NULL == fGetStringi) { | 347 if (NULL == fGetStringi) { |
348 return false; | 348 return false; |
349 } | 349 } |
350 } | 350 } |
351 | 351 |
| 352 if (kDesktop_GrGLBinding == binding) { |
| 353 if (glVer >= GR_GL_VER(3, 0) || extensions.has("GL_ARB_vertex_array_obje
ct")) { |
| 354 if (NULL == fBindVertexArray || |
| 355 NULL == fDeleteVertexArrays || |
| 356 NULL == fGenVertexArrays) { |
| 357 return false; |
| 358 } |
| 359 } |
| 360 } else { |
| 361 #if 0 // Remove this #if once Chromium interfaces set these pointers |
| 362 if (extensions.has("GL_OES_vertex_array_object")) { |
| 363 if (NULL == fBindVertexArray || |
| 364 NULL == fDeleteVertexArrays || |
| 365 NULL == fGenVertexArrays) { |
| 366 return false; |
| 367 } |
| 368 } |
| 369 #endif |
| 370 } |
| 371 |
352 return true; | 372 return true; |
353 } | 373 } |
OLD | NEW |