Browse Source

engine: fix black screen in changelevel

pull/234/head
nillerusr 1 year ago
parent
commit
d719a18fa7
  1. 6
      engine/client.cpp
  2. 6
      engine/modelloader.cpp
  3. 12
      engine/view.cpp

6
engine/client.cpp

@ -1816,14 +1816,14 @@ void CClientState::FinishSignonState_New() @@ -1816,14 +1816,14 @@ void CClientState::FinishSignonState_New()
//
// This is pretty janky, but doesn't really have any cost (and even makes our one-frozen-frame load screen slightly
// less likely to trigger OS "not responding" warnings)
// extern void V_RenderVGuiOnly();
// V_RenderVGuiOnly();
extern void V_RenderSwapBuffers();
V_RenderSwapBuffers();
// Before we do anything with the whitelist, make sure we have the proper map pack mounted
// this will load the .bsp by setting the world model the string list at the hardcoded index 1.
cl.SetModel( 1 );
//V_RenderVGuiOnly();
V_RenderSwapBuffers();
// Check for a new whitelist. It's good to do it early in the connection process here because if we wait until later,
// the client may have loaded some files w/o the proper whitelist restrictions and we'd have to reload them.

6
engine/modelloader.cpp

@ -956,13 +956,13 @@ void EnableHDR( bool bEnable ) @@ -956,13 +956,13 @@ void EnableHDR( bool bEnable )
/// ancient bugs, hence the kill switch.
bool bUpdateOffline = mod_offline_hdr_switch.GetBool();
#ifndef DEDICATED
extern void V_RenderVGuiOnly();
extern void V_RenderSwapBuffers();
#endif
if ( bUpdateOffline )
{
#ifndef DEDICATED
V_RenderVGuiOnly();
V_RenderSwapBuffers();
#endif
materials->ReleaseResources();
}
@ -986,7 +986,7 @@ void EnableHDR( bool bEnable ) @@ -986,7 +986,7 @@ void EnableHDR( bool bEnable )
#ifndef DEDICATED
if ( bUpdateOffline )
{
V_RenderVGuiOnly();
V_RenderSwapBuffers();
}
#endif
}

12
engine/view.cpp

@ -171,6 +171,18 @@ void V_RenderVGuiOnly( void ) @@ -171,6 +171,18 @@ void V_RenderVGuiOnly( void )
Shader_SwapBuffers();
}
void V_RenderSwapBuffers( void )
{
materials->BeginFrame( host_frametime );
g_EngineRenderer->FrameBegin();
UpdateMaterialSystemConfig();
g_EngineRenderer->FrameEnd( );
materials->EndFrame();
Shader_SwapBuffers();
}
void FullViewColorAdjustment( )
{

Loading…
Cancel
Save