Drawing 2 or more Bezier surface

Drawing 2 or more Bezier surface

Post by Nicholas Yu » Mon, 21 Jan 2002 08:46:25



Hi,

    Having looked at the example in the Red Book, I coded up my Bezier
surface display application. As I have multiple Bezier surfaces to display
how do I go about doing that ?

    I can understand the need to call glEvalCoord2f for every call to
display() but how does one handle glMap2f and glMapGrid2f for multiple
Bezier surfaces ? Do we iterate through our list of Bezier surfaces and call
glMap* for every surface during every call to display() ? Is there a more
efficient approach ?

    Is there any example ?

Cheers
--
Nicholas Yue
http://www.geocities.com/nicholas_yue

 
 
 

Drawing 2 or more Bezier surface

Post by Andrew F. Vespe » Mon, 21 Jan 2002 12:04:11



>     Having looked at the example in the Red Book, I coded up my Bezier
> surface display application. As I have multiple Bezier surfaces to display
> how do I go about doing that ?

>     I can understand the need to call glEvalCoord2f for every call to
> display() but how does one handle glMap2f and glMapGrid2f for multiple
> Bezier surfaces ? Do we iterate through our list of Bezier surfaces and call
> glMap* for every surface during every call to display() ? Is there a more
> efficient approach ?

Yes, I expect you will want to call glMap* for every surface during each
call to display -- but why is this necessarily inefficient? Have you timed it?

First rule of optimization -- don't do it.

Second rule -- don't do it yet.

Third rule -- only optimize the pieces that are proven to be bottlenecks.

I don't expect the call to glMap* to be the bottleneck in your code.
--
Andy V (OpenGL Alpha Geek)
"In order to make progress, one must leave the door to the unknown ajar."
Richard P. Feynman, quoted by Jagdish Mehra in _The Beat of a Different Drum_.

Paul Martz's OpenGL FAQ: http://www.opengl.org/developers/faqs/technical.html