From 00c7e5e552625e6a044728624c161e37ef768d1f Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Wed, 6 Feb 2013 14:50:37 +0000 Subject: [PATCH] From Aurelien Albert, "This line,I use the "useVertexAttributeAliasing" mode in my application, and color arrays are not normalized, so shaders get [0.0-255.0] values instead of [0.0-1.0] values. This patch fix this." and those below, will be ignored ---- M include/osg/State --- include/osg/State | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/osg/State b/include/osg/State index cedd52584..df55037e3 100644 --- a/include/osg/State +++ b/include/osg/State @@ -818,7 +818,7 @@ class OSG_EXPORT State : public Referenced, public Observer #ifdef OSG_GL_VERTEX_ARRAY_FUNCS_AVAILABLE if (_useVertexAttributeAliasing) { - setVertexAttribPointer(_colorAlias._location, size, type, GL_FALSE, stride, ptr); + setVertexAttribPointer(_colorAlias._location, size, type, GL_TRUE, stride, ptr); } else { @@ -836,7 +836,7 @@ class OSG_EXPORT State : public Referenced, public Observer _colorArray._dirty = false; } #else - setVertexAttribPointer(_colorAlias._location, size, type, GL_FALSE, stride, ptr); + setVertexAttribPointer(_colorAlias._location, size, type, GL_TRUE, stride, ptr); #endif }