src/OldMainWindow.java
private void renderGL() throws IOException {
		changeOrth();

		GL11.glLoadIdentity();
		GLU.gluPerspective(60f, 1.3f, 0.1f, 10000);
		GLU.gluLookAt(10, 5, 10, 0, 0, 0, 0, 1, 0);

		GL11.glClear(GL11.GL_COLOR_BUFFER_BIT | GL11.GL_DEPTH_BUFFER_BIT);
		GL11.glClearColor(1.0f, 1.0f, 1.0f, 1.0f);
//		GL11.glColor3f(0.5f, 0.5f, 1.0f);

		myDelta = getTime() - StartTime;
		float delta = ((float) myDelta) / 10000;

		// code to aid in animation
		float theta = (float) (delta * 2 * Math.PI);
//		System.out.println(delta);
		float thetaDeg = delta * 360;
		float posn_x = (float) Math.cos(theta); // same as your circle code in your notes
		float posn_y = (float) Math.sin(theta);
		final float new_y = (float) (posn_y*Math.cos(45));
		final float new_x = (float) Math.cos(theta*15);



		//Road
		GL11.glPushMatrix();
		GL11.glTranslatef(-posn_x/3,-0.0f,0.0f);
		Road roadq = new Road();
//		Color.white.bind();
		road.bind();
		GL11.glEnable(GL11.GL_TEXTURE_2D);
		GL11.glTexParameteri( GL11.GL_TEXTURE_2D,  GL11.GL_TEXTURE_MAG_FILTER,  GL11.GL_NEAREST);
		roadq.DrawRoad(10);
		GL11.glPopMatrix();
		GL11.glDisable(GL11.GL_TEXTURE_2D);

		//Ground
		GL11.glPushMatrix();

		Ground ground = new Ground();
		ground.DrawGround(10);
		GL11.glPopMatrix();

		//Sky
		GL11.glPushMatrix();
		Sky skyo = new Sky();
		sky.bind();
		Color.white.bind();
		GL11.glEnable(GL11.GL_TEXTURE_2D);
		GL11.glTexParameteri( GL11.GL_TEXTURE_2D,  GL11.GL_TEXTURE_MAG_FILTER,  GL11.GL_NEAREST);
		skyo.DrawSky(10);
		GL11.glPopMatrix();
		GL11.glDisable(GL11.GL_TEXTURE_2D);

		//River
//		GL11.glTranslatef(3.0f,-1.0f,1.0f*-posn_y*2);
		River river = new River();
		int w,l;
		for (w=1;w<25;w++) {
			for (l = 1; l < 300; l++) {
				GL11.glPushMatrix();
				GL11.glTranslatef(1.0f+0.2f*w,-1.9f,-10.0f+0.2f*l+Math.abs(new_x/2));
				river.DrawRiver(0.2f);
				GL11.glPopMatrix();
				GL11.glPushMatrix();
				GL11.glTranslatef(-1.0f-0.2f*w,-1.9f,-10.0f+0.2f*l+Math.abs(new_x/2));
				river.DrawRiver(0.2f);
				GL11.glPopMatrix();
			}
		}


		//Human
		GL11.glPushMatrix();
		GL11.glTranslatef(posn_x/3,-0.0f,-posn_x*2);
		Human human = new Human(head, clo);
		human.DrawHuman(delta*10);
		GL11.glPopMatrix();

		//plane
		GL11.glPushMatrix();
		GL11.glTranslatef(posn_x,posn_y,-5-posn_x*2);
		Plane plane = new Plane();
		plane.DrawPlane();
		GL11.glPopMatrix();

		//baby
		GL11.glPushMatrix();
		GL11.glTranslatef(posn_x,posn_y,-5-posn_x*2);
		Baby baby = new Baby();
		bb.bind();
		Color.white.bind();
		GL11.glEnable(GL11.GL_TEXTURE_2D);
		GL11.glTexParameteri( GL11.GL_TEXTURE_2D,  GL11.GL_TEXTURE_MAG_FILTER,  GL11.GL_NEAREST);
		baby.DrawBaby();
		GL11.glPopMatrix();

		//Sun
		GL11.glPushMatrix();
		GL11.glTranslatef(-15.0f*new_y,-6.0f*posn_x,15.0f*new_y);
		TexSphere Sun = new TexSphere();
//		GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_T, GL11.GL_CLAMP);
		Color.yellow.bind();
		sun.bind();
		GL11.glEnable(GL11.GL_TEXTURE_2D);
		GL11.glTexParameteri( GL11.GL_TEXTURE_2D,  GL11.GL_TEXTURE_MAG_FILTER,  GL11.GL_NEAREST);
		if (posn_x<0.2f)
		Sun.DrawTexSphere(0.5f,100,100,sun);
		GL11.glPopMatrix();

		//Moon
		GL11.glPushMatrix();
		GL11.glTranslatef(15.0f*new_y,6.0f*posn_x,-15.0f*new_y);
		TexSphere Moon = new TexSphere();
//		GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_T, GL11.GL_CLAMP);
		Color.white.bind();
		moon.bind();
		GL11.glEnable(GL11.GL_TEXTURE_2D);
		GL11.glTexParameteri( GL11.GL_TEXTURE_2D,  GL11.GL_TEXTURE_MAG_FILTER,  GL11.GL_NEAREST);
		if (posn_x>-0.2f)
		Moon.DrawTexSphere(0.5f,100,100,moon);
		GL11.glPopMatrix();




		GL11.glDisable(GL11.GL_TEXTURE_2D);
	}
