Refactored osg::Geometry::drawImplementation(..) to use new osg::ArrayDispatchers that encapsulate the task

of dispatch osg::Array data as OpenGL attributes.
This commit is contained in:
Robert Osfield
2009-10-20 19:34:24 +00:00
parent b0057e258c
commit 6a56b6e6be
11 changed files with 934 additions and 41 deletions

View File

@@ -476,13 +476,13 @@ class OSG_EXPORT State : public Referenced, public Observer
else glNormal3f(x,y,z);
}
void TexCoord(float x, float y=0.0f, float z=0.0f, float w=0.0f)
void TexCoord(float x, float y=0.0f, float z=0.0f, float w=1.0f)
{
if (_useVertexAttributeAliasing) _glVertexAttrib4f( _texCoordAliasList[0]._location, x,y,z,w);
else glTexCoord4f(x,y,z,w);
}
void MultiTexCoord(unsigned int unit, float x, float y=0.0f, float z=0.0f, float w=0.0f)
void MultiTexCoord(unsigned int unit, float x, float y=0.0f, float z=0.0f, float w=1.0f)
{
if (_useVertexAttributeAliasing) _glVertexAttrib4f( _texCoordAliasList[unit]._location, x,y,z,w);
else _glMultiTexCoord4f(GL_TEXTURE0+unit,x,y,z,w);