From d65ddd94d473b4925aa589ae2c32a3cf1c250e31 Mon Sep 17 00:00:00 2001 From: divverent Date: Fri, 19 Oct 2018 07:38:00 +0000 Subject: [PATCH] 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 --- model_shared.c | 3 +++ 1 file changed, 3 insertions(+) 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; -- 2.39.2