We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
Page Index Toggle Pages: 1
OpenGL Linewidth? (Read 579 times)
OpenGL Linewidth?
Jan 21st, 2008, 6:45pm
 
Hi,

a have a quick question:

How does the glLineWidth command work in Processing with OpenGL?

Quote:

 javax.media.opengl.GL gl = ((PGraphicsOpenGL)g).beginGL();

 gl.glLineWidth(4.0f);

 ((PGraphicsOpenGL)g).endGL();



Compiles fine but still draws lines at one pixel.

Any Ideas?
Thanks a lot!
b
Re: OpenGL Linewidth?
Reply #1 - Jan 21st, 2008, 10:30pm
 
why not just use the strokeWidth() command? it works just fine in OpenGL.
Re: OpenGL Linewidth?
Reply #2 - Jan 21st, 2008, 11:08pm
 
If that's all you're doing with native opengl mode, then it won't work -- if processing is still doing the drawing then it'll reset the linewidth based on the strokeWidth active when each line was generated.  (you'd have to do your own native opengl drawing to get around that)  So easiest fix is (per Manic) use strokeWidth().  Another possible issue is if your card supports linewidths other than 1 (since not required by opengl)
Page Index Toggle Pages: 1