View Full Version : Violation in glDrawElements after reuse of vboname

Marcus H.
04-07-2011, 12:05 PM
Hi, I have a very strange access violation in glDrawElements the first time when I reuse a previously deleted buffer name again.
I have an application the uses only core profile VBO's with shaders. I have hundreds to thousands of VBO's in a scene. Everything is fine. As soon as I delete everything (all buffers are deleted with glDeleteBuffers) and then recreate a new scene with new vbo's I get an access violation in the first glDrawElements (in nvoglv32.dll). My buffer names are reused of course. I also do a glFlush after all buffer deletes. If I do not the delete the vbo's and just create new one's everything is fine (only my GPU memory gets lower). All buffer names are generated by glGenBuffers.
Thanks for any ideas.

04-07-2011, 12:59 PM
Access violations in glDraw(Range)Elements/glDrawArrays normally mean that there's a gl*Pointer still enabled but that is pointing to memory that is no longer valid.