PDA

View Full Version : Drawing lines with changing width



esapir
04-20-2014, 02:50 AM
I am looking for a way to draw 3D lines with changing width. I know that i can create triangles, as in the following tutorial: http://www.merowing.info/2012/04/drawing-smooth-lines-with-cocos2d-ios-inspired-by-paper/#.U1K6-Oa28rf

However, it will not look good in 3D when camera is rotated. Is there a good way to draw 3D lines with changing width?

reto.koradi
04-20-2014, 10:48 AM
Depends on what OpenGL version you're using. There's a glLineWidth() call that you can use to set the line width. It's still supported in the core profile, but marked as deprecated. So you won't be able to set a line width larger than 1.0 in a forward-compatible core profile context.