Part of the Khronos Group

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 10 of 13

Thread: OpenGL 3.1 stack overflow

Threaded View

  1. #11
    Intern Contributor
    Join Date
    Jun 2012
    Quote Originally Posted by Dan Bartlett View Post
    Having OpenGL calls in a destructor:
    Code :
    	glDeleteBuffers(1, &(this->vboId));
    	glDeleteBuffers(1, &(this->iboId));
    can sometimes cause problems depending on when the object is destroyed. The context could potentially have been destroyed already, there could be no context current, or a different context could be current to the one you expected. It may be better to have a brush::deleteBuffers() instead.
    It didn't seem to cause problems when I was only passing vertex position data, though. As soon as I pass vertex color data, either in the same VBO or in a seperate one, I get issues.
    Last edited by fiodis; 12-05-2012 at 01:20 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts