allocate client-side data for VBO
This commit is contained in:
1 parent
0f816ded34
commit
5eed1256ef
1 file changed
+6
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user