feat. set intro scene background to white (#1474)

This commit is contained in:
Fireblade 2026-04-06 13:33:45 -04:00 committed by GitHub
parent 034c313ddf
commit 98a86fc69b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -472,6 +472,8 @@ IDXGISwapChain* g_pSwapChain = nullptr;
ID3D11RenderTargetView* g_pRenderTargetView = nullptr; ID3D11RenderTargetView* g_pRenderTargetView = nullptr;
ID3D11DepthStencilView* g_pDepthStencilView = nullptr; ID3D11DepthStencilView* g_pDepthStencilView = nullptr;
ID3D11Texture2D* g_pDepthStencilBuffer = nullptr; ID3D11Texture2D* g_pDepthStencilBuffer = nullptr;
static const float kClearColorWhite[4] = { 1.0f, 1.0f, 1.0f, 1.0f };
static const float kClearColorBlack[4] = { 0.0f, 0.0f, 0.0f, 1.0f };
// //
// FUNCTION: WndProc(HWND, UINT, WPARAM, LPARAM) // FUNCTION: WndProc(HWND, UINT, WPARAM, LPARAM)
@ -1564,7 +1566,14 @@ int APIENTRY _tWinMain(_In_ HINSTANCE hInstance,
continue; continue;
} }
const float* clearColor = app.GetGameStarted() ? kClearColorBlack : kClearColorWhite;
RenderManager.SetClearColour(clearColor);
RenderManager.StartFrame(); RenderManager.StartFrame();
if (!app.GetGameStarted())
{
RenderManager.SetClearColour(kClearColorWhite); // set intro scene background to white
RenderManager.Clear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
}
#if 0 #if 0
if(pMinecraft->soundEngine->isStreamingWavebankReady() && if(pMinecraft->soundEngine->isStreamingWavebankReady() &&
!pMinecraft->soundEngine->isPlayingStreamingGameMusic() && !pMinecraft->soundEngine->isPlayingStreamingGameMusic() &&