texture managment

Started by
5 comments, last by MarsuGL 22 years, 8 months ago
hello, 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. Cheers, Marsu
Advertisement
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.

------------------------------
Trent (ShiningKnight)
E-mail me
OpenGL Game Programming Tutorials
hello,
can you explain why do you think it''s not needed nowadays ?

in reality the problem that i have is :
must i load all the textures at startup or one by one during the level (it''s for a game) ?

many people have put me on the way of the texture manager

so ?
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.

Ignite Software Ltd.
I hope I''m not too late but there is a function in openGL to set up the priority of your textures...

I have never used it but I think you just have to enable it and set all your textures a proority number and openGL will do its best to load the good textures when needed...

Hmmm... I''m talking of stuff I don''t know and I hate that but I just wanted to help

Biere et punk
merci pour ton aide/tanks for helping

Marsu









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.


This topic is closed to new replies.

Advertisement