Colored triangles with VAO and VBO

This commit is contained in:
Caesar2011
2016-09-05 18:38:53 +02:00
parent 866fabdf45
commit 433983e4ff
5 changed files with 87 additions and 41 deletions

View File

@@ -1,13 +1,11 @@
#version 400
#version 330 core
in vec2 aVertex;
in vec2 aTexCoord;
layout(location = 0) in vec3 vertexPosition_modelspace;
layout(location = 1) in vec3 vertexColor;
out vec3 fragmentColor;
out vec2 vTexCoord;
out vec3 vNormal;
void main()
{
vTexCoord = aTexCoord;
gl_Position = vec3(aVertex, 1);
void main(){
gl_Position.xyz = vertexPosition_modelspace;
gl_Position.w = 1.0;
fragmentColor = vertexColor;
}