/*
	 * You can edit this method to add in your own objects /  remember to load in textures in the INIT method as they take time to load
	 *
	 */
You can edit this method to add in your own objects /  remember to load in textures in the INIT method as they take time to load
You can edit this method to add in your own objects / remember to load in textures in the INIT method as they take time to load
private void renderGL() throws IOException {
		changeOrth();
		GL11.glLoadIdentity();
		GLU.gluPerspective(60f, 1.3f, 0.1f, 10000);
		GLU.gluLookAt(10, 5, 10, 0, 0, 0, 0, 1, 0);
		GL11.glClear(GL11.GL_COLOR_BUFFER_BIT | GL11.GL_DEPTH_BUFFER_BIT);
		GL11.glClearColor(1.0f, 1.0f, 1.0f, 1.0f);
		myDelta = getTime() - StartTime;
		float delta = ((float) myDelta) / 10000;
		float theta = (float) (delta * 2 * Math.PI);
		float thetaDeg = delta * 360;
		float posn_x = (float) Math.cos(theta); 
		float posn_y = (float) Math.sin(theta);
		final float new_y = (float) (posn_y*Math.cos(45));
		final float new_x = (float) Math.cos(theta*15);
		GL11.glPushMatrix();
		GL11.glTranslatef(-posn_x/3,-0.0f,0.0f);
		Road roadq = new Road();
		road.bind();
		GL11.glEnable(GL11.GL_TEXTURE_2D);
		GL11.glTexParameteri( GL11.GL_TEXTURE_2D,  GL11.GL_TEXTURE_MAG_FILTER,  GL11.GL_NEAREST);
		roadq.DrawRoad(10);
		GL11.glPopMatrix();
		GL11.glDisable(GL11.GL_TEXTURE_2D);
		GL11.glPushMatrix();
		Ground ground = new Ground();
		ground.DrawGround(10);
		GL11.glPopMatrix();
		GL11.glPushMatrix();
		Sky skyo = new Sky();
		sky.bind();
		Color.white.bind();
		GL11.glEnable(GL11.GL_TEXTURE_2D);
		GL11.glTexParameteri( GL11.GL_TEXTURE_2D,  GL11.GL_TEXTURE_MAG_FILTER,  GL11.GL_NEAREST);
		skyo.DrawSky(10);
		GL11.glPopMatrix();
		GL11.glDisable(GL11.GL_TEXTURE_2D);
		River river = new River();
		int w,l;
		for (w=1;w<25;w++) {
			for (l = 1; l < 300; l++) {
				GL11.glPushMatrix();
				GL11.glTranslatef(1.0f+0.2f*w,-1.9f,-10.0f+0.2f*l+Math.abs(new_x/2));
				river.DrawRiver(0.2f);
				GL11.glPopMatrix();
				GL11.glPushMatrix();
				GL11.glTranslatef(-1.0f-0.2f*w,-1.9f,-10.0f+0.2f*l+Math.abs(new_x/2));
				river.DrawRiver(0.2f);
				GL11.glPopMatrix();
			}
		}
		GL11.glPushMatrix();
		GL11.glTranslatef(posn_x/3,-0.0f,-posn_x*2);
		Human human = new Human(head, clo);
		human.DrawHuman(delta*10);
		GL11.glPopMatrix();
		GL11.glPushMatrix();
		GL11.glTranslatef(posn_x,posn_y,-5-posn_x*2);
		Plane plane = new Plane();
		plane.DrawPlane();
		GL11.glPopMatrix();
		GL11.glPushMatrix();
		GL11.glTranslatef(posn_x,posn_y,-5-posn_x*2);
		Baby baby = new Baby();
		bb.bind();
		Color.white.bind();
		GL11.glEnable(GL11.GL_TEXTURE_2D);
		GL11.glTexParameteri( GL11.GL_TEXTURE_2D,  GL11.GL_TEXTURE_MAG_FILTER,  GL11.GL_NEAREST);
		baby.DrawBaby();
		GL11.glPopMatrix();
		GL11.glPushMatrix();
		GL11.glTranslatef(-15.0f*new_y,-6.0f*posn_x,15.0f*new_y);
		TexSphere Sun = new TexSphere();
		Color.yellow.bind();
		sun.bind();
		GL11.glEnable(GL11.GL_TEXTURE_2D);
		GL11.glTexParameteri( GL11.GL_TEXTURE_2D,  GL11.GL_TEXTURE_MAG_FILTER,  GL11.GL_NEAREST);
		if (posn_x<0.2f)
		Sun.DrawTexSphere(0.5f,100,100,sun);
		GL11.glPopMatrix();
		GL11.glPushMatrix();
		GL11.glTranslatef(15.0f*new_y,6.0f*posn_x,-15.0f*new_y);
		TexSphere Moon = new TexSphere();
		Color.white.bind();
		moon.bind();
		GL11.glEnable(GL11.GL_TEXTURE_2D);
		GL11.glTexParameteri( GL11.GL_TEXTURE_2D,  GL11.GL_TEXTURE_MAG_FILTER,  GL11.GL_NEAREST);
		if (posn_x>-0.2f)
		Moon.DrawTexSphere(0.5f,100,100,moon);
		GL11.glPopMatrix();
		GL11.glDisable(GL11.GL_TEXTURE_2D);
	}
