From b5466c109d8757b3a87ad43dcacdc9a9ff9f1c31 Mon Sep 17 00:00:00 2001 From: Francisco Zurita Date: Sun, 29 Jan 2017 22:03:41 +0700 Subject: [PATCH] Correct issues in ColorBufferReaderWithEGLImage. Disable its use for now. --- .../OpenGLContext/opengl_ColorBufferReaderWithEGLImage.cpp | 4 ++-- .../OpenGLContext/opengl_ColorBufferReaderWithEGLImage.h | 3 +-- src/Graphics/OpenGLContext/opengl_ContextImpl.cpp | 3 ++- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Graphics/OpenGLContext/opengl_ColorBufferReaderWithEGLImage.cpp b/src/Graphics/OpenGLContext/opengl_ColorBufferReaderWithEGLImage.cpp index 2c444c7d..dbddf967 100644 --- a/src/Graphics/OpenGLContext/opengl_ColorBufferReaderWithEGLImage.cpp +++ b/src/Graphics/OpenGLContext/opengl_ColorBufferReaderWithEGLImage.cpp @@ -55,9 +55,9 @@ u8 * ColorBufferReaderWithEGLImage::readPixels(s32 _x0, s32 _y0, u32 _width, u32 if (!_sync) { void* ptr; - m_bindTexture->bind(Parameter(GL_TEXTURE_2D), m_pTexture->name); + m_bindTexture->bind(graphics::Parameter(0), graphics::Parameter(GL_TEXTURE_2D), m_pTexture->name); m_glEGLImageTargetTexture2DOES(GL_TEXTURE_2D, m_image); - m_bindTexture->bind(Parameter(GL_TEXTURE_2D), ObjectHandle()); + m_bindTexture->bind(graphics::Parameter(0), graphics::Parameter(GL_TEXTURE_2D), ObjectHandle()); int widthBytes = _width*colorFormatBytes; int strideBytes = m_pTexture->realWidth * colorFormatBytes; diff --git a/src/Graphics/OpenGLContext/opengl_ColorBufferReaderWithEGLImage.h b/src/Graphics/OpenGLContext/opengl_ColorBufferReaderWithEGLImage.h index bb81bc77..edff2bac 100644 --- a/src/Graphics/OpenGLContext/opengl_ColorBufferReaderWithEGLImage.h +++ b/src/Graphics/OpenGLContext/opengl_ColorBufferReaderWithEGLImage.h @@ -8,8 +8,7 @@ #include #include -typedef void (GL_APIENTRY* PFNGLEGLIMAGETARGETTEXTURE2DOESPROC) (GLenum target, EGLImageKHR image); -typedef void (GL_APIENTRY* PFNGLEGLIMAGETARGETRENDERBUFFERSTORAGEOESPROC) (GLenum target, EGLImageKHR image); +typedef void (APIENTRYP PFNGLEGLIMAGETARGETTEXTURE2DOESPROC) (GLenum target, EGLImageKHR image); using namespace android; diff --git a/src/Graphics/OpenGLContext/opengl_ContextImpl.cpp b/src/Graphics/OpenGLContext/opengl_ContextImpl.cpp index 022a1e92..9d50a15d 100644 --- a/src/Graphics/OpenGLContext/opengl_ContextImpl.cpp +++ b/src/Graphics/OpenGLContext/opengl_ContextImpl.cpp @@ -269,9 +269,10 @@ graphics::PixelReadBuffer * ContextImpl::createPixelReadBuffer(size_t _sizeInByt graphics::ColorBufferReader * ContextImpl::createColorBufferReader(CachedTexture * _pTexture) { + /* #ifdef EGL return new ColorBufferReaderWithEGLImage(_pTexture, m_cachedFunctions->getCachedBindTexture()); -#endif +#endif*/ if (glBufferStorage != nullptr && glMemoryBarrier != nullptr) return new ColorBufferReaderWithBufferStorage(_pTexture, m_cachedFunctions->getCachedBindBuffer());