#version 400 

in vec3 vertex   : IGLU_VERTEX;   // Sends vertex data from models here
in vec3 normal   : IGLU_NORMAL;   // Sends normal data (if any) from models here
in vec2 texCoord : IGLU_TEXCOORD; // Sends texture coordinate data (if any) from models here

uniform mat4 project;             // The projection/perspective matrix
uniform mat4 modelview;           // The modelview matrix

out vec4 fragNormal;

// This is the actual code that is executed.
void main( void )
{  
  gl_Position = project * ( modelview * vec4( vertex, 1.0f ) ); 
  fragNormal = inverse( transpose( modelview ) ) * vec4( normal, 0.0 );
}