unit textures;

interface

uses
  windows, OpenGL, texture_loading;

type
 TTexture = class
   id : integer;
   t : GLuint;
 public
   constructor Create(file_name : string);
   procedure Enable;
 end;

implementation

procedure glBindTexture(target: GLenum; texture: GLuint); stdcall; external opengl32;

constructor TTexture.Create(file_name : string);
begin
inherited Create;
LoadTexture(file_name, t);
end;

procedure TTexture.Enable;
begin
glEnable(GL_TEXTURE_2D);
glBindTexture(GL_TEXTURE_2D, t);
end;

end.
