From 1438c44f5fcc5309bef314a3a33826a53d70d15e Mon Sep 17 00:00:00 2001 From: nicopietroni Date: Mon, 5 Apr 2010 15:29:19 +0000 Subject: [PATCH] - Allowed the usage of per vertex coordinate , uncommented tm==TMPerVert options - corrected cast warning on line 721 --- wrap/gl/trimesh.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/wrap/gl/trimesh.h b/wrap/gl/trimesh.h index f678b2ae..c806acc6 100644 --- a/wrap/gl/trimesh.h +++ b/wrap/gl/trimesh.h @@ -573,21 +573,21 @@ void DrawFill() if(cm == CMPerFace) glColor(f.C()); if(cm == CMPerVert) glColor(f.V(0)->C()); -// if(tm==TMPerVert) glTexCoord(f.V(0)->T()); + if(tm==TMPerVert) glTexCoord(f.V(0)->T().P()); if( (tm==TMPerWedge)||(tm==TMPerWedgeMulti) )glTexCoord(f.WT(0).t(0)); glVertex(f.V(0)->P()); if(nm == NMPerVert) glNormal(f.V(1)->cN()); if(nm == NMPerWedge)glNormal(f.WN(1)); if(cm == CMPerVert) glColor(f.V(1)->C()); -// if(tm==TMPerVert) glTexCoord(f.V(1)->T()); + if(tm==TMPerVert) glTexCoord(f.V(1)->T().P()); if( (tm==TMPerWedge)|| (tm==TMPerWedgeMulti)) glTexCoord(f.WT(1).t(0)); glVertex(f.V(1)->P()); if(nm == NMPerVert) glNormal(f.V(2)->cN()); if(nm == NMPerWedge)glNormal(f.WN(2)); if(cm == CMPerVert) glColor(f.V(2)->C()); - // if(tm==TMPerVert) glTexCoord(f.V(2)->T()); + if(tm==TMPerVert) glTexCoord(f.V(2)->T().P()); if( (tm==TMPerWedge)|| (tm==TMPerWedgeMulti)) glTexCoord(f.WT(2).t(0)); glVertex(f.V(2)->P()); } @@ -718,7 +718,7 @@ void DrawPoints() glPointSize(GetHintParamf(HNPPointSize)); if (glPointParameterfv) { - float camDist = CameraDistance(); + float camDist = (float)CameraDistance(); float quadratic[] = { 0.0f, 0.0f, 1.0f/(camDist*camDist) , 0.0f }; glPointParameterfv( GL_POINT_DISTANCE_ATTENUATION, quadratic ); glPointParameterf( GL_POINT_SIZE_MAX, 16.0f );