changed to a triangle

This commit is contained in:
Lukian 2025-01-29 11:15:25 +01:00
parent b21b9398e6
commit 78c7efd063

View file

@ -34,16 +34,14 @@ int main()
glfwSetFramebufferSizeCallback(window, framebuffer_size_callback);
float vertices[] = {
0.5f, 0.5f, 0.0f, // top right
0.5f, -0.5f, 0.0f, // bottom right
-0.5f, -0.5f, 0.0f, // bottom left
-0.5f, 0.5f, 0.0f // top left
0.0f, 0.5f, 0.0f,
-0.5f, -0.5f, 0.0f,
0.5f, -0.5f, 0.0f
};
unsigned int indices[] = { // note that we start from 0!
0, 1, 3, // first triangle
1, 2, 3 // second triangle
};
0, 1, 2
};
unsigned int VBO;
glGenBuffers(1, &VBO);