我有下面的代码,我想将一个数组 meshVerts 传递给下面的方法:
- (GLuint)make:(float *)cubeVerts {
GLuint _vertexArray;
GLuint _vertexBuffer;
glEnable(GL_DEPTH_TEST);
glGenVertexArraysOES(1, &_vertexArray);
glBindVertexArrayOES(_vertexArray);
glGenBuffers(1, &_vertexBuffer);
glBindBuffer(GL_ARRAY_BUFFER, _vertexBuffer);
glBufferData(GL_ARRAY_BUFFER, sizeof(cubeVerts), cubeVerts, GL_STATIC_DRAW);
}
但是,这似乎对我不起作用?有什么我做错了吗?