Skip to main content
gamedev.net
🔒 Locked

TextureManager *SOLVED*

Started by Thaligar Aug 10, 2005 at 6:23 AM 1 replies 350+ views
Original Post
Thaligar
Thaligar
hi folks, ok, at the moment i'm reimplementing my engine and also try to make it more flexible, well but now i came across a problem, in my prev. engine i used only opengl and so i made a texturemanager which was not part of the renderer, but now if i really wanna make it possible that my renderer can be exchanged than i have to make a texturemanager for each renderer, so is the texturemanager part of the renderer or am i completly wrong, if someone can help, please post, thanks in advance for your time, and best regards, tgar [Edited by - Thaligar on August 10, 2005 7:06:58 AM]
dave
dave
Well you could have two objects, one that encapsulates a texture for OGL and one that encapsulates a texture for DirectX. If you use polymorphism you can store both types within the same manager so long as they derive from the same base object. It would be important for each texture to interface with the rest of the engine the same so that to the rest of the engine it is just a texture.

ace
Thaligar
Thaligar
thanks ace_lovegrove,

i'll try to make a std interface for the texture handles,
this should solve my prob, one texturemgr and one baseclass with
a base interface,

you brought my brain the enlightment it needed,

thanks again
greets
tgar

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.