Dear All:
I want to display a 3d facial mesh(50496 vertices and 106466 faces). I use the code of OpenGL SuperBible just like this:
GLBatch PlyBatch;
void SetupRC()
{
…
GLfloat mVertex[10646633];
GLfloat mColor[10646633];
…
PlyBatch.Begin(GL_TRIANGLES, 106466);
PlyBatch.CopyVertexData3f(mVertex);
PlyBatch.CopyColorData4f(mColor);
PlyBatch.End();
…
}
and draw scene using this:
void RenderScene()
{
…
PlyBatch.Draw();
}
but when allocating the array mVertex[10646633]; there is a program error. When i reduce the array to mVertex[1500033], it’s all ok.
How to allocate a big GLfloat array?