OLD | NEW |
---|---|
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2012 Google Inc. | 3 * Copyright 2012 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 "gl/GrGLInterface.h" | 10 #include "gl/GrGLInterface.h" |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
81 functions->fGenVertexArrays = | 81 functions->fGenVertexArrays = |
82 (GrGLGenVertexArraysProc) eglGetProcAddress("glGenVertexArraysOES"); | 82 (GrGLGenVertexArraysProc) eglGetProcAddress("glGenVertexArraysOES"); |
83 GET_PROC(GetBufferParameteriv); | 83 GET_PROC(GetBufferParameteriv); |
84 GET_PROC(GetError); | 84 GET_PROC(GetError); |
85 GET_PROC(GetIntegerv); | 85 GET_PROC(GetIntegerv); |
86 GET_PROC(GetProgramInfoLog); | 86 GET_PROC(GetProgramInfoLog); |
87 GET_PROC(GetProgramiv); | 87 GET_PROC(GetProgramiv); |
88 GET_PROC(GetShaderInfoLog); | 88 GET_PROC(GetShaderInfoLog); |
89 GET_PROC(GetShaderiv); | 89 GET_PROC(GetShaderiv); |
90 GET_PROC(GetString); | 90 GET_PROC(GetString); |
91 GET_PROC(GetStringi); | |
egdaniel
2014/03/31 15:38:04
What is this for? Or just missing from before?
bsalomon
2014/04/01 13:01:30
Yup, just noticed it was missing. ES 3 added this
| |
91 GET_PROC(GetUniformLocation); | 92 GET_PROC(GetUniformLocation); |
92 GET_PROC(LineWidth); | 93 GET_PROC(LineWidth); |
93 GET_PROC(LinkProgram); | 94 GET_PROC(LinkProgram); |
94 GET_PROC(PixelStorei); | 95 GET_PROC(PixelStorei); |
95 GET_PROC(ReadPixels); | 96 GET_PROC(ReadPixels); |
96 GET_PROC(Scissor); | 97 GET_PROC(Scissor); |
97 GET_PROC(ShaderSource); | 98 GET_PROC(ShaderSource); |
98 GET_PROC(StencilFunc); | 99 GET_PROC(StencilFunc); |
99 GET_PROC(StencilFuncSeparate); | 100 GET_PROC(StencilFuncSeparate); |
100 GET_PROC(StencilMask); | 101 GET_PROC(StencilMask); |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
146 GET_PROC(FramebufferTexture2D); | 147 GET_PROC(FramebufferTexture2D); |
147 GET_PROC(GenFramebuffers); | 148 GET_PROC(GenFramebuffers); |
148 GET_PROC(GenRenderbuffers); | 149 GET_PROC(GenRenderbuffers); |
149 GET_PROC(GetFramebufferAttachmentParameteriv); | 150 GET_PROC(GetFramebufferAttachmentParameteriv); |
150 GET_PROC(GetRenderbufferParameteriv); | 151 GET_PROC(GetRenderbufferParameteriv); |
151 GET_PROC(RenderbufferStorage); | 152 GET_PROC(RenderbufferStorage); |
152 | 153 |
153 functions->fMapBuffer = (GrGLMapBufferProc) eglGetProcAddress("glMapBufferOE S"); | 154 functions->fMapBuffer = (GrGLMapBufferProc) eglGetProcAddress("glMapBufferOE S"); |
154 functions->fUnmapBuffer = (GrGLUnmapBufferProc) eglGetProcAddress("glUnmapBu fferOES"); | 155 functions->fUnmapBuffer = (GrGLUnmapBufferProc) eglGetProcAddress("glUnmapBu fferOES"); |
155 | 156 |
156 #if GL_EXT_debug_marker | |
157 functions->fInsertEventMarker = (GrGLInsertEventMarkerProc) eglGetProcAddres s("glInsertEventMarkerEXT"); | 157 functions->fInsertEventMarker = (GrGLInsertEventMarkerProc) eglGetProcAddres s("glInsertEventMarkerEXT"); |
158 functions->fPushGroupMarker = (GrGLInsertEventMarkerProc) eglGetProcAddress( "glPushGroupMarkerEXT"); | 158 functions->fPushGroupMarker = (GrGLInsertEventMarkerProc) eglGetProcAddress( "glPushGroupMarkerEXT"); |
159 functions->fPopGroupMarker = (GrGLPopGroupMarkerProc) eglGetProcAddress("glP opGroupMarkerEXT"); | 159 functions->fPopGroupMarker = (GrGLPopGroupMarkerProc) eglGetProcAddress("glP opGroupMarkerEXT"); |
160 | |
161 #if GL_ES_VERSION_3_0 | |
162 GET_PROC(InvalidateFramebuffer); | |
163 GET_PROC(InvalidateSubFramebuffer); | |
164 #else | |
165 functions->fInvalidateFramebuffer = (GrGLInvalidateFramebufferProc) eglGetPr ocAddress("glInvalidateFramebuffer"); | |
166 functions->fInvalidateSubFramebuffer = (GrGLInvalidateSubFramebufferProc) eg lGetProcAddress("glInvalidateSubFramebuffer"); | |
160 #endif | 167 #endif |
168 functions->fInvalidateBufferData = (GrGLInvalidateBufferDataProc) eglGetProc Address("glInvalidateBufferData"); | |
169 functions->fInvalidateBufferSubData = (GrGLInvalidateBufferSubDataProc) eglG etProcAddress("glInvalidateBufferSubData"); | |
170 functions->fInvalidateTexImage = (GrGLInvalidateTexImageProc) eglGetProcAddr ess("glInvalidateTexImage"); | |
171 functions->fInvalidateTexSubImage = (GrGLInvalidateTexSubImageProc) eglGetPr ocAddress("glInvalidateTexSubImage"); | |
161 | 172 |
162 interface->fExtensions.init(kGLES_GrGLStandard, | 173 interface->fExtensions.init(kGLES_GrGLStandard, |
163 interface->fFunctions.fGetString, | 174 functions->fGetString, |
164 interface->fFunctions.fGetStringi, | 175 functions->fGetStringi, |
165 interface->fFunctions.fGetIntegerv); | 176 functions->fGetIntegerv); |
166 return interface; | 177 return interface; |
167 } | 178 } |
OLD | NEW |