mirror of
https://github.com/blawar/GLideN64.git
synced 2024-07-04 10:03:36 +00:00
Correct height calculation on buffer copy.
This commit is contained in:
parent
dde54b238f
commit
0b12d3b26e
|
@ -1160,7 +1160,7 @@ void FrameBufferToRDRAM::_copy(u32 _startAddress, u32 _endAddress, bool _sync)
|
|||
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 = 1 + y1 - y0;
|
||||
const GLsizei height = min(max_height, 1 + y1 - y0);
|
||||
|
||||
GLenum colorFormat, colorType, colorFormatBytes;
|
||||
if (m_pCurFrameBuffer->m_size > G_IM_SIZ_8b) {
|
||||
|
@ -1409,7 +1409,7 @@ bool DepthBufferToRDRAM::_copy(u32 _startAddress, u32 _endAddress)
|
|||
const GLint x0 = 0;
|
||||
const GLint y0 = max_height - (_endAddress - m_pCurDepthBuffer->m_address) / stride;
|
||||
const GLint y1 = max_height - (_startAddress - m_pCurDepthBuffer->m_address) / stride;
|
||||
const GLsizei height = 1 + y1 - y0;
|
||||
const GLsizei height = min(max_height, 1 + y1 - y0);
|
||||
|
||||
PBOBinder binder(GL_PIXEL_PACK_BUFFER, m_PBO);
|
||||
glBindFramebuffer(GL_READ_FRAMEBUFFER, m_FBO);
|
||||
|
|
Loading…
Reference in New Issue
Block a user