index ef9b660c9254c694f15bdf7900c088ba2e18532c..e53a3ef263fdd9033c454fe49b70b929c0f74685 100644 (file)
+{$MODE DELPHI}
unit e_textures;
{ This unit provides interface to load 24-bit and 32-bit uncompressed images
end;
var
+ e_DummyTextures: Boolean = False;
TEXTUREFILTER: Integer = GL_NEAREST;
function CreateTexture(var tex: GLTexture; Width, Height, aFormat: Word; pData: Pointer ): Boolean;
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);