Advertisement
Guest User

Untitled

a guest
Jun 25th, 2019
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. GLuint vao_id;
  2. glGenVertexArrays(1, &vao_id);
  3. glBindVertexArray(vao_id);
  4.  
  5. GLuint VBO;
  6. glGenBuffers(1, &VBO);
  7. glBindBuffer(GL_ARRAY_BUFFER, VBO);
  8. glBufferData(GL_ARRAY_BUFFER, size, data, GL_STATIC_DRAW);
  9.  
  10. glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 0, (void*)0);
  11. glEnableVertexAttribArray(0);
  12.  
  13. //Alternate position <<----
  14.  
  15. //Unbind the VAO
  16. glBindVertexArray(0);
  17.  
  18. //Current position <<----
  19. glDeleteBuffers(1, &VBO);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement