Fixed verts bug

pull/2/head
E. Almqvist 2 years ago
parent fa59c32e24
commit c85d14e65c
  1. 18
      src/main.cpp

@ -76,7 +76,7 @@ RenderObj preRenderCallback(unsigned int indices[], unsigned int indices_count,
} }
void renderCallback(RenderObj ro) { void renderCallback(RenderObj ro) {
glClearColor(0.0f, 1.0f, 0.0f, 1.0f); glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
glClear(GL_COLOR_BUFFER_BIT); glClear(GL_COLOR_BUFFER_BIT);
float time = glfwGetTime(); float time = glfwGetTime();
@ -115,18 +115,12 @@ int main() {
} }
float verts[] = { float verts[] = {
0.5f, 0.5f, 0.0f, 1.0f, 1.0f, 1.0f, 0.5f, 0.5f, 0.0f, 1.0f, 1.0f, 1.0f, -1.0f, 1.0f,
0.5f, -0.5f, 0.0f, 0.0f, 1.0f, 0.0f, 0.5f, -0.5f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, 1.0f,
-0.5f, -0.5f, 0.0f, 1.0f, 1.0f, 0.0f, -0.5f, -0.5f, 0.0f, 1.0f, 1.0f, 0.0f, -1.0f, -1.0f,
-0.5f, 0.5f, 0.0f, 0.0f, 0.0f, 1.0f -0.5f, 0.5f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, -1.0f
};
float texCoords[] = {
0.0f, 0.0f,
1.0f, 0.0f,
0.0f, 1.0f,
1.0f, 1.0f
}; };
// Vert struc: x y z r g b tx ty
unsigned int indices[] = { unsigned int indices[] = {
0, 1, 3, 0, 1, 3,

Loading…
Cancel
Save