Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Texture manager class
11-30-2005, 09:20 AM,
#1
Texture manager class
We need a class that handles textures instead of all the other classes having to keep track of them...I think it should do the following:<ul><li>texture loading<li>texture unloading<li>texture drawing<li>keep a reference to each loaded texture (GLuint)<li>if a request to load a texture is made after that texture has already been loaded, just return the stored reference to the texture (don't load it again)<li>keep up with sizes of textures somehow?<li>simplify the way we handle textures<li>handle reloading all the textures if the texture size changes</ul>what else?
Reply
11-30-2005, 11:23 PM,
#2
Texture manager class
sounds good, i wouldn't mind writing itwhat sort of priority? should i be working on that or putting the new track system into the game or improving the track editor?
Reply
12-01-2005, 09:20 AM,
#3
Texture manager class
I'd say if you think it won't take too long, work on the texture manager first. It doesn't seem to me like it'd be terribly hard...half of the functions are already in utility.cpp. It's just a matter of wrapping it up into a nice class with some extra management stuff. I'm thinking of a way to use a <pre>map&lt;string, GLuint&gt;</pre> to map filenames to texture references which would make writing it pretty simple. In fact if you like, I could write it, since it really helps out the new GUI classes the most anyway...
Reply
12-01-2005, 11:10 PM,
#4
Texture manager class
okay, i'm pretty much done with this. i don't know what you meant by "texture drawing" in the list above, but everything else should be in SVN shortly
Reply
12-01-2005, 11:46 PM,
#5
Texture manager class
it's in the trunk now
Reply
12-02-2005, 05:44 PM,
#6
Texture manager class
This looks pretty good, I am using it in the Gui class now.I was thinking that it might make sense to move Draw2D from utility.cpp to the texture manager, but actually now that I think about it, that's not exactly necessary.Speaking of Draw2D, it would be nice to be able to draw textures at a certain opacity level, sort of like the font function can. I had to load extra graphics to make the "disabled arrows" on the wheel that I checked in today. The only difference is that it's only 40% opaque so this could be eliminated if there was an opacity parameter in Draw2D.
Reply
12-02-2005, 10:06 PM,
#7
Texture manager class
no problem, that's easy to do. it's in the trunk.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)