Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Utwo

What's a display list?

This topic is 5543 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

I''m currently trying to mash together some sort of system for managing sprites. Right now I''m just programming a Tetris clone, but I''m hoping to use it in later 2D games that contain laser beams, enemies, you name it. So I really want a class that can do it all but I have no idea where to start. I figure that first things first, I should create a class with a singly-linked list that contains all of the sprites that need to be displayed on the screen at that moment. Is this what a display list is? While I want to learn how to solve these types of problems myself, I''m really not interested in reinventing the wheel with this, so is this so-called "display list" a better way to go? If so, where can I learn about them?

Share this post


Link to post
Share on other sites
Advertisement
NeHe has a good tutorial about display lists. It is number 12 on his site nehe.gamedev.net. They are for some 3d cubes though.

Display lists are for grouping drawing instructions so that you can write the commands that you need for drawing a certain shape and then use only a single coammand to run them all. You could make a display list that could draw a tetris shape. Then whenever you wanted to draw that shape somewhere on the screen, you just call your display list.

Display lists are also faster than calling all of the commands each time you want to draw the shape

- Go not to the elves for counsel, for they will say both yes and no.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

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

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!