Here's a texture manager I did. So far it's entirely flawless. Based off the textures.pas from Sulaco. Would someone please critique these?? I'd like to know how well I'm doing on the Object Orientation side of things.

[pascal]{
This unit was written by Robert Kosek. (C) December 2004, All rights reserved.
Use at your own risk/inconvenience. The author is not responsible for any
problems, instability, stress or weight gain caused by the use of this unit.

This unit, OOTextures.pas, is freely usable in commercial/shareware applications
so long as the filename is unchanged and the Author (Robert Kosek) is credited.

Any modifications should be submitted to me via PM at the http://www.dgdev.tk
forums.
}

unit OOTextures;

interface

uses
Windows, SysUtils, Classes, GL, {GLu, }Textures;

type
TTextureItem = class(TCollectionItem)
private
FTexture: GLuint;
FTexId: string;
public
property Texture: GLuint read FTexture write FTexture;
property TexId: string read FTexId write FTexId;
constructor Create(Collection: TCollection; Filename: string); overload;
end;

TTextureSystem = class(TCollection)
private
function GetItem(Index: integer): TTextureItem;
procedure SetItem(Index: integer; const Value: TTextureItem);
function FindItem(TexID: string): TTextureItem;
public
property Items[Index: Integer]: TTextureItem read GetItem write
SetItem; default;
function AddTexture(filename: string): integer;
end;

implementation

{ TTextureSystem }

function TTextureSystem.AddTexture(filename: string): integer;
var item: TTextureItem;
begin
item := TTextureItem.Create(Self,filename);
item := nil;
result := Count-1;
end;

function TTextureSystem.FindItem(TexID: string): TTextureItem;
var i: integer;
begin
for i := 0 to count-1 do
if Items[i].TexId = TexID then begin
result := Items[i];
break;
end;
end;

function TTextureSystem.GetItem(Index: Integer): TTextureItem;
begin
Result := TTextureItem(inherited GetItem(Index));
end;

procedure TTextureSystem.SetItem(Index: Integer;
const Value: TTextureItem);
begin
inherited SetItem(Index, Value);
end;

{ TTextureItem }

constructor TTextureItem.Create(Collection: TCollection; Filename: string);
begin
inherited Create(Collection);
LoadTexture(filename,ftexture,false);
FTexID := filename;
end;

end.[/pascal]