Skip to content

Commit 9478934

Browse files
committed
NUKE the remains of MST_FLARE
This feature was mostly removed by aa41485, this just removes some of its remnants.
1 parent ae09823 commit 9478934

7 files changed

Lines changed: 6 additions & 321 deletions

File tree

src.cmake

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,6 @@ set(RENDERERLIST
9191
${ENGINE_DIR}/renderer/tr_cmds.cpp
9292
${ENGINE_DIR}/renderer/tr_curve.cpp
9393
${ENGINE_DIR}/renderer/tr_fbo.cpp
94-
${ENGINE_DIR}/renderer/tr_flares.cpp
9594
${ENGINE_DIR}/renderer/tr_font.cpp
9695
${ENGINE_DIR}/renderer/GeometryCache.cpp
9796
${ENGINE_DIR}/renderer/GeometryCache.h

src/engine/renderer/tr_bsp.cpp

Lines changed: 6 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1474,43 +1474,6 @@ static void ParseTriSurf( dsurface_t *ds, drawVert_t *verts, bspSurface_t *surf,
14741474
FinishGenericSurface( ds, ( srfGeneric_t * ) cv, cv->verts[ 0 ].xyz );
14751475
}
14761476

1477-
/*
1478-
===============
1479-
ParseFlare
1480-
===============
1481-
*/
1482-
static void ParseFlare( dsurface_t *ds, bspSurface_t *surf )
1483-
{
1484-
srfFlare_t *flare;
1485-
int i;
1486-
1487-
// set lightmap
1488-
surf->lightmapNum = -1;
1489-
1490-
// get fog volume
1491-
surf->fogIndex = LittleLong( ds->fogNum ) + 1;
1492-
1493-
// get shader
1494-
surf->shader = ShaderForShaderNum( ds->shaderNum );
1495-
1496-
if ( r_singleShader->integer && !surf->shader->isSky )
1497-
{
1498-
surf->shader = tr.defaultShader;
1499-
}
1500-
1501-
flare = (srfFlare_t*) ri.Hunk_Alloc( sizeof( *flare ), ha_pref::h_low );
1502-
flare->surfaceType = surfaceType_t::SF_FLARE;
1503-
1504-
surf->data = ( surfaceType_t * ) flare;
1505-
1506-
for ( i = 0; i < 3; i++ )
1507-
{
1508-
flare->origin[ i ] = LittleFloat( ds->lightmapOrigin[ i ] );
1509-
flare->color[ i ] = LittleFloat( ds->lightmapVecs[ 0 ][ i ] );
1510-
flare->normal[ i ] = LittleFloat( ds->lightmapVecs[ 2 ][ i ] );
1511-
}
1512-
}
1513-
15141477
/*
15151478
=================
15161479
R_MergedWidthPoints
@@ -3475,12 +3438,16 @@ static void R_LoadSurfaces( lump_t *surfs, lump_t *verts, lump_t *indexLump )
34753438
break;
34763439

34773440
case mapSurfaceType_t::MST_FLARE:
3478-
ParseFlare( in, out );
3441+
Log::Warn( "Surface type not supported: MST_FLARE; firstIndex: %i, numIndexes: %i, shaderNum: %i",
3442+
in->firstIndex, in->numIndexes, in->shaderNum );
34793443
numFlares++;
34803444
break;
34813445

34823446
case mapSurfaceType_t::MST_FOLIAGE:
34833447
// Tr3B: TODO ParseFoliage
3448+
Log::Warn( "Surface type not supported: MST_FOLIAGE, parsing as MST_TRIANGLE_SOUP instead;"
3449+
" firstIndex: %i, numIndexes: %i, shaderNum: %i",
3450+
in->firstIndex, in->numIndexes, in->shaderNum );
34843451
ParseTriSurf( in, dv, out, indexes );
34853452
numFoliages++;
34863453
break;
@@ -3490,7 +3457,7 @@ static void R_LoadSurfaces( lump_t *surfs, lump_t *verts, lump_t *indexLump )
34903457
}
34913458
}
34923459

3493-
Log::Debug("...loaded %d faces, %i meshes, %i trisurfs, %i flares %i foliages", numFaces, numMeshes, numTriSurfs,
3460+
Log::Debug( "...loaded %d faces, %i meshes, %i trisurfs, %i flares (skipped) %i foliages", numFaces, numMeshes, numTriSurfs,
34943461
numFlares, numFoliages );
34953462

34963463
if ( r_stitchCurves->integer )

src/engine/renderer/tr_cmds.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -94,11 +94,6 @@ void R_PerformanceCounters()
9494
{
9595
Log::Notice("fog srf:%i batches:%i", backEnd.pc.c_fogSurfaces, backEnd.pc.c_fogBatches );
9696
}
97-
else if ( r_speeds->integer == Util::ordinal(renderSpeeds_t::RSPEEDS_FLARES ))
98-
{
99-
Log::Notice("flare adds:%i tests:%i renders:%i",
100-
backEnd.pc.c_flareAdds, backEnd.pc.c_flareTests, backEnd.pc.c_flareRenders );
101-
}
10297
else if ( r_speeds->integer == Util::ordinal(renderSpeeds_t::RSPEEDS_SHADING_TIMES ))
10398
{
10499
Log::Notice("forward shading times: ambient:%i lighting:%i", backEnd.pc.c_forwardAmbientTime,

src/engine/renderer/tr_flares.cpp

Lines changed: 0 additions & 222 deletions
This file was deleted.

src/engine/renderer/tr_local.h

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,6 @@ enum class shaderProfilerRenderSubGroupsMode {
329329
RSPEEDS_LIGHTS,
330330
RSPEEDS_SHADOWCUBE_CULLING,
331331
RSPEEDS_FOG,
332-
RSPEEDS_FLARES,
333332
RSPEEDS_SHADING_TIMES,
334333
RSPEEDS_CHC,
335334
RSPEEDS_NEAR_FAR,
@@ -1592,7 +1591,6 @@ enum class shaderProfilerRenderSubGroupsMode {
15921591
SF_MD5,
15931592
SF_IQM,
15941593

1595-
SF_FLARE,
15961594
SF_ENTITY, // beams, rails, lightning, etc that can be determined by entity
15971595

15981596
SF_VBO_MESH,
@@ -1746,14 +1744,6 @@ enum class shaderProfilerRenderSubGroupsMode {
17461744
polyVert_t *verts;
17471745
};
17481746

1749-
struct srfFlare_t
1750-
{
1751-
surfaceType_t surfaceType;
1752-
vec3_t origin;
1753-
vec3_t normal;
1754-
vec3_t color;
1755-
};
1756-
17571747
struct srfVert_t
17581748
{
17591749
vec3_t xyz;
@@ -2475,10 +2465,6 @@ enum class shaderProfilerRenderSubGroupsMode {
24752465
int c_fogSurfaces;
24762466
int c_fogBatches;
24772467

2478-
int c_flareAdds;
2479-
int c_flareTests;
2480-
int c_flareRenders;
2481-
24822468
int c_forwardAmbientTime;
24832469
int c_forwardLightingTime;
24842470

@@ -3600,18 +3586,6 @@ inline bool checkGLErrors()
36003586
/*
36013587
============================================================
36023588
3603-
FLARES, tr_flares.c
3604-
3605-
============================================================
3606-
*/
3607-
3608-
void R_ClearFlares();
3609-
3610-
void RB_AddFlare( void *surface, int fogNum, vec3_t point, vec3_t color, vec3_t normal );
3611-
3612-
/*
3613-
============================================================
3614-
36153589
LIGHTS, tr_light.c
36163590
36173591
============================================================

src/engine/renderer/tr_model.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -273,8 +273,6 @@ bool RE_BeginRegistration( glconfig_t *glconfigOut, glconfig2_t *glconfig2Out )
273273
tr.visClusters[i] = -1;
274274
}
275275

276-
R_ClearFlares();
277-
278276
RE_ClearScene();
279277

280278
// HACK: give world entity white color for "colored" shader keyword

0 commit comments

Comments
 (0)