Change Vertex floats to vectors

This commit is contained in:
4VRDriver
2020-09-04 11:33:59 +02:00
parent f8da266fc0
commit eab5c4e5e0
8 changed files with 37 additions and 26 deletions

View File

@@ -45,18 +45,26 @@ void Controller::run() {
shaderProgram.bind();
Vertex vertices[] = {
Vertex{-0.5f, -0.5f, 0.0f,
0.0f, 0.0f,
1.0f, 0.0f, 0.0f, 1.0f},
Vertex{0.5f, -0.5f, 0.0f,
1.0f, 0.0f,
0.0f, 1.0f, 0.0f, 1.0f},
Vertex{-0.5f, 0.5f, 0.0f,
0.0f, 1.0f,
0.0f, 0.0f, 1.0f, 1.0f},
Vertex{0.5f, 0.5f, 0.0f,
1.0f, 1.0f,
0.0f, 0.0f, 1.0f, 1.0f}
Vertex{
glm::vec3(-0.5f, -0.5f, 0.0f),
glm::vec2(0.0f, 0.0f),
glm::vec3(0.0f, 0.0f, 0.0f),
glm::vec4(1.0f, 0.0f, 0.0f, 1.0f)},
Vertex{
glm::vec3(0.5f, -0.5f, 0.0f),
glm::vec2(1.0f, 0.0f),
glm::vec3(0.0f, 0.0f, 0.0f),
glm::vec4(0.0f, 1.0f, 0.0f, 1.0f)},
Vertex{
glm::vec3(-0.5f, 0.5f, 0.0f),
glm::vec2(0.0f, 1.0f),
glm::vec3(0.0f, 0.0f, 0.0f),
glm::vec4(0.0f, 0.0f, 1.0f, 1.0f)},
Vertex{
glm::vec3(0.5f, 0.5f, 0.0f),
glm::vec2(1.0f, 1.0f),
glm::vec3(0.0f, 0.0f, 0.0f),
glm::vec4(0.0f, 0.0f, 1.0f, 1.0f)}
};
uint32_t indices[] = {