Got some geometry up and rotating. It will be pretty trivial to pass in

the camera rotation now and have it follow along.
This commit is contained in:
MitchellHansen
2016-11-29 00:31:22 -08:00
parent 5e58ade16f
commit 259f6a8488
5 changed files with 60 additions and 5 deletions

View File

@@ -1,8 +1,11 @@
#version 330 core
in vec4 vertexColor;
out vec4 color;
void main() {
color = vec4(0.0f, 0.5f, 0.2f, 1.0f);
color = vertexColor;
}

View File

@@ -2,7 +2,13 @@
layout (location = 0) in vec3 position;
uniform mat4 transform;
out vec4 vertexColor;
void main() {
gl_Position = vec4(position.x, position.y, position.z, 1.0);
gl_Position = transform * vec4(position, 1.0f);
//gl_Position = vec4(position, 1.0);
vertexColor = vec4(0.5f, 0.0f, 0.0f, 1.0f);
}