diff --git a/src/engine/qcommon/q_shared.h b/src/engine/qcommon/q_shared.h index 0ea400d3b2..7b33e27f36 100644 --- a/src/engine/qcommon/q_shared.h +++ b/src/engine/qcommon/q_shared.h @@ -1892,13 +1892,6 @@ inline vec_t VectorNormalize2( const vec3_t v, vec3_t out ) using GameStateCSs = std::array; -// TODO(0.56): NUKE all -#define REF_FORCE_DLIGHT ( 1 << 31 ) // RF, passed in through overdraw parameter, force this dlight under all conditions -#define REF_JUNIOR_DLIGHT ( 1 << 30 ) // (SA) this dlight does not light surfaces. it only affects dynamic light grid -#define REF_DIRECTED_DLIGHT ( 1 << 29 ) // ydnar: global directional light, origin should be interpreted as a normal vector -#define REF_RESTRICT_DLIGHT ( 1 << 1 ) // dlight is restricted to following entities -#define REF_INVERSE_DLIGHT ( 1 << 0 ) // inverse dlight for dynamic shadows - // bit field limits #define MAX_STATS 16 #define MAX_PERSISTANT 16 diff --git a/src/engine/renderer/GLUtils.h b/src/engine/renderer/GLUtils.h index 9ea2aff90d..e7a3a635ed 100644 --- a/src/engine/renderer/GLUtils.h +++ b/src/engine/renderer/GLUtils.h @@ -45,7 +45,6 @@ struct GLConfig int colorBits; - glDriverType_t driverType; glHardwareType_t hardwareType; textureCompression_t textureCompression; diff --git a/src/engine/renderer/tr_local.h b/src/engine/renderer/tr_local.h index 0e41ece957..9d7d63e3e6 100644 --- a/src/engine/renderer/tr_local.h +++ b/src/engine/renderer/tr_local.h @@ -962,12 +962,6 @@ enum struct Material; struct MaterialSurface; - // [implicit only] enable lightmapping, front-side culling, disable (non-BSP) vertex colors, disable blending - // TODO(0.56): move to the public RegisterShaderFlags_t interface -#define RSF_3D ( BIT( 30 ) ) - -#define RSF_BSP ( BIT ( 29 ) ) - using stageRenderer_t = void(*)(shaderStage_t *); using stageShaderBuildMarker_t = void(*)(const shaderStage_t*); using surfaceDataUpdater_t = void(*)(uint32_t*, shaderStage_t*, bool, bool); diff --git a/src/engine/renderer/tr_scene.cpp b/src/engine/renderer/tr_scene.cpp index 2db9d3d3e7..b26423f947 100644 --- a/src/engine/renderer/tr_scene.cpp +++ b/src/engine/renderer/tr_scene.cpp @@ -283,7 +283,7 @@ RE_AddDynamicLightToScene ydnar: modified dlight system to support separate radius and intensity ===================== */ -void RE_AddDynamicLightToScene( const vec3_t org, float radius, float r, float g, float b, int flags ) +void RE_AddDynamicLightToScene( const vec3_t org, float radius, float r, float g, float b, int /*flags*/) { if ( !glConfig.realtimeLighting || !r_drawDynamicLights.Get() ) { @@ -305,12 +305,6 @@ void RE_AddDynamicLightToScene( const vec3_t org, float radius, float r, float g return; } - if ( flags & REF_INVERSE_DLIGHT ) - { - Log::Warn( "REF_INVERSE_DLIGHT not implemtented" ); - return; - } - refLight_t *light = &backEndData[ tr.smpFrame ]->lights[ r_numLights++ ]; light->rlType = refLightType_t::RL_OMNI; diff --git a/src/engine/renderer/tr_shader.cpp b/src/engine/renderer/tr_shader.cpp index 086fad9ef0..1bf95ed1a8 100644 --- a/src/engine/renderer/tr_shader.cpp +++ b/src/engine/renderer/tr_shader.cpp @@ -6231,9 +6231,6 @@ shader_t *R_FindShader( const char *name, int flags ) return tr.defaultShader; } - // TODO(0.56): RSF_DEFAULT should be 0! - flags &= ~RSF_DEFAULT; - COM_StripExtension3( name, strippedName, sizeof( strippedName ) ); hash = generateHashValue( strippedName, FILE_HASH_SIZE ); diff --git a/src/engine/renderer/tr_types.h b/src/engine/renderer/tr_types.h index deedd1381a..eb0b068c56 100644 --- a/src/engine/renderer/tr_types.h +++ b/src/engine/renderer/tr_types.h @@ -57,16 +57,11 @@ using bool8_t = uint8_t; #define MAX_ENTITIES MAX_REF_ENTITIES // RB: for compatibility // renderfx flags -#define RF_MINLIGHT 0x000001 // always have some light (viewmodel, some items) #define RF_THIRD_PERSON 0x000002 // don't draw through eyes, only mirrors (player bodies, chat sprites) #define RF_FIRST_PERSON 0x000004 // only draw through eyes (view weapon, damage blood blob) #define RF_DEPTHHACK 0x000008 // for view weapon Z crunching #define RF_NOSHADOW 0x000010 // don't add stencil shadows -#define RF_LIGHTING_ORIGIN 0x000020 // use refEntity->lightingOrigin instead of refEntity->origin -// for lighting. This allows entities to sink into the floor -// with their origin going solid, and allows all parts of a -// player to get the same lighting #define RF_SWAPCULL 0x000040 // swap CT_FRONT_SIDED and CT_BACK_SIDED // refdef flags @@ -87,10 +82,13 @@ using glIndex_t = unsigned int; // shader was auto-generated from an image. enum RegisterShaderFlags_t { // nothing - RSF_DEFAULT = BIT( 0 ), + RSF_DEFAULT = 0, // [implicit only] alter filter and wrap type - RSF_2D = BIT( 1 ), + RSF_2D = BIT( 0 ), + + // [implicit only] enable lightmapping, front-side culling, disable (non-BSP) vertex colors, disable blending + RSF_3D = BIT( 1 ), // load images without mipmaps RSF_NOMIP = BIT( 2 ), @@ -103,6 +101,9 @@ enum RegisterShaderFlags_t { // when the shader is used on an entity sprite, face view direction instead of viewer RSF_SPRITE = BIT( 6 ), + + // Probably not useful for cgame. Signals that vertex colors are light values + RSF_BSP = BIT ( 30 ), }; struct polyVert_t @@ -175,8 +176,6 @@ struct refEntity_t qhandle_t hModel; // opaque type outside refresh // most recent data - vec3_t lightingOrigin; // so multi-part models can be lit identically (RF_LIGHTING_ORIGIN) - vec3_t axis[ 3 ]; // rotation vectors bool8_t nonNormalizedAxes; // axis are not normalized, i.e. they have scale vec3_t origin; @@ -251,15 +250,6 @@ enum class textureCompression_t TC_EXT_COMP_S3TC }; -// TODO(0.56): remove. -enum class glDriverType_t -{ - GLDRV_UNKNOWN = -1, - GLDRV_ICD, - GLDRV_STANDALONE, - GLDRV_OPENGL3, -}; - // Keep the list in sdl_glimp.c:reportHardwareType in sync with this enum class glHardwareType_t { diff --git a/src/engine/sys/sdl_glimp.cpp b/src/engine/sys/sdl_glimp.cpp index f3e17e7bb3..28adcf324b 100644 --- a/src/engine/sys/sdl_glimp.cpp +++ b/src/engine/sys/sdl_glimp.cpp @@ -2683,8 +2683,6 @@ of OpenGL */ bool GLimp_Init() { - glConfig.driverType = glDriverType_t::GLDRV_OPENGL3; - r_sdlDriver = Cvar_Get( "r_sdlDriver", "", CVAR_ROM ); r_allowResize = Cvar_Get( "r_allowResize", "0", CVAR_LATCH ); r_displayIndex = Cvar_Get( "r_displayIndex", "0", 0 );