#version 150 compatibility

// simple pass-thru vertex shader.

// matrixes
uniform mat4 MVP;			// camera transform modelview
uniform mat4 ModelMatrix;	// local model transform (is needed currently to render vehicles)
uniform mat4 ProjMatrix;	// current projection matrix

attribute vec2 a_texcoord;
varying vec2 v_texcoord;
varying vec4 VertexColor;
varying vec4 WorldCoords;

void main(void) {
	
	gl_TexCoord[0] = gl_MultiTexCoord0;
	
	//gl_Position = ftransform();
	
	gl_Position = ProjMatrix * MVP * ModelMatrix * gl_Vertex;
	
	// gl_Vertex = the position of a vertex in model coordinates.
	
	v_texcoord = a_texcoord;
	VertexColor = gl_Color;
	WorldCoords = gl_Position;
	
}
