From: divverent Date: Fri, 19 Oct 2018 07:38:00 +0000 (+0000) Subject: Do not build VBOs on a dedicated server. X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=d65ddd94d473b4925aa589ae2c32a3cf1c250e31;p=xonotic%2Fdarkplaces.git Do not build VBOs on a dedicated server. Fixes crash at startup of dedicated server in Quake and Xonotic (probably in everything). The only reason why this ever worked before was that Mod_BuildVBOs's main callee R_Mesh_CreateMeshBuffer did a GL2 feature test before calling into anything VBO related (and on a dedicated server, which does not initialize GL, the test always returns false); however now that we require GL32, the feature test is gone and thus the crash happened. An explicit check for being a dedicated server fixes that. git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12469 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/model_shared.c b/model_shared.c index 48b4315b..a6d97670 100644 --- a/model_shared.c +++ b/model_shared.c @@ -2893,6 +2893,9 @@ void Mod_MakeSortedSurfaces(dp_model_t *mod) void Mod_BuildVBOs(void) { + if(cls.state == ca_dedicated) + return; + if (!loadmodel->surfmesh.num_vertices) return;