Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // WIKI: These functions say that the attribute index index will get its attribute data from whatever buffer object is currently bound to GL_ARRAY_BUFFER.
- // Deci, vor fi trimise catre SHADER datele din bufferul bindat in acest moment de tip GL_ARRAY_BUFFER (deci pot sa pun aceste apeluri si dupa bindarea IBO-ului, ca el e de alt tip (GL_ELEMENT_ARRAY_BUFFER)
- unsigned int in_position_pipe = glGetAttribLocation(gl_program_shader, "in_position");
- glEnableVertexAttribArray(in_position_pipe);
- glVertexAttribPointer(in_position_pipe, 3, GL_FLOAT, GL_FALSE, sizeof(Vertex), (void*)0);
- unsigned int in_color_pipe = glGetAttribLocation(gl_program_shader, "in_color");
- glEnableVertexAttribArray(in_color_pipe);
- glVertexAttribPointer(in_color_pipe, 3, GL_FLOAT, GL_FALSE, sizeof(Vertex), (void*)(3 * sizeof(float)));
Advertisement
Add Comment
Please, Sign In to add comment