PDA

View Full Version : Textures for dummies



shep
01-28-2001, 09:08 AM
Hi,

I am a dummy. I have been through the NeHe lesson on texture mapping and got it to work through sheer luck and sweat off my brow.

How do you manage multiple textures? I mean, I assume you just can't keep loading textures until you run out of memory on your card. Therefore I assume at some point you have to start unloading textures from GL memory. And keeping track of whats loaded, whats not, and what needs to be can be difficult.

Am I missing something that makes this easier?

If not, are there some common practices for managing textures?

Thanks for any help.

Regards,

Shep

Leyder Dylan
01-28-2001, 09:46 AM
Hi,

You make a loop to put the textures in memory.

I've done a loop and it works well !

shep
01-28-2001, 09:50 AM
Hi Leyder,

So your saying just loop through all the possible textures I will ever use and load them in to GL memory and GL knows how to deal with them all? I am talking thousands of textures and up here.

Thanks

Shep

G4Soon
01-28-2001, 10:29 AM
That's what I've always done - just loaded all the textures I've needed and let OpenGL handle it... but I don't think I've ever exceeded my card's 8mb limit.

Just curious, but what are you using thousands of textures for?

Leyder Dylan
01-28-2001, 11:01 AM
Hi,

I you want, I can post my source code for do this.

My code does :

Read in a file the path to load texture.
Loop to put in memory the textures.

Interested ? Send me a mail.

Michael Steinberg
01-28-2001, 11:15 AM
Okay modern cards have AGP. AGP is good for texture loading over the bus. Just put all your textures up as long as they don't take 128 megs and be happy. The driver will have all not-in-card-memory-fitting textures in your main memory and will reload them if you need it. That's another reason why sorting polys after texture is good.

shep
01-29-2001, 08:36 AM
I am planning to write an opengl ultima online client, actually I have already started. I am trying to write a texture cache object to handle loading textures into and dumping textures from GL/AGP Memory.

shep
01-29-2001, 08:39 AM
Leydar,

Yeah I would like that but the email button in the board doesn't work. http://www.opengl.org/discussion_boards/ubb/frown.gif

Shep


Originally posted by Leyder Dylan:
Hi,

I you want, I can post my source code for do this.

My code does :

Read in a file the path to load texture.
Loop to put in memory the textures.

Interested ? Send me a mail.