Add EXT suffix to EXT_map_buffer_range references
This rearranges the code to use the non-suffixed entry point for ES 3.x contexts, and the suffixed entry point on ES 2.0 contexts that have the extension. R=robertphillips@google.com Review URL: https://codereview.chromium.org/293993010 git-svn-id: http://skia.googlecode.com/svn/trunk@14823 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
parent
f0ea77a363
commit
4d9fde855c
@ -193,15 +193,23 @@ static GrGLInterface* create_es_interface(GrGLVersion version,
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if GL_ES_VERSION_3_0 || GL_EXT_map_buffer_range
|
if (version >= GR_GL_VER(3,0)) {
|
||||||
|
#if GL_ES_VERSION_3_0
|
||||||
functions->fMapBufferRange = glMapBufferRange;
|
functions->fMapBufferRange = glMapBufferRange;
|
||||||
functions->fFlushMappedBufferRange = glFlushMappedBufferRange;
|
functions->fFlushMappedBufferRange = glFlushMappedBufferRange;
|
||||||
#else
|
#else
|
||||||
if (version >= GR_GL_VER(3,0) || extensions->has("GL_EXT_map_buffer_range")) {
|
|
||||||
functions->fMapBufferRange = (GrGLMapBufferRangeProc) eglGetProcAddress("glMapBufferRange");
|
functions->fMapBufferRange = (GrGLMapBufferRangeProc) eglGetProcAddress("glMapBufferRange");
|
||||||
functions->fFlushMappedBufferRange = (GrGLFlushMappedBufferRangeProc) eglGetProcAddress("glFlushMappedBufferRange");
|
functions->fFlushMappedBufferRange = (GrGLFlushMappedBufferRangeProc) eglGetProcAddress("glFlushMappedBufferRange");
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
} else if (extensions->has("GL_EXT_map_buffer_range")) {
|
||||||
|
#if GL_EXT_map_buffer_range
|
||||||
|
functions->fMapBufferRange = glMapBufferRangeEXT;
|
||||||
|
functions->fFlushMappedBufferRange = glFlushMappedBufferRangeEXT;
|
||||||
|
#else
|
||||||
|
functions->fMapBufferRange = (GrGLMapBufferRangeProc) eglGetProcAddress("glMapBufferRangeEXT");
|
||||||
|
functions->fFlushMappedBufferRange = (GrGLFlushMappedBufferRangeProc) eglGetProcAddress("glFlushMappedBufferRangeEXT");
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
if (extensions->has("GL_EXT_debug_marker")) {
|
if (extensions->has("GL_EXT_debug_marker")) {
|
||||||
functions->fInsertEventMarker = (GrGLInsertEventMarkerProc) eglGetProcAddress("glInsertEventMarker");
|
functions->fInsertEventMarker = (GrGLInsertEventMarkerProc) eglGetProcAddress("glInsertEventMarker");
|
||||||
|
Loading…
Reference in New Issue
Block a user