Jump to content
  • Advertisement
Sign in to follow this  
Botar

Problem with Display Lists

This topic is 4633 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, In my program, I am building a maze a putting it in a display list. There are paintings on the wall, and whenever I collect one, I remove it from the maze and rebuild the display list. That has been working fine, but now I need to add paintings to the maze during gameplay. When the painting gets added, it rebuilds the display list, only most of the time, the entire maze does not get displayed anymore. One thing that I have noticed is that glIsList does not return as true when I rebuild it. It should and it does when I am removing paintings, but not when adding. Any ideas? Here is the beginning of my function that builds a display list:
void MazeGen::BuildMainDisplayList()
{
	int numWalls;
	double extend;
	bool isOuterWall;

	if(glIsList(mainID) == GL_TRUE)
	{
		glDeleteLists(mainID, 1);
	}
	mainID = glGenLists(1);
	glNewList(mainID, GL_COMPILE);

And then I go on to draw all of the walls for the maze.

Share this post


Link to post
Share on other sites
Advertisement
what you posted looks fine. you may want to try using more than one display list. one for the maze and one for each item that can be removed. keep em in an vector or something.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!