Title / Description
Code public class SomeClass { public void render() { float x, y, z; GL11.glBegin(GL11.GL_QUADS); for (int i = 0; i < height; i++) { for (int j = 0; j < width; j++) { x = j * tilew; y = getHeight(j, i); z = i * tileh; setColor(y); GL11.glVertex3f(x, y, z); x += tilew; y = getHeight(j + 1, i); setColor(y); GL11.glVertex3f(x, y, z); y = getHeight(j + 1, i + 1); z += tileh; setColor(y); GL11.glVertex3f(x, y, z); x -= tilew; y = getHeight(j, i + 1); setColor(y); GL11.glVertex3f(x, y, z); } } GL11.glEnd(); } }
Author
Highlight as C C++ CSS Clojure Delphi ERb Groovy (beta) HAML HTML JSON Java JavaScript PHP Plain text Python Ruby SQL XML YAML diff code