From 5ba458875244697aeae9f4545a918cd7945665a9 Mon Sep 17 00:00:00 2001 From: Sergey Lipskiy Date: Mon, 23 Jan 2017 21:57:32 +0700 Subject: [PATCH] Rewrite ColorBufferToRDRAM --- projects/msvc12/GLideN64.vcxproj | 4 -- projects/msvc12/GLideN64.vcxproj.filters | 12 ---- src/BufferCopy/ColorBufferToRDRAM.cpp | 51 +++++++++-------- src/BufferCopy/ColorBufferToRDRAM.h | 17 +++--- src/FrameBuffer.cpp | 56 +++++++++---------- src/Graphics/ColorBufferReader.h | 2 +- src/Graphics/Context.cpp | 5 ++ src/Graphics/Context.h | 5 ++ src/Graphics/ContextImpl.h | 1 + ...pengl_ColorBufferReaderWithPixelBuffer.cpp | 3 - .../opengl_ColorBufferReaderWithPixelBuffer.h | 1 - .../OpenGLContext/opengl_ContextImpl.cpp | 6 ++ .../OpenGLContext/opengl_ContextImpl.h | 4 ++ 13 files changed, 84 insertions(+), 83 deletions(-) diff --git a/projects/msvc12/GLideN64.vcxproj b/projects/msvc12/GLideN64.vcxproj index 0312d5db..fd848286 100644 --- a/projects/msvc12/GLideN64.vcxproj +++ b/projects/msvc12/GLideN64.vcxproj @@ -265,8 +265,6 @@ - - @@ -406,8 +404,6 @@ - - diff --git a/projects/msvc12/GLideN64.vcxproj.filters b/projects/msvc12/GLideN64.vcxproj.filters index 1e97226f..e71bb4dc 100644 --- a/projects/msvc12/GLideN64.vcxproj.filters +++ b/projects/msvc12/GLideN64.vcxproj.filters @@ -221,9 +221,6 @@ Source Files\BufferCopy - - Source Files\BufferCopy - Source Files @@ -248,9 +245,6 @@ Source Files - - Source Files\BufferCopy - Source Files\uCodes @@ -520,12 +514,6 @@ Header Files\common - - Header Files\BufferCopy - - - Header Files\BufferCopy - Header Files\uCodes diff --git a/src/BufferCopy/ColorBufferToRDRAM.cpp b/src/BufferCopy/ColorBufferToRDRAM.cpp index 532ad3db..3f1dc1d8 100644 --- a/src/BufferCopy/ColorBufferToRDRAM.cpp +++ b/src/BufferCopy/ColorBufferToRDRAM.cpp @@ -9,6 +9,8 @@ #include #include #include "Log.h" + +/* #ifndef GLES2 #include "ColorBufferToRDRAM_GL.h" #include "ColorBufferToRDRAM_BufferStorageExt.h" @@ -17,8 +19,11 @@ #else #include "ColorBufferToRDRAMStub.h" #endif +*/ + #include #include +#include #include using namespace graphics; @@ -43,27 +48,22 @@ ColorBufferToRDRAM::~ColorBufferToRDRAM() void ColorBufferToRDRAM::init() { - // generate a framebuffer -// glBindFramebuffer(GL_DRAW_FRAMEBUFFER, 0); -// glGenFramebuffers(1, &m_FBO); - m_FBO = gfxContext.createFramebuffer(); - _init(); } void ColorBufferToRDRAM::destroy() { _destroyFBTexure(); -// glBindFramebuffer(GL_DRAW_FRAMEBUFFER, 0); if (m_FBO.isNotNull()) { gfxContext.deleteFramebuffer(m_FBO); -// glDeleteFramebuffers(1, &m_FBO); m_FBO.reset(); } } void ColorBufferToRDRAM::_initFBTexture(void) { + const FramebufferTextureFormats & fbTexFormat = gfxContext.getFramebufferTextureFormats(); + m_pTexture = textureCache().addFrameBufferTexture(false); m_pTexture->format = G_IM_FMT_RGBA; m_pTexture->clampS = 1; @@ -77,11 +77,10 @@ void ColorBufferToRDRAM::_initFBTexture(void) //cause slowdowns in the glReadPixels call, at least on Android m_pTexture->realWidth = _getRealWidth(m_lastBufferWidth); m_pTexture->realHeight = m_lastBufferHeight; - m_pTexture->textureBytes = m_pTexture->realWidth * m_pTexture->realHeight * 4; + m_pTexture->textureBytes = m_pTexture->realWidth * m_pTexture->realHeight * fbTexFormat.colorFormatBytes; textureCache().addFrameBufferTextureSize(m_pTexture->textureBytes); { - const FramebufferTextureFormats & fbTexFormat = gfxContext.getFramebufferTextureFormats(); Context::InitTextureParams params; params.handle = m_pTexture->name; params.width = m_pTexture->realWidth; @@ -111,17 +110,17 @@ void ColorBufferToRDRAM::_initFBTexture(void) } // check if everything is OK - assert(checkFBO()); + assert(!gfxContext.isFramebufferError()); gfxContext.bindFramebuffer(graphics::bufferTarget::DRAW_FRAMEBUFFER, graphics::ObjectHandle()); // glBindFramebuffer(GL_DRAW_FRAMEBUFFER, 0); - _initBuffers(); + m_bufferReader.reset(gfxContext.createColorBufferReader(m_pTexture)); } void ColorBufferToRDRAM::_destroyFBTexure(void) { - _destroyBuffers(); + m_bufferReader.reset(); if (m_pTexture != nullptr) { textureCache().removeFrameBufferTexture(m_pTexture); @@ -161,7 +160,6 @@ bool ColorBufferToRDRAM::_prepareCopy(u32 _startAddress) m_lastBufferWidth = pBuffer->m_width; m_lastBufferHeight = pBuffer->m_height; _initFBTexture(); - m_pixelData.resize(m_pTexture->realWidth * m_pTexture->realHeight * gfxContext.getFramebufferTextureFormats().colorFormatBytes); } m_pCurFrameBuffer = pBuffer; @@ -261,29 +259,29 @@ void ColorBufferToRDRAM::_copy(u32 _startAddress, u32 _endAddress, bool _sync) numPixels = (_endAddress - _startAddress) >> (m_pCurFrameBuffer->m_size - 1); } - const GLsizei width = m_pCurFrameBuffer->m_width; - const GLint x0 = 0; - const GLint y0 = max_height - (_endAddress - m_pCurFrameBuffer->m_startAddress) / stride; - const GLint y1 = max_height - (_startAddress - m_pCurFrameBuffer->m_startAddress) / stride; - const GLsizei height = std::min(max_height, 1u + y1 - y0); + const u32 width = m_pCurFrameBuffer->m_width; + const s32 x0 = 0; + const s32 y0 = max_height - (_endAddress - m_pCurFrameBuffer->m_startAddress) / stride; + const u32 y1 = max_height - (_startAddress - m_pCurFrameBuffer->m_startAddress) / stride; + const u32 height = std::min(max_height, 1u + y1 - y0); - const bool pixelsRead = _readPixels(x0, y0, width, height, m_pCurFrameBuffer->m_size, _sync); + const u8* pPixels = m_bufferReader->readPixels(x0, y0, width, height, m_pCurFrameBuffer->m_size, _sync); frameBufferList().setCurrentDrawBuffer(); - if (!pixelsRead) + if (pPixels == nullptr) return; if (m_pCurFrameBuffer->m_size == G_IM_SIZ_32b) { - u32 *ptr_src = (u32*)m_pixelData.data(); + u32 *ptr_src = (u32*)pPixels; u32 *ptr_dst = (u32*)(RDRAM + _startAddress); writeToRdram(ptr_src, ptr_dst, &ColorBufferToRDRAM::_RGBAtoRGBA32, 0, 0, width, height, numPixels, _startAddress, m_pCurFrameBuffer->m_startAddress, m_pCurFrameBuffer->m_size); } else if (m_pCurFrameBuffer->m_size == G_IM_SIZ_16b) { - u32 *ptr_src = (u32*)m_pixelData.data(); + u32 *ptr_src = (u32*)pPixels; u16 *ptr_dst = (u16*)(RDRAM + _startAddress); writeToRdram(ptr_src, ptr_dst, &ColorBufferToRDRAM::_RGBAtoRGBA16, 0, 1, width, height, numPixels, _startAddress, m_pCurFrameBuffer->m_startAddress, m_pCurFrameBuffer->m_size); } else if (m_pCurFrameBuffer->m_size == G_IM_SIZ_8b) { - u8 *ptr_src = (u8*)m_pixelData.data(); + u8 *ptr_src = (u8*)pPixels; u8 *ptr_dst = RDRAM + _startAddress; writeToRdram(ptr_src, ptr_dst, &ColorBufferToRDRAM::_RGBAtoR8, 0, 3, width, height, numPixels, _startAddress, m_pCurFrameBuffer->m_startAddress, m_pCurFrameBuffer->m_size); } @@ -292,7 +290,7 @@ void ColorBufferToRDRAM::_copy(u32 _startAddress, u32 _endAddress, bool _sync) m_pCurFrameBuffer->copyRdram(); m_pCurFrameBuffer->m_cleared = false; - _cleanUp(); + m_bufferReader->cleanUp(); gDP.changed |= CHANGED_SCISSOR; } @@ -326,6 +324,10 @@ void ColorBufferToRDRAM::copyChunkToRDRAM(u32 _address) ColorBufferToRDRAM & ColorBufferToRDRAM::get() { + static ColorBufferToRDRAM cbCopy; + return cbCopy; + + /* #ifndef GLES2 static bool supportsBufferStorage = OGLVideo::isExtensionSupported("GL_EXT_buffer_storage") || @@ -346,6 +348,7 @@ ColorBufferToRDRAM & ColorBufferToRDRAM::get() static ColorBufferToRDRAMStub cbCopy; return cbCopy; #endif + */ } void copyWhiteToRDRAM(FrameBuffer * _pBuffer) diff --git a/src/BufferCopy/ColorBufferToRDRAM.h b/src/BufferCopy/ColorBufferToRDRAM.h index 208251c7..fadc3cc5 100644 --- a/src/BufferCopy/ColorBufferToRDRAM.h +++ b/src/BufferCopy/ColorBufferToRDRAM.h @@ -1,11 +1,15 @@ #ifndef ColorBufferToRDRAM_H #define ColorBufferToRDRAM_H -#include +#include #include #include #include +namespace graphics { + class ColorBufferReader; +} + struct CachedTexture; struct FrameBuffer; @@ -20,20 +24,12 @@ public: static ColorBufferToRDRAM & get(); -protected: +private: ColorBufferToRDRAM(); ColorBufferToRDRAM(const ColorBufferToRDRAM &); virtual ~ColorBufferToRDRAM(); CachedTexture * m_pTexture; - std::vector m_pixelData; - -private: - virtual void _init() = 0; - virtual void _initBuffers(void) = 0; - virtual void _destroyBuffers(void) = 0; - virtual bool _readPixels(s32 _x0, s32 _y0, u32 _width, u32 _height, u32 _size, bool _sync) = 0; - virtual void _cleanUp() = 0; union RGBA { struct { @@ -66,6 +62,7 @@ private: u32 m_lastBufferHeight; std::array m_allowedRealWidths; + std::unique_ptr m_bufferReader; }; void copyWhiteToRDRAM(FrameBuffer * _pBuffer); diff --git a/src/FrameBuffer.cpp b/src/FrameBuffer.cpp index 50696375..f089354a 100644 --- a/src/FrameBuffer.cpp +++ b/src/FrameBuffer.cpp @@ -369,12 +369,12 @@ CachedTexture * FrameBuffer::_getSubTexture(u32 _t) if (!_initSubTexture(_t)) return m_pTexture; - GLint x0 = (GLint)(m_pTexture->offsetS * m_scaleX); - GLint y0 = (GLint)(m_pTexture->offsetT * m_scaleY) - m_pSubTexture->realHeight; - GLint copyWidth = m_pSubTexture->realWidth; + s32 x0 = (s32)(m_pTexture->offsetS * m_scaleX); + s32 y0 = (s32)(m_pTexture->offsetT * m_scaleY) - m_pSubTexture->realHeight; + s32 copyWidth = m_pSubTexture->realWidth; if (x0 + copyWidth > m_pTexture->realWidth) copyWidth = m_pTexture->realWidth - x0; - GLint copyHeight = m_pSubTexture->realHeight; + s32 copyHeight = m_pSubTexture->realHeight; if (y0 + copyHeight > m_pTexture->realHeight) copyHeight = m_pTexture->realHeight - y0; @@ -783,7 +783,7 @@ void FrameBufferList::attachDepthBuffer() if (goodDepthBufferTexture) { #endif // USE_DEPTH_RENDERBUFFER m_pCurrent->m_pDepthBuffer = pDepthBuffer; - pDepthBuffer->setDepthAttachment(m_pCurrent->m_FBO, GL_DRAW_FRAMEBUFFER); + pDepthBuffer->setDepthAttachment(m_pCurrent->m_FBO, bufferTarget::DRAW_FRAMEBUFFER); if (Context::imageTextures && config.frameBufferEmulation.N64DepthCompare != 0) pDepthBuffer->bindDepthImageTexture(); } else @@ -834,12 +834,12 @@ void FrameBufferList::renderBuffer(u32 _address) DisplayWindow & wnd = dwnd(); GraphicsDrawer & drawer = wnd.getDrawer(); - GLint srcY0, srcY1, dstY0, dstY1; - GLint X0, X1, Xwidth; - GLint Xoffset = 0; - GLint Xdivot = 0; - GLint srcPartHeight = 0; - GLint dstPartHeight = 0; + s32 srcY0, srcY1, dstY0, dstY1; + s32 X0, X1, Xwidth; + s32 Xoffset = 0; + s32 Xdivot = 0; + s32 srcPartHeight = 0; + s32 dstPartHeight = 0; const f32 yScale = _FIXED2FLOAT(_SHIFTR(*REG.VI_Y_SCALE, 0, 12), 10); s32 vEnd = _SHIFTR(*REG.VI_V_START, 0, 10); @@ -882,14 +882,14 @@ void FrameBufferList::renderBuffer(u32 _address) if (srcY0 + vCurrentHeight > vFullHeight) { dstPartHeight = srcY0; - srcY0 = (GLint)(srcY0*yScale); + srcY0 = (s32)(srcY0*yScale); srcPartHeight = srcY0; srcY1 = VI.real_height; dstY1 = dstY0 + vCurrentHeight - dstPartHeight; } else { dstY0 += srcY0; dstY1 = dstY0 + vCurrentHeight; - srcY0 = (GLint)(srcY0*yScale); + srcY0 = (s32)(srcY0*yScale); srcY1 = srcY0 + VI.real_height; } PostProcessor & postProcessor = PostProcessor::get(); @@ -907,29 +907,29 @@ void FrameBufferList::renderBuffer(u32 _address) const s32 h0 = (isPAL ? 128 : 108); const s32 hx0 = max(0, hStart - h0); const s32 hx1 = max(0, h0 + 640 - hEnd); - X0 = (GLint)((hx0 * viScaleX + Xoffset) * dstScaleX); - Xwidth = (GLint)((min((f32)VI.width, (hEnd - hStart)*viScaleX - Xoffset - Xdivot)) * srcScaleX); - X1 = wnd.getWidth() - (GLint)((hx1*viScaleX + Xdivot) * dstScaleX); + X0 = (s32)((hx0 * viScaleX + Xoffset) * dstScaleX); + Xwidth = (s32)((min((f32)VI.width, (hEnd - hStart)*viScaleX - Xoffset - Xdivot)) * srcScaleX); + X1 = wnd.getWidth() - (s32)((hx1*viScaleX + Xdivot) * dstScaleX); const f32 srcScaleY = pFilteredBuffer->m_scaleY; CachedTexture * pBufferTexture = pFilteredBuffer->m_pTexture; - const GLint hCrop = config.video.cropMode == Config::cmDisable ? 0 : GLint(config.video.cropWidth * srcScaleX); - const GLint vCrop = config.video.cropMode == Config::cmDisable ? 0 : GLint(config.video.cropHeight * srcScaleY); - GLint srcCoord[4] = { hCrop, - vCrop + (GLint)(srcY0*srcScaleY), + const s32 hCrop = config.video.cropMode == Config::cmDisable ? 0 : s32(config.video.cropWidth * srcScaleX); + const s32 vCrop = config.video.cropMode == Config::cmDisable ? 0 : s32(config.video.cropHeight * srcScaleY); + s32 srcCoord[4] = { hCrop, + vCrop + (s32)(srcY0*srcScaleY), Xwidth - hCrop, - min((GLint)(srcY1*srcScaleY), (GLint)pBufferTexture->realHeight) - vCrop }; + min((s32)(srcY1*srcScaleY), (s32)pBufferTexture->realHeight) - vCrop }; if (srcCoord[2] > pBufferTexture->realWidth || srcCoord[3] > pBufferTexture->realHeight) { removeBuffer(pBuffer->m_startAddress); return; } - const GLint hOffset = (wnd.getScreenWidth() - wnd.getWidth()) / 2; - const GLint vOffset = (wnd.getScreenHeight() - wnd.getHeight()) / 2 + wnd.getHeightOffset(); - GLint dstCoord[4] = { X0 + hOffset, - vOffset + (GLint)(dstY0*dstScaleY), + const s32 hOffset = (wnd.getScreenWidth() - wnd.getWidth()) / 2; + const s32 vOffset = (wnd.getScreenHeight() - wnd.getHeight()) / 2 + wnd.getHeightOffset(); + s32 dstCoord[4] = { X0 + hOffset, + vOffset + (s32)(dstY0*dstScaleY), hOffset + X1, - vOffset + (GLint)(dstY1*dstScaleY) }; + vOffset + (s32)(dstY1*dstScaleY) }; #if 0 //def GLESX // TODO fix me if (render.getRenderer() == OGLRender::glrAdreno) @@ -944,7 +944,7 @@ void FrameBufferList::renderBuffer(u32 _address) drawer.clearColorBuffer(clearColor); - GLenum filter = GL_LINEAR; + Parameter filter = textureParameters::FILTER_LINEAR; ObjectHandle readBuffer; if (pFilteredBuffer->m_pTexture->frameBufferTexture == CachedTexture::fbMultiSample) { @@ -957,7 +957,7 @@ void FrameBufferList::renderBuffer(u32 _address) } else { // glBindFramebuffer(GL_READ_FRAMEBUFFER, pFilteredBuffer->m_FBO); readBuffer = ObjectHandle(pFilteredBuffer->m_FBO); - filter = GL_NEAREST; + filter = textureParameters::FILTER_NEAREST; } } else { readBuffer = ObjectHandle(pFilteredBuffer->m_FBO); diff --git a/src/Graphics/ColorBufferReader.h b/src/Graphics/ColorBufferReader.h index ba2b7929..9b5a7c93 100644 --- a/src/Graphics/ColorBufferReader.h +++ b/src/Graphics/ColorBufferReader.h @@ -14,7 +14,7 @@ public: virtual ~ColorBufferReader() {} - virtual void init() = 0; +// virtual void init() = 0; // virtual void initBuffers() = 0; // virtual void destroyBuffers() = 0; virtual u8 * readPixels(s32 _x0, s32 _y0, u32 _width, u32 _height, u32 _size, bool _sync) = 0; diff --git a/src/Graphics/Context.cpp b/src/Graphics/Context.cpp index f3d23bc3..f70f430b 100644 --- a/src/Graphics/Context.cpp +++ b/src/Graphics/Context.cpp @@ -187,6 +187,11 @@ PixelReadBuffer * Context::createPixelReadBuffer(size_t _sizeInBytes) return m_impl->createPixelReadBuffer(_sizeInBytes); } +ColorBufferReader * Context::createColorBufferReader(CachedTexture * _pTexture) +{ + return m_impl->createColorBufferReader(_pTexture); +} + /*---------------Shaders-------------*/ CombinerProgram * Context::createCombinerProgram(Combiner & _color, Combiner & _alpha, const CombinerKey & _key) diff --git a/src/Graphics/Context.h b/src/Graphics/Context.h index 7e135a18..5d7b3538 100644 --- a/src/Graphics/Context.h +++ b/src/Graphics/Context.h @@ -11,6 +11,8 @@ #define GRAPHICS_CONTEXT +struct CachedTexture; + namespace graphics { enum class SpecialFeatures { @@ -25,6 +27,7 @@ namespace graphics { }; class ContextImpl; + class ColorBufferReader; class Context { @@ -190,6 +193,8 @@ namespace graphics { PixelReadBuffer * createPixelReadBuffer(size_t _sizeInBytes); + ColorBufferReader * createColorBufferReader(CachedTexture * _pTexture); + /*---------------Shaders-------------*/ CombinerProgram * createCombinerProgram(Combiner & _color, Combiner & _alpha, const CombinerKey & _key); diff --git a/src/Graphics/ContextImpl.h b/src/Graphics/ContextImpl.h index 92d3d1c1..632e9c8e 100644 --- a/src/Graphics/ContextImpl.h +++ b/src/Graphics/ContextImpl.h @@ -43,6 +43,7 @@ namespace graphics { virtual bool blitFramebuffers(const Context::BlitFramebuffersParams & _params) = 0; virtual PixelWriteBuffer * createPixelWriteBuffer(size_t _sizeInBytes) = 0; virtual PixelReadBuffer * createPixelReadBuffer(size_t _sizeInBytes) = 0; + virtual ColorBufferReader * createColorBufferReader(CachedTexture * _pTexture) = 0; virtual CombinerProgram * createCombinerProgram(Combiner & _color, Combiner & _alpha, const CombinerKey & _key) = 0; virtual bool saveShadersStorage(const Combiners & _combiners) = 0; virtual bool loadShadersStorage(Combiners & _combiners) = 0; diff --git a/src/Graphics/OpenGLContext/opengl_ColorBufferReaderWithPixelBuffer.cpp b/src/Graphics/OpenGLContext/opengl_ColorBufferReaderWithPixelBuffer.cpp index e4d69db3..a1915bba 100644 --- a/src/Graphics/OpenGLContext/opengl_ColorBufferReaderWithPixelBuffer.cpp +++ b/src/Graphics/OpenGLContext/opengl_ColorBufferReaderWithPixelBuffer.cpp @@ -19,9 +19,6 @@ ColorBufferReaderWithPixelBuffer::~ColorBufferReaderWithPixelBuffer() } -void ColorBufferReaderWithPixelBuffer::init() { -} - void ColorBufferReaderWithPixelBuffer::destroyBuffers() { glDeleteBuffers(_numPBO, m_PBO); diff --git a/src/Graphics/OpenGLContext/opengl_ColorBufferReaderWithPixelBuffer.h b/src/Graphics/OpenGLContext/opengl_ColorBufferReaderWithPixelBuffer.h index f4626490..85a02076 100644 --- a/src/Graphics/OpenGLContext/opengl_ColorBufferReaderWithPixelBuffer.h +++ b/src/Graphics/OpenGLContext/opengl_ColorBufferReaderWithPixelBuffer.h @@ -12,7 +12,6 @@ public: CachedBindBuffer * _bindBuffer); ~ColorBufferReaderWithPixelBuffer(); - void init() override; u8 * readPixels(s32 _x0, s32 _y0, u32 _width, u32 _height, u32 _size, bool _sync) override; void cleanUp() override; diff --git a/src/Graphics/OpenGLContext/opengl_ContextImpl.cpp b/src/Graphics/OpenGLContext/opengl_ContextImpl.cpp index fb404139..25d17f43 100644 --- a/src/Graphics/OpenGLContext/opengl_ContextImpl.cpp +++ b/src/Graphics/OpenGLContext/opengl_ContextImpl.cpp @@ -4,6 +4,7 @@ #include "opengl_ContextImpl.h" #include "opengl_UnbufferedDrawer.h" #include "opengl_DummyTextDrawer.h" +#include "opengl_ColorBufferReaderWithPixelBuffer.h" #include "opengl_Utils.h" #include "GLSL/glsl_CombinerProgramBuilder.h" #include "GLSL/glsl_SpecialShadersFactory.h" @@ -263,6 +264,11 @@ graphics::PixelReadBuffer * ContextImpl::createPixelReadBuffer(size_t _sizeInByt return m_createPixelReadBuffer->createPixelReadBuffer(_sizeInBytes); } +graphics::ColorBufferReader * ContextImpl::createColorBufferReader(CachedTexture * _pTexture) +{ + return new ColorBufferReaderWithPixelBuffer(_pTexture, m_cachedFunctions->getCachedBindBuffer()); +} + /*---------------Shaders-------------*/ graphics::CombinerProgram * ContextImpl::createCombinerProgram(Combiner & _color, Combiner & _alpha, const CombinerKey & _key) diff --git a/src/Graphics/OpenGLContext/opengl_ContextImpl.h b/src/Graphics/OpenGLContext/opengl_ContextImpl.h index 91bbb11f..ed8e8dad 100644 --- a/src/Graphics/OpenGLContext/opengl_ContextImpl.h +++ b/src/Graphics/OpenGLContext/opengl_ContextImpl.h @@ -87,10 +87,14 @@ namespace opengl { bool blitFramebuffers(const graphics::Context::BlitFramebuffersParams & _params) override; + /*---------------Pixelbuffer-------------*/ + graphics::PixelWriteBuffer * createPixelWriteBuffer(size_t _sizeInBytes) override; graphics::PixelReadBuffer * createPixelReadBuffer(size_t _sizeInBytes) override; + graphics::ColorBufferReader * createColorBufferReader(CachedTexture * _pTexture) override; + /*---------------Shaders-------------*/ graphics::CombinerProgram * createCombinerProgram(Combiner & _color, Combiner & _alpha, const CombinerKey & _key) override;