index 504b3fb0cb07af035fbaff8068c022066bab9d87..1c470fa6b3fe997e483e451bbaa4b9a19ab42c1e 100644 (file)
fUseMipmaps: Boolean = False;
TEXTUREFILTER: Integer = GL_NEAREST;
-function CreateTexture( Width, Height, Format: Word; pData: Pointer ): Integer;
-
+function CreateTexture( Width, Height, Format: Word; pData: Pointer ): Integer;
+
// Standard set of images loading functions
function LoadTexture( Filename: String; var Texture: GLuint;
var pWidth, pHeight: Word; Fmt: PWord = nil ): Boolean;
glTexImage2D( GL_TEXTURE_2D, 0, 3, Width, Height,
0, GL_RGB, GL_UNSIGNED_BYTE, pData );
end;
-
+
glBindTexture(GL_TEXTURE_2D, 0);
Result := Texture;
TFmt := GL_RGB
else
TFmt := GL_RGBA;
-
+
Texture := CreateTexture( Width, Height, TFmt, Image );
FreeMem( Image );
-
+
if Fmt <> nil then Fmt^ := TFmt;
pWidth := Width;
TFmt := GL_RGB
else
TFmt := GL_RGBA;
-
+
Texture := CreateTexture( fWidth, fHeight, TFmt, Image );
FreeMem( Image );
FreeMem( Image2 );
-
+
if Fmt <> nil then Fmt^ := TFmt;
Result := True;
TFmt := GL_RGB
else
TFmt := GL_RGBA;
-
+
Texture := CreateTexture( Width, Height, TFmt, Image );
FreeMem( Image );
-
+
if Fmt <> nil then Fmt^ := TFmt;
pWidth := Width;
BPP: Byte;
Base: PByte;
TFmt: Word;
-
+
begin
Result := False;
end;
end.
-