• C

Opengl drawing

Hi,

Does anyone know a trick to draw a bent cylinder (3D arc) in openGL?
Is it implemented in the glu library? it not, can you help me find the function online?

Thanks
LVL 1
gamesdevAsked:
Who is Participating?
 
sunnycoderConnect With a Mentor Commented:
If drawing and clipping does not appeal to you, then only option I can think of (I am no openGL expert) is to draw the points on the arc and connect them as triangles
0
 
sunnycoderCommented:
nehe.gamedev.net

Tutorial 18 will show you how to draw a whole sphere, tutorial 26 will show you how to clip out part of it ... End result, a 3D arc
0
 
gamesdevAuthor Commented:
Hi sunnycoder,
The stencil buffer clipping will not result in an arc, also it's not reliable when it comes to drawing tens of them.

Thanks.
0
 
timbauerConnect With a Mentor Commented:
I am really unfamiliar with opengl, but can you use splines in 3-dimensional meshes?
That is to say, any quadratic or cubic parametric equation to connect two points given
control points. I have seen in done in 2D, but was not sure if it is practical in 3D. Seems
like many many little triangles are what get used.

-T

0
 
gamesdevAuthor Commented:
Hi,
I was trying to avoid writing that function, guess I have no other choice now!
Thanks for your time, guys!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.