Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

OpenGL Quadrics

showman
Beginner
1,322 Views
Hi,

I've successfully started using OpenGL with CVF by including a "use dfopngl" statement. However, I can't use quadrics (cylinders, disks, etc.). I get no errors, I just don't see the picture I'm after. The functions I'm using are fgluNewQuadric and fgluCylinder etc.

Cheers,

Sam Howman
0 Kudos
1 Reply
sumitm
Beginner
1,322 Views
I havent used quadrics but if your intention is to draw cyliders, cubes and cones etc you can use

call fauxWireCylinder(radius,height)
or call fauxSolidCylinder(radius,height)


or some of the built in primitves in the library (you can print out the dfopngl.f90 file and go through all the built in libraries).
However, what I typically do for complex shapes like is call Vertex3f(x,y,z) and draw lines with a glBegin(GL_LINE_STRIP) (for wireframes) and or glBegin(GL_QUAD_STRIP) (for solids). This way you can draw cubes, cones whatever.
Norman Lawrence's book has a number of these examples and it might be helpful for you to look into that.
Hope this helps.

Sumit
0 Kudos
Reply