[visionegg] Model3DS precaution patch

  • From: Tony Arkles <tony@xxxxxxxxx>
  • To: VisionEgg List <visionegg@xxxxxxxxxxxxx>
  • Date: Tue, 16 Aug 2005 16:06:47 -0600

Hi!

I have (after much pain and searching) another patch! Model3DS now ensures that the current GL color is set to white, so that it doesn't filter the texture with a colour and mess it up. For example, if a piece of black text (VisionEgg.Text.Text) is drawn before the Model3DS, the Model3DS would have an all black texture. Not anymore!

Tony
Index: src/_lib3ds.c
===================================================================
--- src/_lib3ds.c       (revision 1342)
+++ src/_lib3ds.c       (working copy)
@@ -112,6 +112,8 @@
   glRotatef(-90, 1.0,0,0);
   glScalef(scale_x,scale_y,scale_z);
 
+  // added to prevent other things from messing up the texture colouring.
+  glColor3f(1.0, 1.0, 1.0);
   {
     Lib3dsNode *p;
     for (p=file->nodes; p!=0; p=p->next) {

Other related posts: