SHARE
TWEET

Untitled

a guest Jun 25th, 2019 58 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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);
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top