From e03cdf444c687b2291c4f5b91684e5f3d46cf79a Mon Sep 17 00:00:00 2001 From: SmileTheory Date: Fri, 16 Jun 2017 16:52:53 -0700 Subject: [PATCH] OpenGL2: Remove SF_VAO_MESH. --- code/renderergl2/tr_light.c | 1 - code/renderergl2/tr_local.h | 10 +--------- code/renderergl2/tr_surface.c | 36 ----------------------------------- code/renderergl2/tr_world.c | 2 -- 4 files changed, 1 insertion(+), 48 deletions(-) diff --git a/code/renderergl2/tr_light.c b/code/renderergl2/tr_light.c index cf4c0b5b..f1886268 100644 --- a/code/renderergl2/tr_light.c +++ b/code/renderergl2/tr_light.c @@ -99,7 +99,6 @@ void R_DlightBmodel( bmodel_t *bmodel ) { case SF_FACE: case SF_GRID: case SF_TRIANGLES: - case SF_VAO_MESH: ((srfBspSurface_t *)surf->data)->dlightBits = mask; break; diff --git a/code/renderergl2/tr_local.h b/code/renderergl2/tr_local.h index b8f34df5..7e8e4b77 100644 --- a/code/renderergl2/tr_local.h +++ b/code/renderergl2/tr_local.h @@ -850,7 +850,6 @@ typedef enum { SF_IQM, SF_FLARE, SF_ENTITY, // beams, rails, lightning, etc that can be determined by entity - SF_VAO_MESH, SF_VAO_MDVMESH, SF_NUM_SURFACE_TYPES, @@ -903,7 +902,7 @@ typedef struct #define srfVert_t_cleared(x) srfVert_t (x) = {{0, 0, 0}, {0, 0}, {0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}} -// srfBspSurface_t covers SF_GRID, SF_TRIANGLES, SF_POLY, and SF_VAO_MESH +// srfBspSurface_t covers SF_GRID, SF_TRIANGLES, and SF_POLY typedef struct srfBspSurface_s { surfaceType_t surfaceType; @@ -925,13 +924,6 @@ typedef struct srfBspSurface_s // vertexes int numVerts; srfVert_t *verts; - - // BSP VBO offsets - int firstVert; - int firstIndex; - - // static render data - vao_t *vao; // SF_GRID specific variables after here diff --git a/code/renderergl2/tr_surface.c b/code/renderergl2/tr_surface.c index 0fc0e0aa..e123b54c 100644 --- a/code/renderergl2/tr_surface.c +++ b/code/renderergl2/tr_surface.c @@ -451,35 +451,6 @@ static qboolean RB_SurfaceVaoCached(int numVerts, srfVert_t *verts, int numIndex } -static qboolean RB_SurfaceVao(vao_t *vao, int numVerts, int numIndexes, int firstIndex, int dlightBits, int pshadowBits, qboolean shaderCheck) -{ - if (!vao) - { - return qfalse; - } - - if (shaderCheck && !(!ShaderRequiresCPUDeforms(tess.shader) && !tess.shader->isSky && !tess.shader->isPortal)) - { - return qfalse; - } - - RB_CheckVao(vao); - - tess.dlightBits |= dlightBits; - tess.pshadowBits |= pshadowBits; - - RB_EndSurface(); - RB_BeginSurface(tess.shader, tess.fogNum, tess.cubemapIndex); - - backEnd.pc.c_staticVaoDraws++; - - tess.numIndexes = numIndexes; - tess.numVertexes = numVerts; - - return qtrue; -} - - /* ============= RB_SurfaceTriangles @@ -1236,12 +1207,6 @@ static void RB_SurfaceFlare(srfFlare_t *surf) RB_AddFlare(surf, tess.fogNum, surf->origin, surf->color, surf->normal); } -static void RB_SurfaceVaoMesh(srfBspSurface_t * srf) -{ - RB_SurfaceVao (srf->vao, srf->numVerts, srf->numIndexes, srf->firstIndex, - srf->dlightBits, srf->pshadowBits, qfalse ); -} - void RB_SurfaceVaoMdvMesh(srfVaoMdvMesh_t * surface) { //mdvModel_t *mdvModel; @@ -1348,6 +1313,5 @@ void (*rb_surfaceTable[SF_NUM_SURFACE_TYPES])( void *) = { (void(*)(void*))RB_IQMSurfaceAnim, // SF_IQM, (void(*)(void*))RB_SurfaceFlare, // SF_FLARE, (void(*)(void*))RB_SurfaceEntity, // SF_ENTITY - (void(*)(void*))RB_SurfaceVaoMesh, // SF_VAO_MESH, (void(*)(void*))RB_SurfaceVaoMdvMesh, // SF_VAO_MDVMESH }; diff --git a/code/renderergl2/tr_world.c b/code/renderergl2/tr_world.c index 3821bee2..f9a24424 100644 --- a/code/renderergl2/tr_world.c +++ b/code/renderergl2/tr_world.c @@ -213,7 +213,6 @@ static int R_DlightSurface( msurface_t *surf, int dlightBits ) { case SF_FACE: case SF_GRID: case SF_TRIANGLES: - case SF_VAO_MESH: ((srfBspSurface_t *)surf->data)->dlightBits = dlightBits; break; @@ -299,7 +298,6 @@ static int R_PshadowSurface( msurface_t *surf, int pshadowBits ) { case SF_FACE: case SF_GRID: case SF_TRIANGLES: - case SF_VAO_MESH: ((srfBspSurface_t *)surf->data)->pshadowBits = pshadowBits; break;