1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
|
glVertexAttribPointer(this.m_shader.vertexIndex, 3, GL_FLOAT, false, 0, null);
glVertexAttribPointer(this.m_shader.textureIndex, 2, GL_FLOAT, false, 0, this.m_buffer.texturePtr);
glVertexAttribPointer(this.m_shader.colorIndex, 4, GL_UNSIGNED_BYTE, true, 0, this.m_buffer.colorPtr);
glUniformMatrix4fv(this.m_shader.modelViewLocation, 1, GL_TRUE, modelView.values_ptr);
glUniformMatrix4fv(this.m_shader.projectionLocation, 1, GL_TRUE, projection.values_ptr);
this.m_texture.bind();
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, this.m_indicesBuffer);
glDrawElements(GL_TRIANGLES, this.m_indicesCount, GL_UNSIGNED_INT, null); |
Partager