Mirror the content of a display list

Mirror the content of a display list

Post by Wolfgang Trautenber » Wed, 06 May 1998 04:00:00



I have a piece of code that properly reads triangular strips
from a file into a display list.

I need to mirror the resulting geometry on a plane lying in
the xz of the reference coordinate system for the vertices
of that geometry.

How do I properly mirror the content of the display list
without having to go over each single vertex and having to deal with
the orientation (CCW, CW) of the strips? By matrix operations? Which?

I have tried one that mirrors the geom, but the normals are all wrong!

Any insight?

Thanks

      Wolfgang
--
  Wolfgang Trautenberg

+-----------------------------------------------------------------+
|      Deutsches Zentrum fuer Luft- und Raumfahrt (DLR)           |
|                 German Aerospace Center                         |
|        Institut for Robotics und Systemdynamics                 |
|        Postfach  1116           82230 Wessling                  |
|                                                                 |
|   Tel: +49/8153/28 - 2432          Fax: +49/8153/28 - 1850      |
|-----------------------------------------------------------------|

|  http://www.op.dlr.de/~trautbrg                                 |
+-----------------------------------------------------------------+

 
 
 

Mirror the content of a display list

Post by Andy Vespe » Thu, 07 May 1998 04:00:00



> I have a piece of code that properly reads triangular strips
> from a file into a display list.
> I need to mirror the resulting geometry on a plane lying in
> the xz of the reference coordinate system for the vertices
> of that geometry.
> How do I properly mirror the content of the display list
> without having to go over each single vertex and having to deal with
> the orientation (CCW, CW) of the strips? By matrix operations? Which?

When you mirror, call glFrontFace(GL_CW). This will flip
the orientation from 'right hand' to 'left hand' rule.
--
Andy V, OpenGL Alpha Geek  (never a Digital spokesperson)

(To send mail to me, change "NoSpamPlease" to "com".)

 
 
 

Mirror the content of a display list

Post by Steve Bake » Thu, 07 May 1998 04:00:00




> > I have a piece of code that properly reads triangular strips
> > from a file into a display list.

> > I need to mirror the resulting geometry on a plane lying in
> > the xz of the reference coordinate system for the vertices
> > of that geometry.

> > How do I properly mirror the content of the display list
> > without having to go over each single vertex and having to deal with
> > the orientation (CCW, CW) of the strips? By matrix operations? Which?

> When you mirror, call glFrontFace(GL_CW). This will flip
> the orientation from 'right hand' to 'left hand' rule.

More or less...

If you use a -1 scale factor in the matrix and change the glFrontFace,
you will indeed get all the geometry turned upside-down. However,
if you want literally an object as viewed in a mirror, you must
also move all the light sources over to their mirrored positions.

If you aren't representing a literal mirror - but just two objects
that happen to be in a mirrored relationship - then don't move
the light sources.

Check out Mark Kilgards mirrored dinosaur demo here:

  http://reality.sgi.com/opengl/tips/Reflect.html

It's clearest in the first of the images - notice how the top of
the dinosaurs' head is dark - but the bottoms of it's feet are lit
up in the reflected image. This wouldn't happen unless you remembered
to also place the light sources in their mirrored positions.

--

Steve Baker                (817)619-8776 (Vox/Vox-Mail)
Raytheon Systems Inc.      (817)619-4028 (Fax)


 
 
 

1. display list /vertex list performance on SolidImpact?

Hi folks.  

some background:

I've recently converted over some OpenGL code I'm using (but didn't write,
although I have the source and access to the author) to take advantage of
OpenGL display lists, and I got a nice performance boost.  

Much of what ends up in the display lists are reasonably complex NURBS
surfaces, which are being trimmed and tesselated using the GLU Nurbs
routines, but I also have uniform patch meshes that end up getting drawn as a
series of quads using your basic:
          glBegin (GL_POLYGON);
                // four pairs of calls to glNormal3fv() and glVertex3fv()
          glEnd ();

I run this code on a variety of R4.4K, R10K, and Octane, all with SolidImpact
graphics, with either IRIX 6.2 and 6.4.  

What I'm wondering is if it's worth my while to change the code to use the
vertex list extension (does SGI actually ship OpenGL 1.1 now, so it would be
a standard feature?  I'm not sure how to check, other than to see that the
extension is defined in the header file, and I know how to programmatically
check that the extension is there...).

Anyway, I realize it's probably not a big deal to do this but, my todo list
is several arms long, and I'd really like some reality check from people who
know better than I if this might give me a performance boost before I spend
any time working on this.  I'm a little leery of spending a day or two
constructing some contrived performance benchmarks and extrapolating from
that - I've been burned by that before.  Specifically I'm wondering:

**
On Solid Impact graphics systems, does it make any appreciable performance
difference if you are drawing using display lists and you use vertex lists to
draw quadrilaterals instead of the more traditional glBegin/End with 4 pairs
of calls to glNormal3fv/Vertex3fv.  I'd also be interested in the case where
you're drawing without display lists.
**

Finally, I'm wondering if people have any hints/war stories about speeding up
NURBs surfaces, specifically on SolidImpact.  I have the latest OpenGL 1.1
Programming Guide (great book!), but given my particular hardware
configuration, I'd love to any heuristics people have found with respect to
quality/speed tradeoffs.

Thanks in advance!

--

-->  Media Arts Technologist, Pixar Animation Studios (Eastern Office)
-->  alumnus, MIT Media Lab, Computer Graphics & Animation Group
-->  http://wave.www.media.mit.edu/people/wave/

2. How do I make MGEP's from povray output, in linux??

3. display lists/vertex list performance, specifically on SolidImpact

4. A newbie question...Help!

5. creating a display list/loading a texture after 1st display in gl4java

6. MacPaint Question

7. display the content of .tri files

8. Realistic sky with POVray

9. How to display variable contents

10. Printing the contents of a large form (not all displayed on screen)

11. Displaying folder content

12. how to display a GIF image in CB4?(no content)

13. Displaying activeX control contents on Direct Draw surface