Skip to content

Instantly share code, notes, and snippets.

@MosheBerman
Created March 28, 2013 01:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MosheBerman/5259848 to your computer and use it in GitHub Desktop.
Save MosheBerman/5259848 to your computer and use it in GitHub Desktop.
display two spheres?
void display()
{
// Clear the previous frame
glClear(GL_COLOR_BUFFER_BIT);
{
glPushMatrix();
glTranslatef(0.5, 0.5, 0);
glutWireSphere(0.2, 0.2, 10);
glPopMatrix();
glPushMatrix();
glTranslatef(0.5, 0.6, 0);
glutSolidSphere(0.1, 0.1, 10);
glPopMatrix();
}
glEnd(); // Finish adding vertices
// Flush the buffers to the screen
glFlush();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment