VBOs and memory usage

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.

  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.

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 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.