]> git.mxchange.org Git - simgear.git/blobdiff - simgear/screen/texture.hxx
Don't bother other develoers with problems caused by MipsPro (version < 7.3) compilers
[simgear.git] / simgear / screen / texture.hxx
index 00ce0e1c3027c5f257b692ab859aae67d6f0ce14..bb99b5c2dec5932db576d465d997efb8f99bd03d 100644 (file)
@@ -101,13 +101,18 @@ public:
 
     // texture pixel manipulation functions.
     void set_pixel(GLuint x, GLuint y, sgVec3 &c);
-    sgVec3 *get_pixel(GLuint x, GLuint y);
+    float *get_pixel(GLuint x, GLuint y);
 
     void bind();
-    inline void select() {
+    inline void select(bool keep_data = false) {
         glTexImage2D( GL_TEXTURE_2D, 0, GL_RGB,
                       texture_width, texture_height, 0,
                       GL_RGB, GL_UNSIGNED_BYTE, texture_data );
+
+        if (!keep_data) {
+            delete[] texture_data;
+            texture_data = 0;
+        }
     }
 
     // Nowhere does it say that resident textures have to be in video memory!