Force buffer orphaning to fix initial buffer binding

dev
Tomasz Kapuściński 2022-03-09 16:56:03 +01:00
parent dffb988798
commit 8c40b7c753
1 changed files with 1 additions and 0 deletions

View File

@ -76,6 +76,7 @@ CGL33UIRenderer::CGL33UIRenderer(CGL33Device* device)
glGenBuffers(1, &m_bufferVBO); glGenBuffers(1, &m_bufferVBO);
glBindBuffer(GL_COPY_WRITE_BUFFER, m_bufferVBO); glBindBuffer(GL_COPY_WRITE_BUFFER, m_bufferVBO);
glBufferData(GL_COPY_WRITE_BUFFER, m_bufferCapacity * sizeof(Vertex2D), nullptr, GL_STREAM_DRAW); glBufferData(GL_COPY_WRITE_BUFFER, m_bufferCapacity * sizeof(Vertex2D), nullptr, GL_STREAM_DRAW);
m_bufferOffset = m_bufferCapacity;
glGenVertexArrays(1, &m_bufferVAO); glGenVertexArrays(1, &m_bufferVAO);
glBindVertexArray(m_bufferVAO); glBindVertexArray(m_bufferVAO);