Sorry no luck there:
Here is the code again, my first one was formatted incorrectly.
public void gameLoop(){
try{
while(!finnish){
update();
render();
display.update();
Thread.sleep(1000);
}
cleanup();
}catch(Exception e){System.out.println(e);}
}
public void render() {
gl.glClear(GL11.GL_COLOR_BUFFER_BIT | GL11.GL_DEPTH_BUFFER_BIT); // Clear The Screen And The Depth Buffer
gl.glLoadIdentity(); // Reset The Current Modelview Matrix
gl.glTranslatef(0.0f, 0.0f, -6.0f);
for(int y1 = 0; y < 5; y++){
for(int x1 = 0; x < 5; x++){
gl.glBegin(gl.GL_QUADS); // Drawing Using Quads
gl.glVertex3f( -1.0f, 1.0f, 0.0f); // Top Left
gl.glVertex3f(-1.0f,-1.0f, 0.0f); // Bottom Left
gl.glVertex3f( 1.0f,-1.0f, 0.0f); // Bottom Right
gl.glVertex3f( 1.0f,1.0f, 0.0f); //Top right
gl.glEnd();
}
}
}
If i get rid of the two for loops its works fine, ive tried to use glPushMatrix and PopMatrix but they didnt work.
Am i incorrect in saying that gl.glLoadIdentity(); sets it back to 0,0,0.