Results 1 to 3 of 3

Thread: Vexing display list problem

  1. #1
    Member Contributor
    Join Date
    Jan 2003
    Location
    Wisconsin
    Posts
    56

    Vexing display list problem

    I'm working on an application in which I need to, on occasion, create a new display list with vertices that are determined at run-time from GLU's tesselation library. Every time such a list needs to be created, my program does this:
    Code :
    dispList = glGenLists(1);
     
    glNewList(dispList, GL_COMPILE);
    gluTessBeginPolygon(tess, NULL);
    	gluTessBeginContour(tess);
    	// ... multiple calls to gluTessVertex() ...
    	gluTessEndContour(tess);
    gluTessEndPolygon(tess);
    glEndList();
    And it works exactly once. The first time this function is called, everything happens beautifully, but every time after that, it fails. The commands in the display list simply are not executed. I tried replacing the tesselator code with just code to just draw one triangle, and the same thing happens: it works, but only once. I discovered in the debugging process that the first time, glGenLists() returns 769, but every time after that it returns 3. I don't know if this is significant, but I thought I should mention it.

    Anyway, does anyone have any idea what's going on here? Any help at all would be appreciated. Thanks.

  2. #2
    Guest

    Re: Vexing display list problem

    Are you sure you're doing glCallList() on the right list each time, and not just repeating the first one?

  3. #3
    Member Contributor
    Join Date
    Jan 2003
    Location
    Wisconsin
    Posts
    56

    Re: Vexing display list problem

    Yes, I'm sure. dispList is a private data member of a class, and the function containing the code I posted is called only once for each instance of the class. glCallList(dispList) is also called in a member function, so there's no way it could be getting the wrong list.

Similar Threads

  1. Display list problem
    By alex_2007 in forum OpenGL: Basic Coding
    Replies: 18
    Last Post: 04-21-2007, 10:18 PM
  2. Display list problem
    By des in forum OpenGL: Advanced Coding
    Replies: 6
    Last Post: 07-23-2006, 01:58 PM
  3. Display List problem
    By mccloed3 in forum OpenGL: Advanced Coding
    Replies: 1
    Last Post: 09-07-2004, 03:58 PM
  4. Display list problem
    By HamsterofDeath in forum OpenGL: Basic Coding
    Replies: 0
    Last Post: 02-01-2003, 09:51 AM
  5. Display list problem...
    By Xiaofeng in forum OpenGL: Advanced Coding
    Replies: 2
    Last Post: 07-28-2002, 02:58 AM

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