i''m trying to make a texture manager using opengl,
any advices about technical features or advices are welcomed,
i need your experience in this field to know more before to think at coding.
I was talking about this to someone about 3 days ago. Texture managers (sometimes called "Texture Caches") aren''t really needed now a days. Of course, what you may want is a well designed TEXTURE class to hold information for a single texture, and has functions to load BMPs, TGAs, and the like. Also has functions to bind itself, and delete itself.
I created a 2D tiled map editor some tim ago, and ran into this problem. Here''s my solution: Create a text file with all the names of your textures in it, i.e.
data/grass_001.bmp data/land_001.bmp ...etc, etc
Then write a function that will look at each line of the file and load the corresponding texture file. This saved *hours* of tedious code writing. All you need to do is have an array (or linked list) of textures and load the all into that data structure. Hope that helps.
Texture Managers arent needed? Um, i think I have to disagree here buddy. First of all, not everyone in the world has a Gig of ram laying around to shove all that data into if you have tons of textures like most games today have. What if you were like me, and had 96 megs of ram, and a games textures were roughly 200 megs, wich is tame by todays standards. Where are you going to put all those textures, virtual mem? ack!!! You need to manage them, and a texture manager is a good idea.