Skip to content

Commit

Permalink
renderer_gl: always rebind instanceBuffer
Browse files Browse the repository at this point in the history
6d6ae60 doesn't seem to work properly, use this way for now
  • Loading branch information
handsomematt committed Jan 19, 2020
1 parent 1290f01 commit 1cfffa6
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/renderer_gl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7310,12 +7310,12 @@ BX_TRACE("%d, %d, %d, %s", _array, _srgb, _mipAutogen, getName(_format) );
}

program.bindAttributesEnd();
}

if (isValid(draw.m_instanceDataBuffer) )
{
GL_CHECK(glBindBuffer(GL_ARRAY_BUFFER, m_vertexBuffers[draw.m_instanceDataBuffer.idx].m_id) );
program.bindInstanceData(draw.m_instanceDataStride, draw.m_instanceDataOffset);
}
if (isValid(draw.m_instanceDataBuffer))
{
GL_CHECK(glBindBuffer(GL_ARRAY_BUFFER, m_vertexBuffers[draw.m_instanceDataBuffer.idx].m_id));
program.bindInstanceData(draw.m_instanceDataStride, draw.m_instanceDataOffset);
}
}
}
Expand Down

0 comments on commit 1cfffa6

Please sign in to comment.