[求助] 更换模型渲染不出来
根据http://blog.csdn.net/ggtaas/article/details/8507049的教程,现在用2-8-7的SDK,在ImageTargets.cpp里面已经没有第2步这些代码了
glTexCoordPointer(2, GL_FLOAT, 0, (const GLvoid*)&teapotTexCoords[0]);
glVertexPointer(3, GL_FLOAT, 0, (const GLvoid*) &teapotVertices[0]);
glNormalPointer(GL_FLOAT, 0, (const GLvoid*) &teapotNormals[0]);
glDrawElements(GL_TRIANGLES, NUM_TEAPOT_OBJECT_INDEX, GL_UNSIGNED_SHORT,
(const GLvoid*)&teapotIndices[0]);
改为:
glTexCoordPointer(2, GL_FLOAT, 0, (constGLvoid*) &bananaTexCoords[0]);
glVertexPointer(3, GL_FLOAT, 0, (const GLvoid*) & bananaVerts [0]);
glNormalPointer(GL_FLOAT, 0, (const GLvoid*) &bananaNormals[0]);
glDrawArrays(GL_TRIANGLES, 0, bananaNumVerts);
第5步设置 kObjectScale= 120.f的代码也没有,其他步骤都按照教程做的,可是最后没有渲染出香蕉来,请问现在有人用2-8-7的SDK更换模型成功的吗?交流一下,谢谢!