![]() Void glDrawElements(GLenum type, GLint count, GLenum type, GLsizeiptr indices) 设置数据以后,我们需要用 glGenVertexArrays 创建一个Vertex Array Object, 然后使用glBindVertexArray绑定VAO,一旦VAO绑定后,使glGenBuffers 创建一个Vertex Buffer Object, 当然仍然需要使用glBindBuffer绑定VBO; ![]() ![]() Vertices = -0.5 vertices = -0.5 vertices = 0.0 //左下1 vertices = 0.5 vertices = 0.5 vertices = 0.0 // 右上 3ĭelete vertices // Delete our vertices from memory We willīe hard coding in the vertices for the square, which will be done in this method.įloat* vertices = new float // Vertices for our square CreateSquare is used to create the Vertex Array Object which will hold our square.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |