- fixed: The textured automap was not using correct light levels.

In order for the externally passed vertex attribute to work the buffer's color attrib array needs to be disabled for these.
This commit is contained in:
Christoph Oelckers 2016-08-08 16:18:07 +02:00
commit e5f88a9883
3 changed files with 41 additions and 0 deletions

View file

@ -96,6 +96,33 @@ void FSimpleVertexBuffer::BindVBO()
}
}
void FSimpleVertexBuffer::EnableColorArray(bool on)
{
if (on)
{
if (gl.glslversion > 0)
{
glEnableVertexAttribArray(VATTR_COLOR);
}
else
{
glEnableClientState(GL_COLOR_ARRAY);
}
}
else
{
if (gl.glslversion > 0)
{
glDisableVertexAttribArray(VATTR_COLOR);
}
else
{
glDisableClientState(GL_COLOR_ARRAY);
}
}
}
void FSimpleVertexBuffer::set(FSimpleVertex *verts, int count)
{
glBindBuffer(GL_ARRAY_BUFFER, vbo_id);