🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Inlining functions and display lists

Started by
1 comment, last by Unknone 18 years, 2 months ago
Hi all. I'm still pretty new to OpenGL programming, and I was doing the tutorial on display lists. It came to me to make a little collection of these lists to use in my own programs. On a second thought, it would be simple to do for a cube, but if I wanted to make a rectangle, it wouldn't work if I wanted to change the sizes of a side. Is there a way to make a display list that can be used in such a manner? Would an inlined function do the same basic thing if without slowing the program down noticably? Thnx in advance for all your help!
Regardz,UnknoneCheck out my site! Click Here!
Advertisement
There's a little trick that enables you to use the same display list to draw different sized rectangles, cubes, and spheres. When creating the display list use the unit size of 1 for all sides/radius. Then, before calling the display list, use glScalef to adjust the dimensions.
baumep
OK Thnx.
Regardz,UnknoneCheck out my site! Click Here!

This topic is closed to new replies.

Advertisement