Graphics memory use and availability

Does anyone know of a way to retrieve the amount of Video card memory available and how much is used post VBO operations?

I’m having a little trouble with some VBO bindings that produce an “Invalid Memory access of location” error and freezes. I think this is due to the amount of data I’m binding to video memory, although I’m reasonably confident I’m not exceeding the capacity, and am freeing up as much of the non video memory I can. Is this error, which is obviously an OpenGL error, related to my Graphics Memory? Has anyone else had same errors, and if so what did you do and what caused it?

Martin.

When you say “Invalid Memory access of location”, is that causing the jvm to crash/segfault? or is it a java exception being thrown? or is that the text description of an opengl error returned by glGetError().

If it’s either of the first two and you think it’s because there isn’t enough memory for vbo’s, then you can check glGetError() after the creation of each vbo. If vbo allocation fails it should return GL.GL_OUT_OF_MEMORY, which will let you actually test your theory.

Also, make sure that when you create your vbos, you rewind the nio buffers.

Cheers for your reply.

I should have also said this was produced on a Mac. No exception was being raised and nothing returned by glGetError() it was just returning Invalid Memory access of location memAdress memAddress and freezes. I think in fact it may have been beacuse of the mem available to JVM as boosting this seems to have solved the issue… although I wasn’t getting an OutOfMemoryException. Does jogl duplicate the data during the glBufferData function, as it seemed to here it was freezing? At least I think this was the problem as Im also having some trouble with an additional non-transformed vertex data being drawn! Which I think may be related to how I am producing my FloatBuffer or drawing the VBO.

Mart.