Skip to content

Commit 569e784

Browse files
slipherillwieckz
authored andcommitted
Renderer: Avoid a DSA function with VAOs
Use the old method to bind the IBO to the VAO instead of glVertexArrayElementBuffer. Fixes #1729.
1 parent 6ec7fb3 commit 569e784

File tree

2 files changed

+1
-6
lines changed

2 files changed

+1
-6
lines changed

src/engine/renderer/GLMemory.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -275,11 +275,6 @@ class GLVAO {
275275
glVertexArrayElementBuffer( id, buffer.id );
276276
}
277277

278-
// For compatibility with IBO_t
279-
void SetIndexBuffer( const GLuint bufferID ) {
280-
glVertexArrayElementBuffer( id, bufferID );
281-
}
282-
283278
void GenVAO() {
284279
glGenVertexArrays( 1, &id );
285280
}

src/engine/renderer/tr_vbo.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,7 @@ void SetupVAOBuffers( VBO_t* VBO, const IBO_t* IBO, const uint32_t stateBits,
456456
GL_VertexAttribsState( stateBits, true );
457457

458458
if ( IBO ) {
459-
VAO->SetIndexBuffer( IBO->indexesVBO );
459+
glBindBuffer( GL_ELEMENT_ARRAY_BUFFER, IBO->indexesVBO );
460460
}
461461

462462
GL_BindVAO( backEnd.defaultVAO );

0 commit comments

Comments
 (0)