private void renderGL ( ) throws IOException { changeOrth ( ) ; GL11 . glLoadIdentity ( ) ; GLU . gluPerspective ( 60f , 1.3f , 0.1f , 10000 ) ; GLU . gluLookAt ( 10 , 5 , 10 , 0 , 0 , 0 , 0 , 1 , 0 ) ; GL11 . glClear ( GL11 . GL_COLOR_BUFFER_BIT | GL11 . GL_DEPTH_BUFFER_BIT ) ; GL11 . glClearColor ( 1.0f , 1.0f , 1.0f , 1.0f ) ; myDelta = getTime ( ) - StartTime ; float delta = ( ( float ) myDelta ) / 10000 ; float theta = ( float ) ( delta * 2 * Math . PI ) ; float thetaDeg = delta * 360 ; float posn_x = ( float ) Math . cos ( theta ) ; float posn_y = ( float ) Math . sin ( theta ) ; final float new_y = ( float ) ( posn_y * Math . cos ( 45 ) ) ; final float new_x = ( float ) Math . cos ( theta * 15 ) ; GL11 . glPushMatrix ( ) ; GL11 . glTranslatef ( - posn_x / 3 , - 0.0f , 0.0f ) ; Road roadq = new Road ( ) ; road . bind ( ) ; GL11 . glEnable ( GL11 . GL_TEXTURE_2D ) ; GL11 . glTexParameteri ( GL11 . GL_TEXTURE_2D , GL11 . GL_TEXTURE_MAG_FILTER , GL11 . GL_NEAREST ) ; roadq . DrawRoad ( 10 ) ; GL11 . glPopMatrix ( ) ; GL11 . glDisable ( GL11 . GL_TEXTURE_2D ) ; GL11 . glPushMatrix ( ) ; Ground ground = new Ground ( ) ; ground . DrawGround ( 10 ) ; GL11 . glPopMatrix ( ) ; GL11 . glPushMatrix ( ) ; Sky skyo = new Sky ( ) ; sky . bind ( ) ; Color . white . bind ( ) ; GL11 . glEnable ( GL11 . GL_TEXTURE_2D ) ; GL11 . glTexParameteri ( GL11 . GL_TEXTURE_2D , GL11 . GL_TEXTURE_MAG_FILTER , GL11 . GL_NEAREST ) ; skyo . DrawSky ( 10 ) ; GL11 . glPopMatrix ( ) ; GL11 . glDisable ( GL11 . GL_TEXTURE_2D ) ; River river = new River ( ) ; int w , l ; for ( w = 1 ; w < 25 ; w ++ ) { for ( l = 1 ; l < 300 ; l ++ ) { GL11 . glPushMatrix ( ) ; GL11 . glTranslatef ( 1.0f + 0.2f * w , - 1.9f , - 10.0f + 0.2f * l + Math . abs ( new_x / 2 ) ) ; river . DrawRiver ( 0.2f ) ; GL11 . glPopMatrix ( ) ; GL11 . glPushMatrix ( ) ; GL11 . glTranslatef ( - 1.0f - 0.2f * w , - 1.9f , - 10.0f + 0.2f * l + Math . abs ( new_x / 2 ) ) ; river . DrawRiver ( 0.2f ) ; GL11 . glPopMatrix ( ) ; } } GL11 . glPushMatrix ( ) ; GL11 . glTranslatef ( posn_x / 3 , - 0.0f , - posn_x * 2 ) ; Human human = new Human ( head , clo ) ; human . DrawHuman ( delta * 10 ) ; GL11 . glPopMatrix ( ) ; GL11 . glPushMatrix ( ) ; GL11 . glTranslatef ( posn_x , posn_y , - 5 - posn_x * 2 ) ; Plane plane = new Plane ( ) ; plane . DrawPlane ( ) ; GL11 . glPopMatrix ( ) ; GL11 . glPushMatrix ( ) ; GL11 . glTranslatef ( posn_x , posn_y , - 5 - posn_x * 2 ) ; Baby baby = new Baby ( ) ; bb . bind ( ) ; Color . white . bind ( ) ; GL11 . glEnable ( GL11 . GL_TEXTURE_2D ) ; GL11 . glTexParameteri ( GL11 . GL_TEXTURE_2D , GL11 . GL_TEXTURE_MAG_FILTER , GL11 . GL_NEAREST ) ; baby . DrawBaby ( ) ; GL11 . glPopMatrix ( ) ; GL11 . glPushMatrix ( ) ; GL11 . glTranslatef ( - 15.0f * new_y , - 6.0f * posn_x , 15.0f * new_y ) ; TexSphere Sun = new TexSphere ( ) ; Color . yellow . bind ( ) ; sun . bind ( ) ; GL11 . glEnable ( GL11 . GL_TEXTURE_2D ) ; GL11 . glTexParameteri ( GL11 . GL_TEXTURE_2D , GL11 . GL_TEXTURE_MAG_FILTER , GL11 . GL_NEAREST ) ; if ( posn_x < 0.2f ) Sun . DrawTexSphere ( 0.5f , 100 , 100 , sun ) ; GL11 . glPopMatrix ( ) ; GL11 . glPushMatrix ( ) ; GL11 . glTranslatef ( 15.0f * new_y , 6.0f * posn_x , - 15.0f * new_y ) ; TexSphere Moon = new TexSphere ( ) ; Color . white . bind ( ) ; moon . bind ( ) ; GL11 . glEnable ( GL11 . GL_TEXTURE_2D ) ; GL11 . glTexParameteri ( GL11 . GL_TEXTURE_2D , GL11 . GL_TEXTURE_MAG_FILTER , GL11 . GL_NEAREST ) ; if ( posn_x > - 0.2f ) Moon . DrawTexSphere ( 0.5f , 100 , 100 , moon ) ; GL11 . glPopMatrix ( ) ; GL11 . glDisable ( GL11 . GL_TEXTURE_2D ) ; }
You can edit this method to add in your own objects /  remember to load in textures in the INIT method as they take time to load
You can edit this method to add in your own objects / remember to load in textures in the INIT method as they take time to load
//		GL11.glColor3f(0.5f, 0.5f, 1.0f); // code to aid in animation //		System.out.println(delta); // same as your circle code in your notes //Road //		Color.white.bind(); //Ground //Sky //River //		GL11.glTranslatef(3.0f,-1.0f,1.0f*-posn_y*2); //Human //plane //baby //Sun //		GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_T, GL11.GL_CLAMP); //Moon //		GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_T, GL11.GL_CLAMP);