Advertisement
Guest User

Untitled

a guest
Dec 19th, 2013
760
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.56 KB | None | 0 0
  1. camera.applyTranslations();
  2. if (flatten) {
  3. glScalef(1, 0, 1);
  4. }
  5.  
  6. // glEnable(GL_TEXTURE_2D);
  7. //glActive?exture(GL_TEXTURE0);
  8. // tex.bind();
  9.  
  10. glCallList(heightmapDisplayList);
  11. glDisable(GL_CULL_FACE);
  12. Date d = new Date();
  13. long this_framerate_timestamp = d.getTime();
  14. // perform rotation transformations
  15.  
  16.  
  17.  
  18. //double rotate_x = ((double)this_framerate_timestamp / 300.0) % 360.0;
  19. //double rotate_y = ((double)this_framerate_timestamp / 200.0) % 360.0;
  20. //double rotate_z = ((double)this_framerate_timestamp / 100.0) % 360.0;
  21.  
  22. /* GL11.glRotated(
  23. 0,
  24. 1.0,
  25. 0.0,
  26. 0.0
  27. );*/
  28.  
  29. //glPushMatrix();
  30. if (Keyboard.isKeyDown(Keyboard.KEY_LEFT))
  31. rotate++;
  32. // Matrix4f mat = new Matrix4f();
  33.  
  34.  
  35.  
  36.  
  37. //GL11.glTranslatef(0f, 0f, plus);
  38. //glTranslatef(0, 0, plus);
  39.  
  40. glTranslatef(0, 0, plus);
  41. glRotatef(rotate, 0.f, 1.f, 0.f);
  42. glTranslatef(0, -0, -plus);
  43. //glRotatef(rotate, 0, 1, 0);
  44. //glTranslatef(0, 0, plus);
  45. // glRotatef(rotate, 0, 1, 0);
  46. //GL11.glTranslatef(0f, 0f, -plus);
  47. if (Keyboard.isKeyDown(Keyboard.KEY_UP)){
  48. plus++;
  49. }
  50.  
  51.  
  52.  
  53. //mat.translate(new Vector3f(0, 0, 1));
  54. glColor3f(0.4f, 0.27f, 0.17f);
  55. glDrawArrays(GL_TRIANGLES, 0, model.getFaces().size() * 3);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement