How can I know in real time the current texture memory available? I need this information because I have several textures to load in my project.
I know how much large is the memory of my video card but I must
render my program an independent program from PC.I tried to use "
GL_OUT_OF_MEMORY " but it seems that it never does not go in overflow,
but I have noticed that when it loads the y image the frequency of
rendering lowers much. As soon as it loaded the (y+1) image the
frequency returns the normal frequency.This last thing me is not clear, in
fact I thought that once filled up the memory video the images went
loaded on a memory host; but evidently is not therefore, otherwise (y+1)
image and the successive ones would have also they one low frequency.
Thank you, best regards
How can I know in real time the current texture memory available?
Short answer: You cant. For a multitude of reasons, that I really can’t be bothered to start going on about. (it’s late here)
Do a search on this kind of thing in the forums, it’s been covered many times.
Just get the memory amount at the start and keep track of it. It’d probably be faster that way anyway. Be sure to take out the memory amount needed to operate the framebuffers and such…
That method isn’t entirely accurate either.
There are other things in VRAM appart from frame/Z/stencil buffers and textures.
Sometimes when you think a texture would fit, it wont due to the banking (memory configurations) used on the graphics card.
Also, alot of systems dont have the distinction of VRAM = texture memory. Intels I740 cards store textures in AGP memory. Some SGI machines have unified system/video memory, and what if the user is using super sampled AA.
The best solution is let the user specify the amount of texture detail used, so they can customize the looks/performance tradeoff to their own tastes.