What's a display list?

Started by
0 comments, last by Utwo 21 years, 1 month ago
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?
---signature---" Actually, at the time, I didn't give a damn about the FoxNews issue... just that you would come swooping in with your Super Mith cape flapping behind you and debunk it just because it didn't happen in your living room." - InnocuousFox
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.
- Go not to the elves for counsel, for they will say both yes and no.

This topic is closed to new replies.

Advertisement