OpenGl Destructor

problem with destructors in OpenGl

Page 1 of 1

1 Replies - 1798 Views - Last Post: 22 April 2010 - 01:50 PM Rate Topic: -----

#1 Guest__patrice_*


OpenGl Destructor

Posted 22 April 2010 - 12:57 AM


I have a problem when finising my program. I have a class "glutwindow" where all my OpenGl/Glut stuff lives and I have another class "another" wich is derivative from glutwindow.
The class "another" is doing all my render stuff and of course have an destructor. In this destructor I wanna do some things before finishing the programm, but the code in "~another()" is ignored when closing the programm. Can someone give me a hint why or how to force the execution of the destructor from "another" when leaving the glutMainLoop?

Many thanks for every help

Is This A Good Question/Topic? 0

Replies To: OpenGl Destructor

#2 SixOfEleven  Icon User is offline

  • Planeswalker
  • member icon

Reputation: 1055
  • View blog
  • Posts: 6,643
  • Joined: 18-October 08

Re: OpenGl Destructor

Posted 22 April 2010 - 01:50 PM

This is a bit of a newbie question, but are you deleting the instance of another? That should call the code for the destructor. Would be helpful if you showed the problem code.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1