package home;

import javax.media.opengl.GL;

import com.sun.opengl.util.texture.Texture;

import devUtil.TextureLoader;

import world.GameObject;

public class Land extends GameObject {
	
	private Texture grass;
	
	public Land()  {
		grass = TextureLoader.getTexture("/visual/Textures/Grass.jpg");
	}
	
	public void render(GL gl) {
		
		grass.enable();
		grass.bind();
		
		gl.glBegin(GL.GL_QUADS);
		
		gl.glTexCoord2d(0, 0);
		
		gl.glVertex3d(
				-5000,
				0,
				-5000
				);
		
		gl.glTexCoord2d(1, 0);
		
		gl.glVertex3d(
				-5000,
				0,
				5000
				);
		
		gl.glTexCoord2d(1, 1);
		
		gl.glVertex3d(
				5000,
				0,
				5000
				);
		
		gl.glTexCoord2d(0, 1);
		
		gl.glVertex3d(
				5000,
				0,
				-5000
				);
		
		gl.glEnd();
		
		grass.disable();
	}
}