well here is my class and manager , let me know what you think.

[pascal]
unit SDLGLTexture;

interface

uses SDL, SDL_Image, SDLUtils, gl,glu, Classes;

type

TSDLGLTextureSize = (ts64x64,ts128x64,ts128x128,ts256x128,ts256x256,ts 512x512,ts1024x1024,ts1024x512, ts1024x12;

TSDLGLTexture = class;

TSDLGLTexture = class
private
FHeight: UInt16;
FWidth: UInt16;
FSize: TSDLGLTextureSize;
FSurface: PSDL_Surface;
FTextureID: GLuint;
protected
function CreateBlankSurface: PSDL_Surface;
function CreateSurfaceFromFile(Filename: string): PSDL_Surface;
function CreateSurfaceFromStream(AStream: TStream): PSDL_Surface; virtual;
procedure CreateTexture;
procedure RefreshTexture;
public
constructor Create(ASize: TSDLGLTextureSize);
constructor CreateFromFile(ASize: TSDLGLTextureSize; AFilename: String );
constructor CreateFromStream(ASize: TSDLGLTextureSize; AStream: TStream);
destructor Destroy; override;
procedure Activate;
procedure DeActivate;
property Width: UInt16 read FWidth;
property Height: UInt16 read FHeight;
property Size: TSDLGLTextureSize read FSize;
property TextureID: GLuint read FTextureID;
property Surface: PSDL_Surface read FSurface;
end;

TTextureManager = class
private
FTextureList: TStringList;
protected
function GetTexture(Name: string): TSDLGLTexture;
property TextureList: TStringList read FTextureList;
public
constructor Create;
destructor Destroy; override;
function AddTexture(AName: string; ASize: TSDLGLTextureSize = ts256x256): TSDLGLTexture;
function AddTextureFromStream(AName: string; AStream: TStream; ASize: TSDLGLTextureSize = ts256x256): TSDLGLTexture;
function AddBlankTexture(AName: string; ASize: TSDLGLTextureSize = ts256x256): TSDLGLTexture;
procedure DeleteTexture(AName: string);
property Textures[Name: string]: TSDLGLTexture read GetTexture;
end;

const TextureManager: TTextureManager = nil;

implementation

uses SysUtils, sdlstreams;

{ TSDLGLTexture }
type

TTextureDimensions = record
Width, Height: Integer;
end;

const SizeLookup: array[TSDLGLTextureSize] of TTextureDimensions =
( (Width : 64; Height : 64),
(Width : 128; Height : 64),
(Width : 128; Height : 12,
(Width : 256; Height : 12,
(Width : 256; Height : 256),
(Width : 512; Height : 512),
(Width : 1024; Height: 1024),
(Width : 1024; Height: 512),
(Width : 1024; Height: 12
);

constructor TSDLGLTexture.Create(ASize: TSDLGLTextureSize);
begin
inherited Create;
FSurface := nil;
FSize := ASize;
FTextureID := 0;
FWidth := SizeLookup[ASize].Width;
FHeight := SizeLookup[ASize].Height;
FSurface := CreateBlankSurface;
Assert(FSurface <> nil,'SDLGLTexture.Create : Failed to Create Surface');
end;

constructor TSDLGLTexture.CreateFromFile(ASize: TSDLGLTextureSize;
AFilename: String);
begin
inherited Create;
FSurface := nil;
FSize := ASize;
FTextureID := 0;
FWidth := SizeLookup[ASize].Width;
FHeight := SizeLookup[ASize].Height;
FSurface := CreateSurfaceFromFile(AFilename);
Assert(FSurface <> nil,'SDLGLTexture.CreateFromFile : Failed to Create Surface');
end;

function TSDLGLTexture.CreateBlankSurface: PSDL_Surface;
begin
Result := SDL_CreateRGBSurface(
SDL_HWSURFACE or SDL_SRCALPHA or SDL_RLEACCEL,
FWidth, FHeight,
32,
//{$IFDEF IA32} (* OpenGL RGBA masks *)
// $000000FF,
// $0000FF00,
// $00FF0000,
// $FF000000
//{$ELSE}
$0000FF00,
$00FF0000,
$FF000000,
$000000FF
//{$ENDIF}
);
end;

destructor TSDLGLTexture.Destroy;
begin
if Surface <> nil then
SDL_FreeSurface(Surface);
inherited Destroy;
end;

function TSDLGLTexture.CreateSurfaceFromFile(Filename: string): PSDL_Surface;
var fs:TFileStream;
begin
fs := TFileStream.Create(Filename, fmOpenRead);
try
Result := CreateSurfaceFromStream(fs);
finally
fs.Free;
end;
end;

procedure TSDLGLTexture.Activate;
begin
//
if TextureID = 0 then
begin
// Generate Texture.
CreateTexture;
end
else
begin
glBindTexture(GL_TEXTURE_2D, TextureID);
end;
end;

procedure TSDLGLTexture.DeActivate;
begin
//
glBindTexture(GL_TEXTURE_2D, 0);
end;

procedure TSDLGLTexture.CreateTexture;
var Format: Cardinal;
begin
glEnable(GL_TEXTURE_2D);
glGenTextures(1, @FTextureID);
glBindTexture(GL_TEXTURE_2D, FTextureID);
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); {Texture blends with object background}
// glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_DECAL); {Texture does NOT blend with object background}

glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); { only first two can be used }
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); { all of the above can be used }
// glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
// glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
// gluBuild2DMipmaps(GL_TEXTURE_2D, GL_RGBA, Width, Height, GL_RGBA, GL_UNSIGNED_BYTE, Surface.pixels);
Format := GL_RGB;
if Surface.format.BitsPerPixel = 32 then Format := GL_RGBA;

glTexImage2D(GL_TEXTURE_2D, 0, Format, Width, Height, 0, Format, GL_UNSIGNED_BYTE, Surface.pixels);
end;

constructor TSDLGLTexture.CreateFromStream(ASize: TSDLGLTextureSize;
AStream: TStream);
var Target: TStream;
TempImage: PSDL_Surface;
begin
inherited Create;
FSurface := nil;
FSize := ASize;
FTextureID := 0;
FWidth := SizeLookup[ASize].Width;
FHeight := SizeLookup[ASize].Height;
Target.Position := 0;
FSurface := CreateSurfaceFromStream(AStream);
Assert(FSurface <> nil,'SDLGLTexture.CreateFromStream : Failed to Create Surface');
end;

function TSDLGLTexture.CreateSurfaceFromStream(AStream: TStream): PSDL_Surface;
var Rwops: PSDL_RWops;
begin
Rwops := SDLStreamSetup(AStream);
try
Result := IMG_Load_RW(Rwops, 0);
if Result <> nil then SDL_FlipRectV(Result, nil);
finally
SDLStreamCloseRWops(Rwops);
end;
end;

procedure TSDLGLTexture.RefreshTexture;
var Format: Cardinal;
begin
Activate;
Format := GL_RGB;
if Surface.format.BitsPerPixel = 32 then Format := GL_RGBA;
glTexSubImage2D(GL_TEXTURE_2D, 0,0,0, Width, Height, Format, GL_UNSIGNED_BYTE, Surface.pixels)
end;

{ TTextureManager }

function TTextureManager.AddBlankTexture(AName: string;
ASize: TSDLGLTextureSize): TSDLGLTexture;
begin
Result := TSDLGLTexture.Create(ASize);
if Result <> nil then
begin
TextureList.AddObject(ExtractFileName(AName), Result);
end;
end;

function TTextureManager.AddTexture(AName: string; ASize: TSDLGLTextureSize = ts256x256): TSDLGLTexture;
begin
Result := nil;
if AName = EmptyStr then Exit;
Result := Textures[ExtractFileName(AName)];
if Result <> nil then Exit;
if not FileExists(AName) then Exit;
Result := TSDLGLTexture.CreateFromFile(ASize,AName);
if Result <> nil then
begin
TextureList.AddObject(UpperCase(ExtractFileName(AN ame)), Result);
end;
end;

function TTextureManager.AddTextureFromStream(AName: string; AStream: TStream;
ASize: TSDLGLTextureSize): TSDLGLTexture;
begin
Result := nil;
if AName = EmptyStr then Exit;
Result := Textures[UpperCase(AName)];
if Result <> nil then Exit;
Result := TSDLGLTexture.CreateFromStream(ASize,AStream);
if Result <> nil then
begin
TextureList.AddObject(UpperCase(AName), Result);
end;
end;

constructor TTextureManager.Create;
begin
inherited Create;
FTextureList := TStringList.Create;
end;

procedure TTextureManager.DeleteTexture(AName: string);
var idx: Integer;
begin
idx := TextureList.IndexOf(AName);
if idx <> -1 then
begin
TextureList.Objects[idx].Free;
TextureList.delete(idx);
end;
end;

destructor TTextureManager.Destroy;
var i: Integer;
begin
for i := 0 to TextureList.Count-1 do
begin
TextureList.Objects[i].Free;
end;
TextureList.Free;
inherited Destroy;
end;

function TTextureManager.GetTexture(Name: string): TSDLGLTexture;
var idx: Integer;
begin
Result := nil;
idx := TextureList.IndexOf(Name);
if idx <> -1 then
begin
Result := TSDLGLTexture(TextureList.Objects[idx]);
end;
end;

initialization

TextureManager := TTextureManager.Create;

finalization

TextureManager.Free;

end.
[/pascal]