Added State::disableTexCoordPointersAboveAndIncluding( unit ) method so that

all unsed texture units can be turned off simply within Drawables such
as Geometry and GeoSet. This can be used to prevent bleed of arrays from
one object to the next - which can cause crashes.
This commit is contained in:
Robert Osfield
2002-07-15 10:03:59 +00:00
parent 6a2aa35c26
commit db892e6bfe
3 changed files with 29 additions and 6 deletions

View File

@@ -48,7 +48,8 @@ void Geometry::drawImmediateMode(State& state)
state.setVertexPointer(3,GL_FLOAT,0,_vertexArray->dataPointer());
// set up texture coordinates.
for(unsigned int i=0;i<_texCoordList.size();++i)
unsigned int i;
for(i=0;i<_texCoordList.size();++i)
{
Array* array = _texCoordList[i].get();
if (array)
@@ -56,6 +57,7 @@ void Geometry::drawImmediateMode(State& state)
else
state.disableTexCoordPointer(i);
}
state.disableTexCoordPointersAboveAndIncluding(i);
// set up normals.