Advertisement
Guest User

Untitled

a guest
Jun 23rd, 2017
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1.  
  2. //flag using curtin.bmp (name of the image)
  3. texture = LoadTexture("curtin.bmp",2017,662);
  4. glPushMatrix();
  5. glTranslatef(-1.5, -1.7, 3.5); // the position of the plane
  6. glBindTexture(GL_TEXTURE_2D, texture);
  7. glRotatef (angle*1.0f, 0.0f, 3.0f, 0.0f);
  8. glBegin(GL_QUADS);
  9. glColor3f(1,1,1);
  10. glTexCoord2f(1.0,1.0);
  11. glVertex3f( 9.0f, -1.0f, -5.0f); // Top Right
  12. glTexCoord2f(0.0,1.0);
  13. glVertex3f(7.0f, -1.0f, -4.0f); // Top Left
  14. glTexCoord2f(0,0);
  15. glVertex3f(7.0f,-3.0f, -4.0f); // Bottom Left
  16. glTexCoord2f(1,0);
  17. glVertex3f( 9.0f,-3.0f, -5.0f); // Bottom Right
  18. glEnd();
  19. glPopMatrix();
  20.  
  21. //pole of the flag
  22. glPushMatrix();
  23. glRotatef(270,1,0,0);
  24. glColor3f(0.4, 0.4, 0.5);
  25. glTranslatef(5.0, 2.0, -8.0); // (x, y, z)
  26. gluCylinder(cyl, 0.2, 0.2, 5.5, 50, 50);
  27. glPopMatrix();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement