Skip to content

Instantly share code, notes, and snippets.

@romualdo97
Created July 3, 2016 02:43
Show Gist options
  • Save romualdo97/0f0e04180ff7b68e3aecfc3a563be462 to your computer and use it in GitHub Desktop.
Save romualdo97/0f0e04180ff7b68e3aecfc3a563be462 to your computer and use it in GitHub Desktop.
shader
// crear el VBO(vertex buffer object) con el fin de designar un espacio en la GPU para los vertices del triangulo
GLuint VBO_ID;
glGenBuffers(1, &VBO_ID);
// bind the newly created buffer to the GL_ARRAY_BUFFER target
glBindBuffer(GL_ARRAY_BUFFER, VBO_ID);
// copies the previously defined triangle vertices data into the buffer's memory:
glBufferData(GL_ARRAY_BUFFER, sizeof(triangle_vertices), triangle_vertices, GL_STATIC_DRAW);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment