allocate client-side data for VBO

This commit is contained in:
Josh Holtrop committed 2011-04-24 21:03:14 -04:00
1 parent 0f816ded34
commit 5eed1256ef
1 file changed
+6
+6
View File
@@ -478,6 +478,12 @@ bool WFObj::buildVBO()
} }
if (texture_ref_count == 0) if (texture_ref_count == 0)
do_textures = false; 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; return true;
} }