From Aurelien Albert, added passing on of the gl array normalize to OpenGL when uses vertex attribute aliasing.

This commit is contained in:
Robert Osfield
2013-06-27 15:18:38 +00:00
parent 90ceb88c12
commit 57947ea75c
4 changed files with 44 additions and 39 deletions

View File

@@ -981,12 +981,12 @@ bool State::setClientActiveTextureUnit( unsigned int unit )
return true;
}
void State::setFogCoordPointer(GLenum type, GLsizei stride, const GLvoid *ptr)
void State::setFogCoordPointer(GLenum type, GLsizei stride, const GLvoid *ptr, GLboolean normalized)
{
#ifdef OSG_GL_VERTEX_ARRAY_FUNCS_AVAILABLE
if (_useVertexAttributeAliasing)
{
setVertexAttribPointer(_fogCoordAlias._location, 1, type, GL_FALSE, stride, ptr);
setVertexAttribPointer(_fogCoordAlias._location, 1, type, normalized, stride, ptr);
}
else
{
@@ -1008,17 +1008,17 @@ void State::setFogCoordPointer(GLenum type, GLsizei stride, const GLvoid *ptr)
}
}
#else
setVertexAttribPointer(_fogCoordAlias._location, 1, type, GL_FALSE, stride, ptr);
setVertexAttribPointer(_fogCoordAlias._location, 1, type, normalized, stride, ptr);
#endif
}
void State::setSecondaryColorPointer( GLint size, GLenum type,
GLsizei stride, const GLvoid *ptr )
GLsizei stride, const GLvoid *ptr, GLboolean normalized )
{
#ifdef OSG_GL_VERTEX_ARRAY_FUNCS_AVAILABLE
if (_useVertexAttributeAliasing)
{
setVertexAttribPointer(_secondaryColorAlias._location, size, type, GL_FALSE, stride, ptr);
setVertexAttribPointer(_secondaryColorAlias._location, size, type, normalized, stride, ptr);
}
else
{
@@ -1036,10 +1036,11 @@ void State::setSecondaryColorPointer( GLint size, GLenum type,
}
_secondaryColorArray._lazy_disable = false;
_secondaryColorArray._dirty = false;
_secondaryColorArray._normalized = normalized;
}
}
#else
setVertexAttribPointer(_secondaryColorAlias._location, size, type, GL_FALSE, stride, ptr);
setVertexAttribPointer(_secondaryColorAlias._location, size, type, normalized, stride, ptr);
#endif
}