From d57fc28eb73e570fca6340c2a037244309b5b463 Mon Sep 17 00:00:00 2001 From: Miguel Borges de Freitas <92enen@gmail.com> Date: Mon, 17 Jun 2024 12:34:29 +0100 Subject: [PATCH] Windows: Make background black --- src/Life.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/Life.cpp b/src/Life.cpp index f117b41..0d3eb47 100644 --- a/src/Life.cpp +++ b/src/Life.cpp @@ -193,8 +193,15 @@ void CScreensaverBiogenesis::Render() #ifndef WIN32 glClearColor(0.0f, 0.0f, 0.0f, 1.0f); glClear(GL_COLOR_BUFFER_BIT); +#else + ID3D11RenderTargetView* renderTargetView; + g_pContext->OMGetRenderTargets(1, &renderTargetView, nullptr); + float clearColor[4] = { 0.0f, 0.0f, 0.0f, 1.0f }; + g_pContext->ClearRenderTargetView(renderTargetView, clearColor); + SAFE_RELEASE(renderTargetView); #endif + if (m_grid.frameCounter++ == m_grid.resetTime) CreateGrid(); Step();