From 5261480fc7507e9f4d96fc575bddb200d5c514c0 Mon Sep 17 00:00:00 2001 From: dibenedetto Date: Wed, 12 Sep 2007 14:48:50 +0000 Subject: [PATCH] Corrected indexing for non textured faces. --- wrap/gl/trimesh.h | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/wrap/gl/trimesh.h b/wrap/gl/trimesh.h index 51cc408a..4a16ea82 100644 --- a/wrap/gl/trimesh.h +++ b/wrap/gl/trimesh.h @@ -24,6 +24,9 @@ History $Log: not supported by cvs2svn $ +Revision 1.23 2007/01/18 01:26:23 cignoni +Added cast for mac compiling + Revision 1.22 2006/12/12 11:06:58 cignoni Slightly changed the colormaterial mode for the flatwire @@ -397,8 +400,7 @@ void DrawFill() // if(tm == TMPerWedge || tm == TMPerWedgeMulti ) { - glEnable(GL_TEXTURE_2D); - glBindTexture(GL_TEXTURE_2D,TMId[0]); + glDisable(GL_TEXTURE_2D); } if(h&HNUseVArray) @@ -487,7 +489,15 @@ void DrawFill() { curtexname=(*fi).WT(0).n(); glEnd(); - glBindTexture(GL_TEXTURE_2D,TMId[curtexname]); + if (curtexname >= 0) + { + glEnable(GL_TEXTURE_2D); + glBindTexture(GL_TEXTURE_2D,TMId[curtexname]); + } + else + { + glDisable(GL_TEXTURE_2D); + } glBegin(GL_TRIANGLES); } if(nm == NMPerFace) glNormal(f.cN());