Ok, total newbie here (well, when it comes to openGL. But can code well in other languages.)
I’ve decided to expand my knowledge and want to simply draw a sphere and a cube.
As you can see with my code below, I have played around with the teapot
But, would like them to be speres.
void paint () {
glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glPushMatrix();
glTranslatef (0, 0, -5);
glRotatef (degree, 0, 1, 0);
brass(); //change color
glutSolidTeapot (1);
glPushMatrix();
glRotatef (degree, 0, 1, 0);
glTranslatef (0, 0, -5);
silver(); //change color
glutSolidTeapot (1);
glPushMatrix();
glRotatef (degree, 0, 1, 0);
glTranslatef (0, 0, -5);
glutSolidTeapot (1);
glPopMatrix();
glPopMatrix();
glPopMatrix();
glFlush();
glutSwapBuffers();
degree += 0.1f;
glutPostRedisplay();
}
For the sphere, I’m kinda stuck…
gluSphere(1,1,1,1);
// cannot convert parameter 1 from int to GLUquadric
Just want to change the teapots to spheres.
I have never come across the term GLUquadric and have tried to look it up.
Then maybe next change them to cubes?
Thanks all for your indulgence while I get going on this so cool technology.
Although it’s been about 4 years since I did any C++.
BTW, I’m using VS.Net 2003 if that makes a difference.
Zath