From 4a7c1ebf04292afed422fd5fe783e7a6e430164b Mon Sep 17 00:00:00 2001 From: Logan McNaughton Date: Wed, 1 Feb 2017 07:19:23 -0800 Subject: [PATCH] Add support for EXT_buffer_storage --- src/Graphics/OpenGLContext/GLFunctions.cpp | 4 ++++ src/Graphics/OpenGLContext/opengl_ContextImpl.cpp | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Graphics/OpenGLContext/GLFunctions.cpp b/src/Graphics/OpenGLContext/GLFunctions.cpp index f0370add..e2b7a798 100644 --- a/src/Graphics/OpenGLContext/GLFunctions.cpp +++ b/src/Graphics/OpenGLContext/GLFunctions.cpp @@ -253,6 +253,10 @@ void initGLFunctions() GL_GET_PROC_ADR(PFNGLGETSTRINGIPROC, glGetStringi); GL_GET_PROC_ADR(PFNGLINVALIDATEFRAMEBUFFERPROC, glInvalidateFramebuffer); GL_GET_PROC_ADR(PFNGLBUFFERSTORAGEPROC, glBufferStorage); +#ifdef EGL + if (g_glBufferStorage == nullptr) + g_glBufferStorage = (PFNGLBUFFERSTORAGEPROC) eglGetProcAddress("glBufferStorageEXT"); +#endif GL_GET_PROC_ADR(PFNGLFENCESYNCPROC, glFenceSync); GL_GET_PROC_ADR(PFNGLCLIENTWAITSYNCPROC, glClientWaitSync); GL_GET_PROC_ADR(PFNGLDELETESYNCPROC, glDeleteSync); diff --git a/src/Graphics/OpenGLContext/opengl_ContextImpl.cpp b/src/Graphics/OpenGLContext/opengl_ContextImpl.cpp index c566b58c..232cd4a4 100644 --- a/src/Graphics/OpenGLContext/opengl_ContextImpl.cpp +++ b/src/Graphics/OpenGLContext/opengl_ContextImpl.cpp @@ -274,7 +274,7 @@ graphics::ColorBufferReader * ContextImpl::createColorBufferReader(CachedTexture return new ColorBufferReaderWithEGLImage(_pTexture, m_cachedFunctions->getCachedBindTexture()); #endif*/ - if (Utils::isExtensionSupported("GL_ARB_buffer_storage")) + if (Utils::isExtensionSupported("GL_ARB_buffer_storage") || Utils::isExtensionSupported("GL_EXT_buffer_storage")) return new ColorBufferReaderWithBufferStorage(_pTexture, m_cachedFunctions->getCachedBindBuffer()); return new ColorBufferReaderWithPixelBuffer(_pTexture, m_cachedFunctions->getCachedBindBuffer());