Advertisement

Newbie question....Difference between "BuildLists" and a void function.

Started by March 26, 2001 12:14 AM
0 comments, last by ZiL 23 years, 7 months ago
After going through the "BuildLists" tutorial a question rised in my head. What''s the different between creating a "list" and writing a void function. The tutorial''s intro says that with "Lists" you can write the code to (in this case) draw a cube only once, and then in the "DrawGLScene" you can just call that list to draw the object as many times as you want, without having to write the code every time you want to draw that particular object. I don''t understand what is so special about "Lists". I''ve succeeded the same thing by just writing a void function with the object data and calling it as many times I wanted in the "DrawGLScene". Please help me clear this in my mind. I''m I missing something? Is there something else that makes "Lists" powerful? I''m new in OpenGL so I''d like to make things clear before I move on, to more advanced issues. thankx in advance guys I really appreciate it.
I think what you mean is display lists. If that''s the case then the difference is that the void function is called by your program and then passes all the object data (vertecies, normals, color, texture, etc...) every time is called. A display list stores a copy of the object data in the video card memory. then when you call the list the video card already has the object data and has already parsed the data into a form it can work with. This saves the cpu form haveing to send the data again and the video card from haveing to wait for all the data.
------------------------------Piggies, I need more piggies![pig][pig][pig][pig][pig][pig]------------------------------Do not invoke the wrath of the Irken elite. [flaming]

This topic is closed to new replies.

Advertisement