DEADSOFTWARE

put "{$MODE ...}" directive in each source file; removed trailing spaces, and convert...
[d2df-sdl.git] / src / engine / e_textures.pas
index ef9b660c9254c694f15bdf7900c088ba2e18532c..e53a3ef263fdd9033c454fe49b70b929c0f74685 100644 (file)
@@ -1,3 +1,4 @@
+{$MODE DELPHI}
 unit e_textures;
 
 { This unit provides interface to load 24-bit and 32-bit uncompressed images
@@ -18,6 +19,7 @@ type
   end;
 
 var
+  e_DummyTextures: Boolean = False;
   TEXTUREFILTER: Integer = GL_NEAREST;
 
 function CreateTexture(var tex: GLTexture; Width, Height, aFormat: Word; pData: Pointer ): Boolean;
@@ -94,6 +96,13 @@ begin
     e_WriteLog(Format('NPOT: orig is %ux%u; gl is %ux%u; u=%f; v=%f', [Width, Height, tex.glwidth, tex.glheight, tex.u, tex.v]), MSG_NOTIFY);
   end;
 
+  if e_DummyTextures then
+  begin
+    tex.id := GLuint(-1);
+    Result := True;
+    Exit;
+  end;
+
   glGenTextures(1, @Texture);
   tex.id := Texture;
   glBindTexture(GL_TEXTURE_2D, Texture);