Advertisement

Inlining functions and display lists

Started by April 14, 2006 05:41 AM
1 comment, last by Unknone 18 years, 7 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!
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
Advertisement
OK Thnx.
Regardz,UnknoneCheck out my site! Click Here!

This topic is closed to new replies.

Advertisement