Results 1 to 5 of 5

Thread: Display list initialization

  1. #1
    Junior Member Newbie
    Join Date
    Aug 2001
    Posts
    3

    Display list initialization

    I have written a parser for ASCII files and
    the information is to be stored in a display
    list. However, when the time comes to
    define the display list's attributes glGenLists(1) returns 0. I have declared a variable of type GLint to accept the value returned by glGenLists. I can't figure out why it is always returning 0. I am coding in Visual C++ 6.0, and using glut routines. I don't think either has anything to do with this. Thoughts anyone? Thanks.

  2. #2
    Senior Member OpenGL Guru
    Join Date
    Mar 2001
    Posts
    3,574

    Re: Display list initialization

    Check your glError states. You can't call glGenLists between a glBegin and a glEnd.

  3. #3
    Junior Member Newbie
    Join Date
    Aug 2001
    Posts
    3

    Re: Display list initialization

    That isn't the problem. I don't have any declarations to glGenLists() between glBegin() and glEnd(). Thanks

  4. #4
    Member Newbie
    Join Date
    Jul 2001
    Location
    boston, ma, usa
    Posts
    30

    Re: Display list initialization

    I think it may be a problem of rendering context. When applying for a list index, you must make sure that the current openGL rendering context and the window device context be valid. Did you put your code before openGL being set up?


    Originally posted by yargerb:
    I have written a parser for ASCII files and
    the information is to be stored in a display
    list. However, when the time comes to
    define the display list's attributes glGenLists(1) returns 0. I have declared a variable of type GLint to accept the value returned by glGenLists. I can't figure out why it is always returning 0. I am coding in Visual C++ 6.0, and using glut routines. I don't think either has anything to do with this. Thoughts anyone? Thanks.

  5. #5
    Junior Member Newbie
    Join Date
    Aug 2001
    Posts
    3

    Re: Display list initialization

    Thank you! That was it. I appreciate the help!

Similar Threads

  1. Display list corruption when list created in shared library
    By Michael Wouters in forum OpenGL: Advanced Coding
    Replies: 2
    Last Post: 09-16-2005, 10:55 PM
  2. display list
    By Vlasko in forum OpenGL: Basic Coding
    Replies: 6
    Last Post: 05-13-2003, 07:33 AM
  3. Display List vs VAR, VAO, and VBO
    By azcoder in forum OpenGL: Advanced Coding
    Replies: 8
    Last Post: 03-23-2003, 05:27 AM
  4. Display List
    By guju in forum OpenGL: Basic Coding
    Replies: 5
    Last Post: 05-17-2002, 08:33 AM
  5. Display list to display models...Should I use them?
    By in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 11-27-2000, 12:49 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