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 372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
383 // buffer mapping was part of original VBO extension | 383 // buffer mapping was part of original VBO extension |
384 // which we require. | 384 // which we require. |
385 if (kGL_GrGLStandard == fStandard || fExtensions.has("GL_OES_mapbuffer")) { | 385 if (kGL_GrGLStandard == fStandard || fExtensions.has("GL_OES_mapbuffer")) { |
386 if (NULL == fFunctions.fMapBuffer || | 386 if (NULL == fFunctions.fMapBuffer || |
387 NULL == fFunctions.fUnmapBuffer) { | 387 NULL == fFunctions.fUnmapBuffer) { |
388 RETURN_FALSE_INTERFACE | 388 RETURN_FALSE_INTERFACE |
389 } | 389 } |
390 } | 390 } |
391 | 391 |
392 // Dual source blending | 392 // Dual source blending |
393 if (kGL_GrGLStandard == fStandard && | 393 if (kGL_GrGLStandard == fStandard) { |
394 (glVer >= GR_GL_VER(3,3) || fExtensions.has("GL_ARB_blend_func_extended"
))) { | 394 if (glVer >= GR_GL_VER(3,3) || fExtensions.has("GL_ARB_blend_func_extend
ed")) { |
395 if (NULL == fFunctions.fBindFragDataLocationIndexed) { | 395 if (NULL == fFunctions.fBindFragDataLocationIndexed) { |
396 RETURN_FALSE_INTERFACE | 396 RETURN_FALSE_INTERFACE |
| 397 } |
| 398 } |
| 399 } else { |
| 400 if (glVer >= GR_GL_VER(3,0) && fExtensions.has("GL_EXT_blend_func_extend
ed")) { |
| 401 if (NULL == fFunctions.fBindFragDataLocation || |
| 402 NULL == fFunctions.fBindFragDataLocationIndexed) { |
| 403 RETURN_FALSE_INTERFACE |
| 404 } |
397 } | 405 } |
398 } | 406 } |
399 | 407 |
| 408 |
400 // glGetStringi was added in version 3.0 of both desktop and ES. | 409 // glGetStringi was added in version 3.0 of both desktop and ES. |
401 if (glVer >= GR_GL_VER(3, 0)) { | 410 if (glVer >= GR_GL_VER(3, 0)) { |
402 if (NULL == fFunctions.fGetStringi) { | 411 if (NULL == fFunctions.fGetStringi) { |
403 RETURN_FALSE_INTERFACE | 412 RETURN_FALSE_INTERFACE |
404 } | 413 } |
405 } | 414 } |
406 | 415 |
407 if (kGL_GrGLStandard == fStandard) { | 416 if (kGL_GrGLStandard == fStandard) { |
408 if (glVer >= GR_GL_VER(3, 0) || fExtensions.has("GL_ARB_vertex_array_obj
ect")) { | 417 if (glVer >= GR_GL_VER(3, 0) || fExtensions.has("GL_ARB_vertex_array_obj
ect")) { |
409 if (NULL == fFunctions.fBindVertexArray || | 418 if (NULL == fFunctions.fBindVertexArray || |
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
700 NULL == fFunctions.fGetDebugMessageLog || | 709 NULL == fFunctions.fGetDebugMessageLog || |
701 NULL == fFunctions.fPushDebugGroup || | 710 NULL == fFunctions.fPushDebugGroup || |
702 NULL == fFunctions.fPopDebugGroup || | 711 NULL == fFunctions.fPopDebugGroup || |
703 NULL == fFunctions.fObjectLabel) { | 712 NULL == fFunctions.fObjectLabel) { |
704 RETURN_FALSE_INTERFACE | 713 RETURN_FALSE_INTERFACE |
705 } | 714 } |
706 } | 715 } |
707 | 716 |
708 return true; | 717 return true; |
709 } | 718 } |
OLD | NEW |