Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- GLfloat colourVert[] = {
- 0.0f, 1.0f, 0.0f,
- 1.0f, 0.0f, 0.0f,
- 0.0f, 0.0f, 1.0f
- };
- GLuint colourBuffer;
- glGenBuffers(1, &colourBuffer);
- glBindBuffer(GL_ARRAY_BUFFER, colourBuffer);
- glBufferData(GL_ARRAY_BUFFER, sizeof(colourVert), colourVert, GL_DYNAMIC_DRAW);
- glEnableVertexAttribArray(1);
- glVertexAttribPointer(1, 3, GL_FLOAT, GL_FALSE, 0, 0);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement