Hmm, pretty interesting approach. I guess a singleton-based texture manager would be a good choice, too. The manager I have in mind loads textures from a file/stream, uses TThreadList to store the texture object. The texture object is just a simple class (something like that):
Code:
type
TTexture = class(TObject)
private
{ Private declarations }
FName: String;
FID: Cardinal;
public
{ Public declarations }
constructor Create(const ATexName: String; const ATexId: Cardinal);
property TexName: String read FName;
property ID: Cardinal read FID;
end;
What do you think of this idea?
Bookmarks