Hi John -- I think normals with BIND_PER_PRIMITIVE on a N-triangle strip
would mean you have N-2 normals. As we discussed previously, you'll use the
OpenGL slow path (albeit stored in a display list) so the effective OpenGL
calls would be:
  glVertex3f
  glVertex3f
  glNormal3f // normal for first triangle
  glVertex3f
  glNormal3f // normal for second triangle
  glVertex3f
  glNormal3f // normal for third triangle
  glVertex3f
  ...etc...
 
This should result in a typical faceted appearance (with glShadeModel set to
GL_FLAT). However, if you want smooth shading, you'll want to use
BIND_PER_VERTEX of course. Which brings us to the next topic...
 
I'm not sure why you are having problems with BIND_PER_VERTEX in a tri
strip. It works just like BIND_PER_VERTEX with any other primitive type.
Perhaps you could provide more information about the problem you're
encountering. You say it "works OK if the faces aren't radically different"
but I'm not sure why you'd use BIND_PER_VERTEX if you were not trying to get
a smooth-shaded result. What type of surface are you trying to render,
anyway? Do you encounter the same issue in a vanilla OpenGL app? 
 
Paul Martz
Skew Matrix Software LLC
http://www.skew-matrix.com <http://www.skew-matrix.com/> 
+1 303 859 9466
 


  _____  

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Argentieri,
John-P63223
Sent: Wednesday, October 08, 2008 12:34 PM
To: [EMAIL PROTECTED]
Subject: [osg-users] Normal bindings and triangle strips



Greetings All, 

Is it possible to define a normal for every triangle without using primitive
type TRIANGLES? For instance, if I am using TRIANGLE_STRIP, what is the
effect of setting normals with BIND_PER_PRIMITIVE? And why does
BIND_PER_VERTEX seem so wrong on a triangle strip? If the triangle strip
faces are not radically different I guess it works ok. But it seems
impossible to declare normal vectors precisely when using triangle strips.
Am I missing something obvious?

Thanks, 

John Argentieri 
Software Engineer 
GENERAL DYNAMICS 
C4 Systems 
[EMAIL PROTECTED] 


_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to