Free texture memory?

How can I query OpenGL for a free texture memory on a video-card (initial free memory and free memory after some textures are loaded)?

NO! Coding like that is bad also! Make it user definable texture detail!

(I think this is the 3rd of 4th time I’ve answered this question now! )


The only thing you can do is checking if the texture is still in video memory using glAreTexturesResident before you bind them.


hmm Nutty are you sure, I thought you answered it more often

[This message has been edited by DaViper (edited 05-03-2001).]

I still say that a feature to check memory would be nice, so that users that don’t know what they’re doing could be helped out (but still give control to those who know what they’re doing).

To base the amount of texture uploads you do on VRAM available, is assuming that graphics cards will use VRAM to store textures.

While this may be true for current gfx cards, who is to say within 6 months a radical breakthrough might occur, that uses some other form of memory for textures, and VRAM only for framebuffers. Then all programs that based their texture detail on VRAM availability would use the smallest setting, making everything look crap.

Even is this is far fetched, it should be the way you look at things.

If you want to get an idea for texture detail/speed, then test it on a gfx card. Basically at the moment, (talking games here) you probably want to slightly chug on a low end gf 2 with high texture details. This then allows for better performance when new gfx cards come out. Give the user the option to turn down detail to the point where even gf 1 owners get good frame rates.

my 2 cents worth anyway.


Thanks to all!
But how can I change (texture) details in a game?
Maybe this way: all my textures are 256x256 - that will be hi-detail setting. If user selects medium-detail I will load these textures in 128x128 matrix, after appling some filter. Lo-detail will be 64x64 for example. Is it a way for detail settings?

Yes thats the way to do it. Maybe use paletted textures if the hardware supports it… most of the time just reducing the size is okay.