PDA

View Full Version : VBOs and memory usage



g0l3m
01-02-2007, 07:48 AM
Hello there,

Am new to VBOs and I was wondering if:

1) there is a way to tell BEFORE a glBufferData if you have the required memory or not. I.e. not wait to receive a GL_OUT_OF_MEMORY AFTER you've called glBufferData

2) there is a way to tell where that buffer lives (i.e. system mem, video mem, AGP, etc.)

cheers,
g.

zeoverlord
01-02-2007, 09:16 AM
1) no.
2) Not directly, but one can guess where it is based on performance, it should be vid mem unless something is wrong or your out of memory.

Komat
01-02-2007, 11:25 AM
Originally posted by g0l3m:

2) there is a way to tell where that buffer lives (i.e. system mem, video mem, AGP, etc.)
For debugging purposes it is possible to use NVPerfKit (http://developer.nvidia.com/object/nvperfkit_home.html) to get information about memory used by individual buffers.

The location also depends on usage parameter used when the buffer data were specified. The driver might use the usage to determine the most appropriate location. If you specify STATIC_DRAW usage, the buffer will likely end in video memory if possible. For the STREAM_DRAW usage it will likely end in AGP memory.