]> git.mxchange.org Git - simgear.git/blobdiff - simgear/screen/texture.cxx
Frederic Bouvier:
[simgear.git] / simgear / screen / texture.cxx
index f573b98c6fcdd38c707a29454ba9ed15826f9266..4404786a7da7516c782bc408c2002093fe193665 100644 (file)
  */
 
 #include <simgear/compiler.h>
+
 #ifdef WIN32
 # include <windows.h>
 #endif
-#include <GL/glu.h>
+
+#include SG_GLU_H
+
 #include <zlib.h>
 
 #include "texture.hxx"
@@ -193,6 +196,7 @@ SGTexture::read_alpha_texture(const char *name)
     }
 
     texture_data = new GLubyte[ image->xsize * image->ysize ];
+    num_colors = 1;
     if (!texture_data)
         return;
 
@@ -227,6 +231,7 @@ SGTexture::read_rgb_texture(const char *name)
     }
 
     texture_data = new GLubyte[ image->xsize * image->ysize * 3 ];
+    num_colors = 3;
     rbuf = new GLubyte[ image->xsize ];
     gbuf = new GLubyte[ image->xsize ];
     bbuf = new GLubyte[ image->xsize ];
@@ -290,6 +295,7 @@ SGTexture::read_rgba_texture(const char *name)
     }
 
     texture_data = new GLubyte[ image->xsize * image->ysize * 4 ];
+    num_colors = 4;
     rbuf = new GLubyte[ image->xsize ];
     gbuf = new GLubyte[ image->xsize ];
     bbuf = new GLubyte[ image->xsize ];