PDA

View Full Version : Video memory



Acheum
08-11-2003, 05:00 AM
Is there a way in OpenGL to see how much memory is available on the video card ?

PanzerSchreck
08-11-2003, 05:07 AM
No, OpenGL has no direct function to tell you the amount of video-memory.
But you could do the following to determine it roughly :
Calculate yourself how many memory are needed for all buffers you use (frame, stencil, depht, aux, etc.) and then start a loop in which you load the same texture with a given size (lower is better).And test within this loop if the texture is resident (in the video-memory).If it is, then increase your memorycounter, if not stop the loop.
So if you do this, you should roughly have the amount of available texturememory :
memorycount := memory for buffers+(size of my texture)*loopcounter

Nutty
08-11-2003, 05:09 AM
Do a search for this type of question, its been answered soo many times, with reasons why you dont need to know, and why you shouldn't use it to base things off.