Advertisement
alexFilimon

Untitled

Mar 30th, 2020
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.99 KB | None | 0 0
  1. /*
  2. * AICI INCEPE TABLA DE SAH
  3. gl.glCullFace(GL.GL_FRONT);
  4.  
  5. gl.glPolygonMode(GL.GL_FRONT_AND_BACK, GL2.GL_FILL);
  6.  
  7. float rect_size_x = 0.125f;
  8. float rect_size_y = 0.125f;
  9. for (int line = 0; line < 8; ++line) {
  10. for (int col = 0; col < 8; ++col) {
  11.  
  12. int offs = 1;
  13. if (line % 2 == 0)
  14. offs = 0;
  15.  
  16. if (col % 2 == offs) {
  17. gl.glDisable(GL.GL_CULL_FACE);
  18. gl.glColor3f(1.0f, 1.0f, 1.0f);
  19. gl.glRectf(rect_size_x * col, rect_size_y * line, rect_size_x * (col + 1),
  20. rect_size_y * (line + 1));
  21. } else {
  22. gl.glEnable(GL.GL_CULL_FACE);
  23. gl.glRectf(rect_size_x * col, rect_size_y * line, rect_size_x * (col + 1),
  24. rect_size_y * (line + 1));
  25. }
  26. }
  27. }
  28. */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement