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,502

    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.

Similar Threads

  1. Reusing lists? (glNewList more than once)
    By jameswh in forum OpenGL: Advanced Coding
    Replies: 1
    Last Post: 06-17-2010, 02:19 PM
  2. Can I delete the shader objects after linking
    By Mars_999 in forum OpenGL: GLSL
    Replies: 2
    Last Post: 01-21-2008, 06:08 PM
  3. Bad interaction with glNewList and gluNewTess
    By Todd Kueny in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 06-08-2005, 10:53 AM
  4. glCallList() and glNewList()
    By in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 02-01-2005, 05:59 PM
  5. glNewList
    By kosta_m in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 11-22-2002, 03:16 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
  •  
Proudly hosted by Digital Ocean