Skip to content

Commit d719a18

Browse files
committed
engine: fix black screen in changelevel
1 parent e392686 commit d719a18

File tree

3 files changed

+18
-6
lines changed

3 files changed

+18
-6
lines changed

engine/client.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1816,14 +1816,14 @@ void CClientState::FinishSignonState_New()
18161816
//
18171817
// This is pretty janky, but doesn't really have any cost (and even makes our one-frozen-frame load screen slightly
18181818
// less likely to trigger OS "not responding" warnings)
1819-
// extern void V_RenderVGuiOnly();
1820-
// V_RenderVGuiOnly();
1819+
extern void V_RenderSwapBuffers();
1820+
V_RenderSwapBuffers();
18211821

18221822
// Before we do anything with the whitelist, make sure we have the proper map pack mounted
18231823
// this will load the .bsp by setting the world model the string list at the hardcoded index 1.
18241824
cl.SetModel( 1 );
18251825

1826-
//V_RenderVGuiOnly();
1826+
V_RenderSwapBuffers();
18271827

18281828
// Check for a new whitelist. It's good to do it early in the connection process here because if we wait until later,
18291829
// the client may have loaded some files w/o the proper whitelist restrictions and we'd have to reload them.

engine/modelloader.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -956,13 +956,13 @@ void EnableHDR( bool bEnable )
956956
/// ancient bugs, hence the kill switch.
957957
bool bUpdateOffline = mod_offline_hdr_switch.GetBool();
958958
#ifndef DEDICATED
959-
extern void V_RenderVGuiOnly();
959+
extern void V_RenderSwapBuffers();
960960
#endif
961961

962962
if ( bUpdateOffline )
963963
{
964964
#ifndef DEDICATED
965-
V_RenderVGuiOnly();
965+
V_RenderSwapBuffers();
966966
#endif
967967
materials->ReleaseResources();
968968
}
@@ -986,7 +986,7 @@ void EnableHDR( bool bEnable )
986986
#ifndef DEDICATED
987987
if ( bUpdateOffline )
988988
{
989-
V_RenderVGuiOnly();
989+
V_RenderSwapBuffers();
990990
}
991991
#endif
992992
}

engine/view.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,18 @@ void V_RenderVGuiOnly( void )
171171
Shader_SwapBuffers();
172172
}
173173

174+
void V_RenderSwapBuffers( void )
175+
{
176+
materials->BeginFrame( host_frametime );
177+
g_EngineRenderer->FrameBegin();
178+
179+
UpdateMaterialSystemConfig();
180+
181+
g_EngineRenderer->FrameEnd( );
182+
materials->EndFrame();
183+
184+
Shader_SwapBuffers();
185+
}
174186

175187
void FullViewColorAdjustment( )
176188
{

0 commit comments

Comments
 (0)