Skip to content

Commit

Permalink
Merge pull request #73 from enen92/clear_Color
Browse files Browse the repository at this point in the history
Windows: Make background black
  • Loading branch information
enen92 authored Oct 28, 2024
2 parents ffe9391 + d57fc28 commit dc4e336
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/Life.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit dc4e336

Please sign in to comment.