Draw red example triangle

This commit is contained in:
2020-06-27 22:08:34 +02:00
parent 163b45b010
commit 86a07a035a
6 changed files with 97 additions and 4 deletions

View File

@@ -0,0 +1,10 @@
#version 330 core
out vec4 fragmentColor;
uniform vec3 color;
void main()
{
fragmentColor = vec4(color.r, color.g, color.b, 1.0);
}

View File

@@ -0,0 +1,8 @@
#version 330 core
layout (location = 0) in vec2 inputVertex;
void main()
{
gl_Position = vec4(inputVertex.x, inputVertex.y, 0.0, 1.0);
}

View File

@@ -0,0 +1,8 @@
#version 330 core
layout (location = 0) in vec3 inputVertex;
void main()
{
gl_Position = vec4(inputVertex.x, inputVertex.y, inputVertex.z, 1.0);
}