- 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:
parent
675822004d
commit
e5f88a9883
3 changed files with 41 additions and 0 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue