Skip to content

Commit 5936916

Browse files
authored
Engine swapchain validation error fixes (#3525)
* Don't DrawInitialWindowImage in ToolsMode * Remove UpdateWindowSize call during editor startup
1 parent af0204f commit 5936916

File tree

2 files changed

+0
-22
lines changed

2 files changed

+0
-22
lines changed

engine/Definitions/engine/engine.globals.def

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -66,27 +66,6 @@ native static class global as NativeEngine.EngineGlobal
6666
bool SourceEngineFrame( CMaterialSystem2AppSystemDict appDict, double currentTime, double previousTime );
6767
void SourceEngineShutdown( CMaterialSystem2AppSystemDict appDict, bool forced );
6868

69-
inline void UpdateWindowSize()
70-
{
71-
VideoModeChange_t* pModeChange = g_pEngineServiceMgr->GetVideoModeChange();
72-
if ( pModeChange )
73-
{
74-
g_pRenderService->SetVideoMode( pModeChange->m_deviceInfo );
75-
pModeChange->ModeChangeComplete();
76-
}
77-
78-
SwapChainHandle_t m_hSwapChain = g_pEngineServiceMgr->GetEngineSwapChain();
79-
RenderViewport_t renderViewport;
80-
renderViewport.Init( 0, 0, 512, 512, 0, 1 );
81-
82-
CRenderContextPtr pRenderContext( g_pRenderDevice, RenderTargetDesc_t( m_hSwapChain, RENDER_SRGB ), "Clear" );
83-
pRenderContext->Clear( Vector4D( 0, 0, 0, 0 ) );
84-
pRenderContext->SetViewports( 1, &renderViewport );
85-
86-
pRenderContext->Submit();
87-
g_pRenderDevice->Present( m_hSwapChain );
88-
}
89-
9069
inline float GetDiagonalDpi()
9170
{
9271
return Plat_GetDPI();

engine/Sandbox.Tools/Editor/EditorMainWindow.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,6 @@ internal void Startup()
407407
g_pToolFramework2.SetStallMonitorMainThreadWindow( _widget );
408408

409409
OnStartupLoadingFinished();
410-
NativeEngine.EngineGlobal.UpdateWindowSize();
411410
}
412411

413412
[Event( "refresh" )]

0 commit comments

Comments
 (0)