Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Vertex Arraw Object(VAO)
- glGenVertexArrays(1, setVAO);
- glBindVertexArray(setVAO);
- //Vertex Buffer Object(VBO)
- glGenBuffers(1, &setVBO);
- glBindBuffer(GL_ARRAY_BUFFER, setVBO0;
- //copy vertices to VBO
- glBufferData(GL_ARRAY_BUFFER, sizeof(vertsVO), vertsVO, GL_STATIC_DRAW);
- //Create Element Array(we are drawing with elements)
- glGenBuffers(1, &setEA);
- GLuint elements[] = {
- 0, 1, 2,
- 2, 3, 0
- };
- glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, setEA);
- glBufferData(GL_ELEMENT_ARRAY_BUFFER, sizeof(elements), elements, GL_STATIC_DRAW);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement