Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 0 additions & 24 deletions src/engine/renderer/tr_init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1439,30 +1439,6 @@ ScreenshotCmd screenshotPNGRegistration("screenshotPNG", ssFormat_t::SSF_PNG, "p
tr.lightMode = lightMode_t::VERTEX;
}

if ( r_reflectionMapping.Get() ) {
glConfig.reflectionMappingAvailable = true;

if ( !r_normalMapping->integer ) {
glConfig.reflectionMappingAvailable = false;
Log::Warn( "Unable to use static reflections without normal mapping, make sure you enable r_normalMapping" );
}

if ( !r_deluxeMapping->integer ) {
glConfig.reflectionMappingAvailable = false;
Log::Warn( "Unable to use static reflections without deluxe mapping, make sure you enable r_deluxeMapping" );
}

if ( !r_specularMapping->integer ) {
glConfig.reflectionMappingAvailable = false;
Log::Warn( "Unable to use static reflections without specular mapping, make sure you enable r_specularMapping" );
}

if ( r_physicalMapping->integer ) {
glConfig.reflectionMappingAvailable = false;
Log::Warn( "Unable to use static reflections with physical mapping, make sure you disable r_physicalMapping" );
}
}

backEndData[ 0 ] = ( backEndData_t * ) ri.Hunk_Alloc( sizeof( *backEndData[ 0 ] ), ha_pref::h_low );
backEndData[ 0 ]->polys = ( srfPoly_t * ) ri.Hunk_Alloc( r_maxPolys->integer * sizeof( srfPoly_t ), ha_pref::h_low );
backEndData[ 0 ]->polyVerts = ( polyVert_t * ) ri.Hunk_Alloc( r_maxPolyVerts->integer * sizeof( polyVert_t ), ha_pref::h_low );
Expand Down
26 changes: 26 additions & 0 deletions src/engine/sys/sdl_glimp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2812,6 +2812,32 @@ static void GLimp_EnableAvailableFeatures()
// This will be enabled later on by R_BuildCubeMaps()
glConfig.reflectionMapping = false;

glConfig.reflectionMappingAvailable = r_reflectionMapping.Get();
if ( glConfig.reflectionMappingAvailable )
{
if ( !r_normalMapping->integer ) {
Log::Warn( "Unable to use static reflections without normal mapping, make sure you enable r_normalMapping" );
}

if ( !r_deluxeMapping->integer ) {
Log::Warn( "Unable to use static reflections without deluxe mapping, make sure you enable r_deluxeMapping" );
}

if ( !r_specularMapping->integer ) {
Log::Warn( "Unable to use static reflections without specular mapping, make sure you enable r_specularMapping" );
}

if ( r_physicalMapping->integer ) {
Log::Warn( "Unable to use static reflections with physical mapping, make sure you disable r_physicalMapping" );
}

glConfig.reflectionMappingAvailable =
glConfig.normalMapping &&
glConfig.deluxeMapping &&
glConfig.specularMapping &&
!glConfig.physicalMapping;
}

/* Intel GMA 3 only has 4 tex indirections, which is not enough for some shaders.
For example blurX requires 6, contrast requires 5, motionblur requires 5…
For comparison, ATI R300, R400 and R500 have 16 of them. We don't need a finer check as early R300
Expand Down
Loading