Results 1 to 3 of 3

Thread: QOpenGLTexture destructor

  1. #1
    Join Date
    Aug 2013
    Posts
    17
    Thanked 2 Times in 2 Posts
    Qt products
    Qt5
    Platforms
    Unix/X11

    Default QOpenGLTexture destructor

    Hi,
    Does the QOpenGLTexture destructor call glDeleteTextures() or do I have to do it manually?
    The docs don't mention this.


    Using Qt 5.2 daily build.

  2. #2
    Join Date
    Feb 2012
    Location
    Armenia/Yerevan
    Posts
    400
    Thanks
    15
    Thanked 16 Times in 15 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11

    Default Re: QOpenGLTexture destructor

    Quote Originally Posted by kangaba View Post
    Hi,
    Does the QOpenGLTexture destructor call glDeleteTextures() or do I have to do it manually?
    The docs don't mention this.


    Using Qt 5.2 daily build.
    I always delete the previously made texture and replace it with the construction of the new one. This way I am sure excessive texture descriptor generations would not occupy memory which may also lead to program termination.
    About QOpenGLTexture, it should normally call do clean-up operations before exiting.

  3. #3
    Join Date
    Aug 2013
    Posts
    17
    Thanked 2 Times in 2 Posts
    Qt products
    Qt5
    Platforms
    Unix/X11

    Default Re: QOpenGLTexture destructor

    Thanks,
    I looked at the source code, QOpenGLTexture is backed up by like 7 source code files in a labyrinth of interdependencies and private functionality and cache which would take hours to figure out, if at all, how it really works. Seems overengineered to me. I'll keep calling glDeleteTextures() by hand.

Similar Threads

  1. Destructor overriding
    By Daylight in forum Qt Programming
    Replies: 13
    Last Post: 1st March 2013, 12:05
  2. Destructor not being called
    By vieraci in forum Qt Programming
    Replies: 12
    Last Post: 25th January 2012, 16:06
  3. destructor dilemma
    By Petr_Kropotkin in forum General Programming
    Replies: 3
    Last Post: 17th March 2010, 16:58
  4. QTemporaryFile and his destructor
    By SABROG in forum Qt Programming
    Replies: 3
    Last Post: 19th May 2009, 20:55
  5. Destructor in QT
    By hgedek in forum Newbie
    Replies: 1
    Last Post: 18th September 2007, 11:54

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.