Fixed crash when using vertex attribute arrays

This commit is contained in:
Robert Osfield
2016-08-16 16:51:41 +01:00
parent b2873132be
commit 3be951f279

View File

@@ -438,7 +438,7 @@ struct VertexAttribArrayDispatch : public VertexArrayState::ArrayDispatch
inline void callVertexAttribPointer(GLExtensions* ext, const osg::Array* new_array, const GLvoid * ptr)
{
if (array->getPreserveDataType())
if (new_array->getPreserveDataType())
{
if (new_array->getDataType()==GL_FLOAT)
ext->glVertexAttribPointer(static_cast<GLuint>(unit), new_array->getDataSize(), new_array->getDataType(), new_array->getNormalize(), 0, ptr);