Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/district53/irrlicht
Browse files Browse the repository at this point in the history
  • Loading branch information
MiniTurtle committed Mar 25, 2024
2 parents d888cf0 + 1636ee8 commit 5097daa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/Irrlicht/COpenGLDriver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,7 @@ bool COpenGLDriver::resizeIndexHardwareBufferSubData(SHWBufferLink* _HWBuffer, u
// Copy data from old buffer to new buffer
if (cpyIndexCount == 0)
cpyIndexCount = (irr::u32)size;
GLsizeiptrARB copySize = min(cpyIndexCount * indexSize, HWBuffer->vbo_indicesSize);
GLsizeiptrARB copySize = std::min((GLuint)cpyIndexCount * indexSize, HWBuffer->vbo_indicesSize);

extGlBindBuffer(GL_COPY_READ_BUFFER, prev_vbo_indicesID);
extGlBindBuffer(GL_COPY_WRITE_BUFFER, HWBuffer->vbo_indicesID);
Expand Down Expand Up @@ -553,7 +553,7 @@ bool COpenGLDriver::resizeVertexHardwareBufferSubData(SHWBufferLink* _HWBuffer,
// Copy data from old buffer to new buffer
if (cpyVertexCount == 0)
cpyVertexCount = (irr::u32)size;
GLsizeiptrARB copySize = min(cpyVertexCount * vertexSize, HWBuffer->vbo_verticesSize);
GLsizeiptrARB copySize = std::min((GLuint)cpyVertexCount * vertexSize, HWBuffer->vbo_verticesSize);

extGlBindBuffer(GL_COPY_READ_BUFFER, prev_vbo_vertexID);
extGlBindBuffer(GL_COPY_WRITE_BUFFER, HWBuffer->vbo_verticesID);
Expand Down

0 comments on commit 5097daa

Please sign in to comment.