OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 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/GrGLAssembleInterface.h" | 9 #include "gl/GrGLAssembleInterface.h" |
10 #include "GrGLUtil.h" | 10 #include "GrGLUtil.h" |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 if (glVer >= GR_GL_VER(3,1) || extensions.has("GL_ARB_draw_instanced") || | 141 if (glVer >= GR_GL_VER(3,1) || extensions.has("GL_ARB_draw_instanced") || |
142 extensions.has("GL_EXT_draw_instanced")) { | 142 extensions.has("GL_EXT_draw_instanced")) { |
143 GET_PROC(DrawArraysInstanced); | 143 GET_PROC(DrawArraysInstanced); |
144 GET_PROC(DrawElementsInstanced); | 144 GET_PROC(DrawElementsInstanced); |
145 } | 145 } |
146 | 146 |
147 if (glVer >= GR_GL_VER(4,0) || extensions.has("GL_ARB_draw_indirect")) { | 147 if (glVer >= GR_GL_VER(4,0) || extensions.has("GL_ARB_draw_indirect")) { |
148 GET_PROC(DrawArraysIndirect); | 148 GET_PROC(DrawArraysIndirect); |
149 GET_PROC(DrawElementsIndirect); | 149 GET_PROC(DrawElementsIndirect); |
150 } | 150 } |
151 | 151 if (glVer >= GR_GL_VER(2,0)) { |
| 152 GET_PROC(DrawRangeElements); |
| 153 } |
152 GET_PROC(Enable); | 154 GET_PROC(Enable); |
153 GET_PROC(EnableVertexAttribArray); | 155 GET_PROC(EnableVertexAttribArray); |
154 GET_PROC(EndQuery); | 156 GET_PROC(EndQuery); |
155 GET_PROC(Finish); | 157 GET_PROC(Finish); |
156 GET_PROC(Flush); | 158 GET_PROC(Flush); |
157 GET_PROC(FrontFace); | 159 GET_PROC(FrontFace); |
158 GET_PROC(GenBuffers); | 160 GET_PROC(GenBuffers); |
159 GET_PROC(GenerateMipmap); | 161 GET_PROC(GenerateMipmap); |
160 GET_PROC(GetBufferParameteriv); | 162 GET_PROC(GetBufferParameteriv); |
161 GET_PROC(GetError); | 163 GET_PROC(GetError); |
(...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
608 GET_PROC_SUFFIX(DrawArraysInstanced, EXT); | 610 GET_PROC_SUFFIX(DrawArraysInstanced, EXT); |
609 GET_PROC_SUFFIX(DrawElementsInstanced, EXT); | 611 GET_PROC_SUFFIX(DrawElementsInstanced, EXT); |
610 } | 612 } |
611 | 613 |
612 if (version >= GR_GL_VER(3,1)) { | 614 if (version >= GR_GL_VER(3,1)) { |
613 GET_PROC(DrawArraysIndirect); | 615 GET_PROC(DrawArraysIndirect); |
614 GET_PROC(DrawElementsIndirect); | 616 GET_PROC(DrawElementsIndirect); |
615 } | 617 } |
616 | 618 |
617 GET_PROC(DrawElements); | 619 GET_PROC(DrawElements); |
| 620 if (version >= GR_GL_VER(3,0)) { |
| 621 GET_PROC(DrawRangeElements); |
| 622 } |
618 GET_PROC(Enable); | 623 GET_PROC(Enable); |
619 GET_PROC(EnableVertexAttribArray); | 624 GET_PROC(EnableVertexAttribArray); |
620 GET_PROC(Finish); | 625 GET_PROC(Finish); |
621 GET_PROC(Flush); | 626 GET_PROC(Flush); |
622 GET_PROC(FrontFace); | 627 GET_PROC(FrontFace); |
623 GET_PROC(GenBuffers); | 628 GET_PROC(GenBuffers); |
624 GET_PROC(GenerateMipmap); | 629 GET_PROC(GenerateMipmap); |
625 GET_PROC(GenTextures); | 630 GET_PROC(GenTextures); |
626 GET_PROC_SUFFIX(GenVertexArrays, OES); | 631 GET_PROC_SUFFIX(GenVertexArrays, OES); |
627 GET_PROC(GetBufferParameteriv); | 632 GET_PROC(GetBufferParameteriv); |
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
912 | 917 |
913 if (extensions.has("GL_OES_sample_shading")) { | 918 if (extensions.has("GL_OES_sample_shading")) { |
914 GET_PROC_SUFFIX(MinSampleShading, OES); | 919 GET_PROC_SUFFIX(MinSampleShading, OES); |
915 } | 920 } |
916 | 921 |
917 interface->fStandard = kGLES_GrGLStandard; | 922 interface->fStandard = kGLES_GrGLStandard; |
918 interface->fExtensions.swap(&extensions); | 923 interface->fExtensions.swap(&extensions); |
919 | 924 |
920 return interface; | 925 return interface; |
921 } | 926 } |
OLD | NEW |