mirror of
https://github.com/blawar/GLideN64.git
synced 2024-07-07 03:13:49 +00:00
Fix return value in ColorBufferReaderWithBufferStorage::readPixels
and ColorBufferReaderWithPixelBuffer::readPixels
This commit is contained in:
parent
b5466c109d
commit
9b9910dfc1
|
@ -75,7 +75,7 @@ u8 * ColorBufferReaderWithBufferStorage::readPixels(s32 _x0, s32 _y0, u32 _width
|
||||||
|
|
||||||
GLubyte* pixelData = reinterpret_cast<GLubyte*>(m_PBOData[m_curIndex]);
|
GLubyte* pixelData = reinterpret_cast<GLubyte*>(m_PBOData[m_curIndex]);
|
||||||
if (pixelData == nullptr)
|
if (pixelData == nullptr)
|
||||||
return false;
|
return nullptr;
|
||||||
|
|
||||||
int widthBytes = _width * colorFormatBytes;
|
int widthBytes = _width * colorFormatBytes;
|
||||||
int strideBytes = m_pTexture->realWidth * colorFormatBytes;
|
int strideBytes = m_pTexture->realWidth * colorFormatBytes;
|
||||||
|
|
|
@ -68,7 +68,7 @@ u8 * ColorBufferReaderWithPixelBuffer::readPixels(s32 _x0, s32 _y0, u32 _width,
|
||||||
|
|
||||||
GLubyte* pixelData = (GLubyte*)glMapBufferRange(GL_PIXEL_PACK_BUFFER, 0, m_pTexture->realWidth * _height * colorFormatBytes, GL_MAP_READ_BIT);
|
GLubyte* pixelData = (GLubyte*)glMapBufferRange(GL_PIXEL_PACK_BUFFER, 0, m_pTexture->realWidth * _height * colorFormatBytes, GL_MAP_READ_BIT);
|
||||||
if (pixelData == nullptr)
|
if (pixelData == nullptr)
|
||||||
return false;
|
return nullptr;
|
||||||
|
|
||||||
int widthBytes = _width*colorFormatBytes;
|
int widthBytes = _width*colorFormatBytes;
|
||||||
int strideBytes = m_pTexture->realWidth * colorFormatBytes;
|
int strideBytes = m_pTexture->realWidth * colorFormatBytes;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user