changed to a triangle
This commit is contained in:
parent
b21b9398e6
commit
78c7efd063
1 changed files with 5 additions and 7 deletions
12
src/main.cpp
12
src/main.cpp
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue