gluCylinder in OpenGL-0.54
skchan_at_cs.usask.ca
Date: 01/30/04
- Previous message: Mike Vanecek: "Re: mod_perl won't compile"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 30 Jan 2004 14:51:37 -0800
Greetings All,
I hope someone out there is using or has used the OpenGL-0.54 module.
I've installed it and I'm trying to use the gluCylinder function to
draw a cylinder. The perl code below yields an empty window (no
cylinder).
Here's a snippet of what I have:
glpOpenWindow;
glClearColor(0,1,0,1);
glClear(GL_COLOR_BUFFER_BIT);
glOrtho(-1,1,-1,1,-1,1);
glColor4f(1,0,0,1);
my $quad = OpenGL::gluNewQuadric();
print "quad: $quad\n";
my $cylinder = glGenLists(100);
print "cylinder: $cylinder\n";
glNewList($cylinder, GL_COMPILE);
OpenGL::gluQuadricDrawStyle($quad, GLU_FILL);
glRotatef(45.0,0.0,1.0,0.0);
OpenGL::gluCylinder($quad, 1,0.75,1,15,15);
************
The corresponding C code draws out the cylinder for me:
void init_scene()
{
GLUquadricObj *quadric;
cylinder = glGenLists(10);
glNewList(cylinder, GL_COMPILE);
quadric = gluNewQuadric();
gluQuadricDrawStyle(quadric, GLU_FILL);
glColor3f(1, 0, 0);
glRotatef(45.0,1.0,0.0,0.0);
gluCylinder(quadric, 1.0, 1.0,1.0,32,32);
gluDeleteQuadric(quadric);
glEndList();
}
*****
Hopefully, someone can give me a few pointers. Many thanks for your
time.
- Previous message: Mike Vanecek: "Re: mod_perl won't compile"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|