disable texture coordinates when not needed

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@2535 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
Lee Salzman
2008-09-12 00:59:54 +00:00
parent 3d3279b3b0
commit 512539c48c
+9 -1
View File
@@ -184,7 +184,15 @@ struct vertmodel : model
glVertexPointer(3, GL_FLOAT, sizeof(vec), dynbuf);
lastvertexarray = dynbuf;
}
if(lasttexcoordarray != tcverts)
if(as.anim&ANIM_NOSKIN && !isstat)
{
if(lasttexcoordarray)
{
glDisableClientState(GL_TEXTURE_COORD_ARRAY);
lasttexcoordarray = NULL;
}
}
else if(lasttexcoordarray != tcverts)
{
if(!lasttexcoordarray) glEnableClientState(GL_TEXTURE_COORD_ARRAY);
glTexCoordPointer(2, GL_FLOAT, sizeof(tcvert), tcverts);