Advertisement
Guest User

Untitled

a guest
Jan 21st, 2017
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. GLfloat colourVert[] = {
  2. 0.0f, 1.0f, 0.0f,
  3. 1.0f, 0.0f, 0.0f,
  4. 0.0f, 0.0f, 1.0f
  5. };
  6.  
  7.  
  8.  
  9. GLuint colourBuffer;
  10. glGenBuffers(1, &colourBuffer);
  11. glBindBuffer(GL_ARRAY_BUFFER, colourBuffer);
  12. glBufferData(GL_ARRAY_BUFFER, sizeof(colourVert), colourVert, GL_DYNAMIC_DRAW);
  13. glEnableVertexAttribArray(1);
  14. glVertexAttribPointer(1, 3, GL_FLOAT, GL_FALSE, 0, 0);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement