Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


#ActualNeosettler

Posted 26 January 2013 - 04:35 PM

Greetings GL Masters,

I recently run my application with gDEBugger GL: http://www.gremedy.com/download.php

I was chock to my very core that all these years, I had video memory leaks. After endless efforts, I managed to find the source of the leaks. All I needed to do was to match every glGenBuffers with glDeleteBuffers and my life was peachy again.

 

each VBO looks somewhat like this:

glGenBuffers(1, &l_id1);
glBindBuffer(GL_ARRAY_BUFFER...
glBufferData(GL_ARRAY_BUFFER...
glBufferSubData(GL_ARRAY_BUFFER...

glGenBuffers(1, &l_id2);
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER...
glBufferData(GL_ELEMENT_ARRAY_BUFFER...

glDeleteBuffers(1, &l_id1)
glDeleteBuffers(1, &l_id2)
 
The problem is, all the while this is working fine when opening and closing the API. Deleting buffers at run time makes the next draw call ends with an access violation.
 
I cant find any relevant info on how to properly delete VBOs buffers at run time so far. Any wisdom of the ancestral would be very welcome.
 
Thx


#1Neosettler

Posted 26 January 2013 - 04:34 PM

Greetings GL Masters,

I recently run my application with gDEBugger GL:

http://www.gremedy.com/download.php

I was chock to my very core that all these years, I had video memory leaks. After endless efforts, I managed to find the source of the leaks. All I needed to do was to match every glGenBuffers with glDeleteBuffers and my life was peachy again.

 

each VBO looks somewhat like this:

glGenBuffers(1, &l_id1);
glBindBuffer(GL_ARRAY_BUFFER...
glBufferData(GL_ARRAY_BUFFER...
glBufferSubData(GL_ARRAY_BUFFER...

glGenBuffers(1, &l_id2);
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER...
glBufferData(GL_ELEMENT_ARRAY_BUFFER...

glDeleteBuffers(1, &l_id1)
glDeleteBuffers(1, &l_id2)
 
The problem is, all the while this is working fine when opening and closing the API. Deleting buffers at run time makes the next draw call ends with an access violation.
 
I cant find any relevant info on how to properly delete VBOs buffers at run time so far. Any wisdom of the ancestral would be very welcome.
 
Thx


PARTNERS