On 8/12/2011 12:37 PM, Adam Toews wrote:
Hi,

I'm creating a HUD for an aircraft and am in the process of drawing the lines 
representing aircraft pitch.  The lines look find when the roll is 0 degrees 
but when roll is not 0 the pitch lines become quite jaggy looking.  Is there 
any way to draw lines so they look smoother when drawn at a diagonal??
There's nothing fancy here. Just the standard OpenGL techniques, either multisampling or GL_LINE_SMOOTH will work. If you grep the examples source for "multisample", you should be able to see how to set that up.

Surprisingly, there are no examples that enable GL_LINE_SMOOTH, but it's quite simple. Just enable it in your top-level StateSet as you would any other OpenGL variable:
  StateSet::setMode( GL_LINE_SMOOTH, osg::StateAttribute::ON );

   -Paul

_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to