Merged some smaller bugfixes from Stephen's branch

This commit is contained in:
Robert Beckebans 2021-02-20 12:03:11 +01:00
parent 58607c2cca
commit c0376eacaf
13 changed files with 27 additions and 19 deletions

View file

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 2.8) # Eric: These are rookie numbers, you need to bump those numbers up.
cmake_minimum_required(VERSION 3.2)
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
project(RBDoom3BFG)

View file

@ -1287,6 +1287,7 @@ void idGameLocal::PopulateEnvironmentProbes()
const idDict* envProbeDef = gameLocal.FindEntityDefDict( "env_probe", false );
if( !envProbeDef )
{
Printf( "entityDef env_probe missing in base/def/" );
return;
}

View file

@ -558,7 +558,7 @@ void idCommonLocal::Frame()
|| ( game && game->InhibitControls() && !IsPlayingDoomClassic() ) || ImGuiTools::ReleaseMouseForTools() )
#else
if( com_pause.GetInteger() || console->Active() || Dialog().IsDialogActive() || session->IsSystemUIShowing()
|| ( game && game->InhibitControls() ) )
|| ( game && game->InhibitControls() ) || ImGuiTools::ReleaseMouseForTools() )
#endif
// RB end, DG end
{

View file

@ -1227,7 +1227,6 @@ retry:
*/
}
/*
=======================
R_LoadCubeImages
@ -1281,6 +1280,7 @@ bool R_LoadCubeImages( const char* imgName, cubeFiles_t extensions, byte* pics[6
{
R_LoadImageProgram( fullName, &pics[i], &width, &height, &thisTime );
}
if( thisTime == FILE_NOT_FOUND_TIMESTAMP )
{
break;

View file

@ -956,6 +956,7 @@ static void R_CreateBrdfLutImage( idImage* image )
// RB end
/*
================
idImageManager::CreateIntrinsicImages

View file

@ -471,6 +471,7 @@ static void R_CheckPortableExtensions()
}
// RB end
idStr extensions_string;
/*

View file

@ -3118,6 +3118,7 @@ void idRenderBackend::DBG_RenderDebugTools( drawSurf_t** drawSurfs, int numDrawS
}
renderLog.OpenMainBlock( MRB_DRAW_DEBUG_TOOLS );
renderLog.OpenBlock( "Render_DebugTools", colorGreen );
RENDERLOG_PRINTF( "---------- RB_RenderDebugTools ----------\n" );
GL_State( GLS_DEFAULT );
@ -3168,6 +3169,7 @@ void idRenderBackend::DBG_RenderDebugTools( drawSurf_t** drawSurfs, int numDrawS
DBG_ShowDebugPolygons();
DBG_ShowTrace( drawSurfs, numDrawSurfs );
renderLog.CloseBlock();
renderLog.CloseMainBlock();
}

View file

@ -2078,6 +2078,11 @@ void idRenderBackend::AmbientPass( const drawSurf_t* const* drawSurfs, int numDr
return;
}
if( !drawSurfs )
{
return;
}
// if we are just doing 2D rendering, no need to fill the depth buffer
if( viewDef->viewEntitys == NULL )
{

View file

@ -329,22 +329,22 @@ public:
void BindShader_TextureVertexColor()
{
BindShader_Builtin( BUILTIN_TEXTURE_VERTEXCOLOR );
};
}
void BindShader_TextureVertexColor_sRGB()
{
BindShader_Builtin( BUILTIN_TEXTURE_VERTEXCOLOR_SRGB );
};
}
void BindShader_TextureVertexColorSkinned()
{
BindShader_Builtin( BUILTIN_TEXTURE_VERTEXCOLOR_SKINNED );
};
}
void BindShader_TextureTexGenVertexColor()
{
BindShader_Builtin( BUILTIN_TEXTURE_TEXGEN_VERTEXCOLOR );
};
}
void BindShader_Interaction()
{

View file

@ -313,7 +313,6 @@ const char* skyDirection[6] = { "_forward", "_back", "_left", "_right", "_up", "
/*
=============================
R_SetNewMode

View file

@ -158,18 +158,19 @@ static void R_RenderGuiSurf( idUserInterface* gui, const drawSurf_t* drawSurf )
float guiModelMatrix[16];
float modelMatrix[16];
guiModelMatrix[0 * 4 + 0] = axis[0][0] * ( 1.0f / 640.0f );
guiModelMatrix[1 * 4 + 0] = axis[1][0] * ( 1.0f / 480.0f );
guiModelMatrix[0 * 4 + 0] = axis[0][0] * ( 1.0f / SCREEN_WIDTH );
guiModelMatrix[1 * 4 + 0] = axis[1][0] * ( 1.0f / SCREEN_HEIGHT );
guiModelMatrix[2 * 4 + 0] = axis[2][0];
guiModelMatrix[3 * 4 + 0] = origin[0];
guiModelMatrix[0 * 4 + 1] = axis[0][1] * ( 1.0f / 640.0f );
guiModelMatrix[1 * 4 + 1] = axis[1][1] * ( 1.0f / 480.0f );
guiModelMatrix[0 * 4 + 1] = axis[0][1] * ( 1.0f / SCREEN_WIDTH );
guiModelMatrix[1 * 4 + 1] = axis[1][1] * ( 1.0f / SCREEN_HEIGHT );
guiModelMatrix[2 * 4 + 1] = axis[2][1];
guiModelMatrix[3 * 4 + 1] = origin[1];
guiModelMatrix[0 * 4 + 2] = axis[0][2] * ( 1.0f / 640.0f );
guiModelMatrix[1 * 4 + 2] = axis[1][2] * ( 1.0f / 480.0f );
guiModelMatrix[0 * 4 + 2] = axis[0][2] * ( 1.0f / SCREEN_WIDTH );
guiModelMatrix[1 * 4 + 2] = axis[1][2] * ( 1.0f / SCREEN_HEIGHT );
guiModelMatrix[2 * 4 + 2] = axis[2][2];
guiModelMatrix[3 * 4 + 2] = origin[2];
@ -204,15 +205,14 @@ void R_AddInGameGuis( const drawSurf_t* const drawSurfs[], const int numDrawSurf
for( int i = 0; i < numDrawSurfs; i++ )
{
const drawSurf_t* drawSurf = drawSurfs[i];
idUserInterface* gui = drawSurf->material->GlobalGui();
idUserInterface* gui = drawSurf->material->GlobalGui();
int guiNum = drawSurf->material->GetEntityGui() - 1;
if( guiNum >= 0 && guiNum < MAX_RENDERENTITY_GUI )
{
if( drawSurf->space->entityDef != NULL )
{
gui = drawSurf->space->entityDef->parms.gui[ guiNum ];
gui = drawSurf->space->entityDef->parms.gui[guiNum];
}
}

View file

@ -542,7 +542,7 @@ void R_RenderView( viewDef_t* parms )
// RB: find closest environment probe
if( tr.viewDef->areaNum != -1 && !tr.viewDef->isSubview )
{
float bestDist = 900000.0f;
float bestDist = idMath::INFINITY;
for( viewEnvprobe_t* vProbe = tr.viewDef->viewEnvprobes; vProbe != NULL; vProbe = vProbe->next )
{

View file

@ -1059,7 +1059,6 @@ static bool GLW_GetWindowDimensions( const glimpParms_t parms, int& x, int& y, i
return true;
}
/*
=======================
GLW_CreateWindow