Sign in to follow this  
General_Lee

translate and rotate

Recommended Posts

void display()
{

glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);

glPushMatrix();

glRotatef(angle, 1.0, 0.0, 0.0);
glTranslatef(0.0f,0.0f,0.0f);
drawFirstTriangle();

glPopMatrix();


glPushMatrix();

drawSecondTriangle();

glPopMatrix();

glutSwapBuffers();

}


Hope this will help.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this