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:
@@ -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;
|
||||
|
||||
}
|
||||
@@ -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);
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user