static void Mod_Print(void);
static void Mod_Precache (void);
static void Mod_Decompile_f(void);
-static void Mod_BuildVBOs(void);
static void Mod_GenerateLightmaps_f(void);
void Mod_Init (void)
{
{
if (!vid.support.arb_vertex_buffer_object)
return;
+ if (mesh->vbo)
+ return;
// element buffer is easy because it's just one array
if (mesh->numtriangles)
Mem_Free(numsurfacesfortexture);
}
-static void Mod_BuildVBOs(void)
+void Mod_BuildVBOs(void)
{
if (gl_paranoid.integer && loadmodel->surfmesh.data_element3s && loadmodel->surfmesh.data_element3i)
{
if (!vid.support.arb_vertex_buffer_object)
return;
+ // only build a vbo if one has not already been created (this is important for brush models which load specially)
+ if (loadmodel->surfmesh.vbo)
+ return;
// element buffer is easy because it's just one array
if (loadmodel->surfmesh.num_triangles)