OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2014 Google Inc. | 3 * Copyright 2014 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 "GrGLAssembleInterface.h" | 10 #include "GrGLAssembleInterface.h" |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 GET_PROC(ReadBuffer); | 198 GET_PROC(ReadBuffer); |
199 GET_PROC(ReadPixels); | 199 GET_PROC(ReadPixels); |
200 GET_PROC(Scissor); | 200 GET_PROC(Scissor); |
201 GET_PROC(ShaderSource); | 201 GET_PROC(ShaderSource); |
202 GET_PROC(StencilFunc); | 202 GET_PROC(StencilFunc); |
203 GET_PROC(StencilFuncSeparate); | 203 GET_PROC(StencilFuncSeparate); |
204 GET_PROC(StencilMask); | 204 GET_PROC(StencilMask); |
205 GET_PROC(StencilMaskSeparate); | 205 GET_PROC(StencilMaskSeparate); |
206 GET_PROC(StencilOp); | 206 GET_PROC(StencilOp); |
207 GET_PROC(StencilOpSeparate); | 207 GET_PROC(StencilOpSeparate); |
| 208 if (glVer >= GR_GL_VER(3,1)) { |
| 209 GET_PROC(TexBuffer); |
| 210 } |
208 GET_PROC(TexImage2D); | 211 GET_PROC(TexImage2D); |
209 GET_PROC(TexParameteri); | 212 GET_PROC(TexParameteri); |
210 GET_PROC(TexParameteriv); | 213 GET_PROC(TexParameteriv); |
211 if (glVer >= GR_GL_VER(4,2) || extensions.has("GL_ARB_texture_storage")) { | 214 if (glVer >= GR_GL_VER(4,2) || extensions.has("GL_ARB_texture_storage")) { |
212 GET_PROC(TexStorage2D); | 215 GET_PROC(TexStorage2D); |
213 } else if (extensions.has("GL_EXT_texture_storage")) { | 216 } else if (extensions.has("GL_EXT_texture_storage")) { |
214 GET_PROC_SUFFIX(TexStorage2D, EXT); | 217 GET_PROC_SUFFIX(TexStorage2D, EXT); |
215 } | 218 } |
216 GET_PROC(TexSubImage2D); | 219 GET_PROC(TexSubImage2D); |
217 if (glVer >= GR_GL_VER(4,5) || extensions.has("GL_ARB_texture_barrier")) { | 220 if (glVer >= GR_GL_VER(4,5) || extensions.has("GL_ARB_texture_barrier")) { |
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
484 GET_PROC_SUFFIX(DisableVertexArray, EXT); | 487 GET_PROC_SUFFIX(DisableVertexArray, EXT); |
485 GET_PROC_SUFFIX(EnableVertexArrayAttrib, EXT); | 488 GET_PROC_SUFFIX(EnableVertexArrayAttrib, EXT); |
486 GET_PROC_SUFFIX(DisableVertexArrayAttrib, EXT); | 489 GET_PROC_SUFFIX(DisableVertexArrayAttrib, EXT); |
487 GET_PROC_SUFFIX(GetVertexArrayIntegerv, EXT); | 490 GET_PROC_SUFFIX(GetVertexArrayIntegerv, EXT); |
488 GET_PROC_SUFFIX(GetVertexArrayPointerv, EXT); | 491 GET_PROC_SUFFIX(GetVertexArrayPointerv, EXT); |
489 GET_PROC_SUFFIX(GetVertexArrayIntegeri_v, EXT); | 492 GET_PROC_SUFFIX(GetVertexArrayIntegeri_v, EXT); |
490 GET_PROC_SUFFIX(GetVertexArrayPointeri_v, EXT); | 493 GET_PROC_SUFFIX(GetVertexArrayPointeri_v, EXT); |
491 GET_PROC_SUFFIX(MapNamedBufferRange, EXT); | 494 GET_PROC_SUFFIX(MapNamedBufferRange, EXT); |
492 GET_PROC_SUFFIX(FlushMappedNamedBufferRange, EXT); | 495 GET_PROC_SUFFIX(FlushMappedNamedBufferRange, EXT); |
493 } | 496 } |
| 497 if (glVer >= GR_GL_VER(3,1)) { |
| 498 GET_PROC_SUFFIX(TextureBuffer, EXT); |
| 499 } |
494 } | 500 } |
495 | 501 |
496 if (glVer >= GR_GL_VER(4,3) || extensions.has("GL_KHR_debug")) { | 502 if (glVer >= GR_GL_VER(4,3) || extensions.has("GL_KHR_debug")) { |
497 // KHR_debug defines these methods to have no suffix in an OpenGL (not E
S) context. | 503 // KHR_debug defines these methods to have no suffix in an OpenGL (not E
S) context. |
498 GET_PROC(DebugMessageControl); | 504 GET_PROC(DebugMessageControl); |
499 GET_PROC(DebugMessageInsert); | 505 GET_PROC(DebugMessageInsert); |
500 GET_PROC(DebugMessageCallback); | 506 GET_PROC(DebugMessageCallback); |
501 GET_PROC(GetDebugMessageLog); | 507 GET_PROC(GetDebugMessageLog); |
502 GET_PROC(PushDebugGroup); | 508 GET_PROC(PushDebugGroup); |
503 GET_PROC(PopDebugGroup); | 509 GET_PROC(PopDebugGroup); |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
636 | 642 |
637 GET_PROC(ReadPixels); | 643 GET_PROC(ReadPixels); |
638 GET_PROC(Scissor); | 644 GET_PROC(Scissor); |
639 GET_PROC(ShaderSource); | 645 GET_PROC(ShaderSource); |
640 GET_PROC(StencilFunc); | 646 GET_PROC(StencilFunc); |
641 GET_PROC(StencilFuncSeparate); | 647 GET_PROC(StencilFuncSeparate); |
642 GET_PROC(StencilMask); | 648 GET_PROC(StencilMask); |
643 GET_PROC(StencilMaskSeparate); | 649 GET_PROC(StencilMaskSeparate); |
644 GET_PROC(StencilOp); | 650 GET_PROC(StencilOp); |
645 GET_PROC(StencilOpSeparate); | 651 GET_PROC(StencilOpSeparate); |
| 652 |
| 653 if (version >= GR_GL_VER(3,2)) { |
| 654 GET_PROC(TexBuffer); |
| 655 } else if (extensions.has("GL_OES_texture_buffer")) { |
| 656 GET_PROC_SUFFIX(TexBuffer, OES); |
| 657 } else if (extensions.has("GL_EXT_texture_buffer")) { |
| 658 GET_PROC_SUFFIX(TexBuffer, EXT); |
| 659 } |
| 660 |
646 GET_PROC(TexImage2D); | 661 GET_PROC(TexImage2D); |
647 GET_PROC(TexParameteri); | 662 GET_PROC(TexParameteri); |
648 GET_PROC(TexParameteriv); | 663 GET_PROC(TexParameteriv); |
649 GET_PROC(TexSubImage2D); | 664 GET_PROC(TexSubImage2D); |
650 | 665 |
651 if (version >= GR_GL_VER(3,0)) { | 666 if (version >= GR_GL_VER(3,0)) { |
652 GET_PROC(TexStorage2D); | 667 GET_PROC(TexStorage2D); |
653 } else { | 668 } else { |
654 GET_PROC_SUFFIX(TexStorage2D, EXT); | 669 GET_PROC_SUFFIX(TexStorage2D, EXT); |
655 } | 670 } |
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
876 if (extensions.has("EGL_KHR_image") || extensions.has("EGL_KHR_image_base"))
{ | 891 if (extensions.has("EGL_KHR_image") || extensions.has("EGL_KHR_image_base"))
{ |
877 GET_EGL_PROC_SUFFIX(CreateImage, KHR); | 892 GET_EGL_PROC_SUFFIX(CreateImage, KHR); |
878 GET_EGL_PROC_SUFFIX(DestroyImage, KHR); | 893 GET_EGL_PROC_SUFFIX(DestroyImage, KHR); |
879 } | 894 } |
880 | 895 |
881 interface->fStandard = kGLES_GrGLStandard; | 896 interface->fStandard = kGLES_GrGLStandard; |
882 interface->fExtensions.swap(&extensions); | 897 interface->fExtensions.swap(&extensions); |
883 | 898 |
884 return interface; | 899 return interface; |
885 } | 900 } |
OLD | NEW |