DEADSOFTWARE

fix building with USE_SYSSTUB + USE_SDLMIXER
[d2df-sdl.git] / src / engine / e_texture.pas
index c99d4eb3c070a626230b842232744487eec605dd..3e578c8088d25b39612a400bded3946147606d2c 100644 (file)
@@ -2,8 +2,7 @@
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * the Free Software Foundation, version 3 of the License ONLY.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -23,13 +22,8 @@ unit e_texture;
 interface
 
 uses
-{$IFDEF USE_NANOGL}
-  nanoGL,
-{$ELSE}
-  GL, GLExt,
-{$ENDIF}
-  SysUtils, e_log,
-  ImagingTypes, Imaging, ImagingUtility;
+  {$INCLUDE ../nogl/noGLuses.inc}
+  SysUtils, e_log, ImagingTypes, Imaging, ImagingUtility;
 
 type
   GLTexture = record
@@ -108,6 +102,7 @@ begin
     Exit;
   end;
 
+  Texture := 0;
   glGenTextures(1, @Texture);
   tex.id := Texture;
   glBindTexture(GL_TEXTURE_2D, Texture);