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 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 GET_PROC(FramebufferTexture2D); | 147 GET_PROC(FramebufferTexture2D); |
148 GET_PROC(GenFramebuffers); | 148 GET_PROC(GenFramebuffers); |
149 GET_PROC(GenRenderbuffers); | 149 GET_PROC(GenRenderbuffers); |
150 GET_PROC(GetFramebufferAttachmentParameteriv); | 150 GET_PROC(GetFramebufferAttachmentParameteriv); |
151 GET_PROC(GetRenderbufferParameteriv); | 151 GET_PROC(GetRenderbufferParameteriv); |
152 GET_PROC(RenderbufferStorage); | 152 GET_PROC(RenderbufferStorage); |
153 | 153 |
154 functions->fMapBuffer = (GrGLMapBufferProc) eglGetProcAddress("glMapBufferOE
S"); | 154 functions->fMapBuffer = (GrGLMapBufferProc) eglGetProcAddress("glMapBufferOE
S"); |
155 functions->fUnmapBuffer = (GrGLUnmapBufferProc) eglGetProcAddress("glUnmapBu
fferOES"); | 155 functions->fUnmapBuffer = (GrGLUnmapBufferProc) eglGetProcAddress("glUnmapBu
fferOES"); |
156 | 156 |
157 #if GL_ES_VERSION_3_0 | |
158 functions->fMapBufferRange = GET_PROC(glMapBufferRange); | |
159 functions->fFlushMappedBufferRange = GET_PROC(glFlushMappedBufferRange); | |
160 #else | |
161 functions->fMapBufferRange = (GrGLMapBufferRangeProc) eglGetProcAddress("glM
apBufferRange"); | |
162 functions->fFlushMappedBufferRange = (GrGLFlushMappedBufferRangeProc) eglGet
ProcAddress("glFlushMappedBufferRange"); | |
163 #endif | |
164 | |
165 functions->fInsertEventMarker = (GrGLInsertEventMarkerProc) eglGetProcAddres
s("glInsertEventMarkerEXT"); | 157 functions->fInsertEventMarker = (GrGLInsertEventMarkerProc) eglGetProcAddres
s("glInsertEventMarkerEXT"); |
166 functions->fPushGroupMarker = (GrGLInsertEventMarkerProc) eglGetProcAddress(
"glPushGroupMarkerEXT"); | 158 functions->fPushGroupMarker = (GrGLInsertEventMarkerProc) eglGetProcAddress(
"glPushGroupMarkerEXT"); |
167 functions->fPopGroupMarker = (GrGLPopGroupMarkerProc) eglGetProcAddress("glP
opGroupMarkerEXT"); | 159 functions->fPopGroupMarker = (GrGLPopGroupMarkerProc) eglGetProcAddress("glP
opGroupMarkerEXT"); |
168 | 160 |
169 #if GL_ES_VERSION_3_0 | 161 #if GL_ES_VERSION_3_0 |
170 GET_PROC(InvalidateFramebuffer); | 162 GET_PROC(InvalidateFramebuffer); |
171 GET_PROC(InvalidateSubFramebuffer); | 163 GET_PROC(InvalidateSubFramebuffer); |
172 #else | 164 #else |
173 functions->fInvalidateFramebuffer = (GrGLInvalidateFramebufferProc) eglGetPr
ocAddress("glInvalidateFramebuffer"); | 165 functions->fInvalidateFramebuffer = (GrGLInvalidateFramebufferProc) eglGetPr
ocAddress("glInvalidateFramebuffer"); |
174 functions->fInvalidateSubFramebuffer = (GrGLInvalidateSubFramebufferProc) eg
lGetProcAddress("glInvalidateSubFramebuffer"); | 166 functions->fInvalidateSubFramebuffer = (GrGLInvalidateSubFramebufferProc) eg
lGetProcAddress("glInvalidateSubFramebuffer"); |
175 #endif | 167 #endif |
176 functions->fInvalidateBufferData = (GrGLInvalidateBufferDataProc) eglGetProc
Address("glInvalidateBufferData"); | 168 functions->fInvalidateBufferData = (GrGLInvalidateBufferDataProc) eglGetProc
Address("glInvalidateBufferData"); |
177 functions->fInvalidateBufferSubData = (GrGLInvalidateBufferSubDataProc) eglG
etProcAddress("glInvalidateBufferSubData"); | 169 functions->fInvalidateBufferSubData = (GrGLInvalidateBufferSubDataProc) eglG
etProcAddress("glInvalidateBufferSubData"); |
178 functions->fInvalidateTexImage = (GrGLInvalidateTexImageProc) eglGetProcAddr
ess("glInvalidateTexImage"); | 170 functions->fInvalidateTexImage = (GrGLInvalidateTexImageProc) eglGetProcAddr
ess("glInvalidateTexImage"); |
179 functions->fInvalidateTexSubImage = (GrGLInvalidateTexSubImageProc) eglGetPr
ocAddress("glInvalidateTexSubImage"); | 171 functions->fInvalidateTexSubImage = (GrGLInvalidateTexSubImageProc) eglGetPr
ocAddress("glInvalidateTexSubImage"); |
180 | 172 |
181 interface->fExtensions.init(kGLES_GrGLStandard, | 173 interface->fExtensions.init(kGLES_GrGLStandard, |
182 functions->fGetString, | 174 functions->fGetString, |
183 functions->fGetStringi, | 175 functions->fGetStringi, |
184 functions->fGetIntegerv); | 176 functions->fGetIntegerv); |
185 return interface; | 177 return interface; |
186 } | 178 } |
OLD | NEW |