View Full Version : Video memory

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

08-11-2003, 04: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

08-11-2003, 04: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.