- got rid of VAO's. they have no impact on performance and are a general nuisance if some render paths cannot use them.

- cleaned up gl_interface and removed gl.compatibility.
This commit is contained in:
Christoph Oelckers 2016-04-26 16:26:34 +02:00
commit 3b1500438d
11 changed files with 82 additions and 56 deletions

View file

@ -117,20 +117,27 @@ void gl_FlushModels()
FModelVertexBuffer::FModelVertexBuffer(bool needindex)
{
glBindVertexArray(vao_id);
ibo_id = 0;
if (needindex)
{
glGenBuffers(1, &ibo_id);
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, ibo_id);
}
}
//===========================================================================
//
//
//
//===========================================================================
void FModelVertexBuffer::BindVBO()
{
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, ibo_id);
glBindBuffer(GL_ARRAY_BUFFER, vbo_id);
glEnableVertexAttribArray(VATTR_VERTEX);
glEnableVertexAttribArray(VATTR_TEXCOORD);
glEnableVertexAttribArray(VATTR_VERTEX2);
glBindVertexArray(0);
glDisableVertexAttribArray(VATTR_COLOR);
}
//===========================================================================