Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //flag using curtin.bmp (name of the image)
- texture = LoadTexture("curtin.bmp",2017,662);
- glPushMatrix();
- glTranslatef(-1.5, -1.7, 3.5); // the position of the plane
- glBindTexture(GL_TEXTURE_2D, texture);
- glRotatef (angle*1.0f, 0.0f, 3.0f, 0.0f);
- glBegin(GL_QUADS);
- glColor3f(1,1,1);
- glTexCoord2f(1.0,1.0);
- glVertex3f( 9.0f, -1.0f, -5.0f); // Top Right
- glTexCoord2f(0.0,1.0);
- glVertex3f(7.0f, -1.0f, -4.0f); // Top Left
- glTexCoord2f(0,0);
- glVertex3f(7.0f,-3.0f, -4.0f); // Bottom Left
- glTexCoord2f(1,0);
- glVertex3f( 9.0f,-3.0f, -5.0f); // Bottom Right
- glEnd();
- glPopMatrix();
- //pole of the flag
- glPushMatrix();
- glRotatef(270,1,0,0);
- glColor3f(0.4, 0.4, 0.5);
- glTranslatef(5.0, 2.0, -8.0); // (x, y, z)
- gluCylinder(cyl, 0.2, 0.2, 5.5, 50, 50);
- glPopMatrix();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement