allocate client-side data for VBO
This commit is contained in:
parent
0f816ded34
commit
5eed1256ef
6
WFObj.cc
6
WFObj.cc
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user