Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 2 of 2

Thread: Do i need to delete those objects after using glNewList() ?

  1. #1
    Guest

    Do i need to delete those objects after using glNewList() ?

    Hi, i'm new to OpenGL (and new to windows programming stuff... But trying to write a game in this summer holiday. So i don't have to get out and work under the sun... As a beginner, i know is likely nothing much will happen, but atleast it gives me hope)

    Anyway, the question that i wanted to ask is...
    After i created a object (say, a cube) with glNewList() function. Do i need to delete it somewhere afterwork/each call? or it will go away after the function has been called?

    I'm scare of running out of memory when these WM_ONPAINT() messages floating around, calling these function to create and re-paint objects... >_<


    Thanks for helping~~~ ^_^

  2. #2
    Senior Member OpenGL Pro
    Join Date
    Jun 2000
    Location
    Shreveport, LA, USA
    Posts
    1,757

    Re: Do i need to delete those objects after using glNewList() ?

    You delete the list when you no longer need to draw it. No reason to recreate it for successive frames. Just reuse it. When your program is finished with the list, then delete it.

Posting Permissions

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