glutSolidSphere

Hi friends,

I’m attempting to draw a ground with a light source in openGl.
I did draw the ground (a cube face on x-z plan).
I draw a solid sphere (glutSolidSphere) to represent the light source, and it is displayed at the center of the window screen, by default.
Now, I want to transform the sphere upwared so I can see the light reflection on the ground. How can I do that?

glMatrixMode(GL_MODELVIEW);
glPushMatrix();
glTranslatef(0,y_translate,0);
glutSolidSphere();
glPopMatrix();

Note: This isn’t really modern OpenGL. All these calls are deprecated from recent versions of OpenGL.

Thanks for your helpful reply…:slight_smile:

so how I can draw sphere with color on it on openGL 3.1 in easy way
or i had construct it by myself