allocate client-side data for VBO

This commit is contained in:
Josh Holtrop 2011-04-24 21:03:14 -04:00
parent 0f816ded34
commit 5eed1256ef

View File

@ -478,6 +478,12 @@ bool WFObj::buildVBO()
}
if (texture_ref_count == 0)
do_textures = false;
size_t n_floats_per_vref =
3 + /* vertex coordinates */
(do_textures ? 2 : 0) + /* texture coordinates */
3; /* normal coordinates */
GLfloat * data = new GLfloat[n_floats_per_vref * flat_vertices.size()];
delete[] data;
return true;
}