Skip to content

Commit

Permalink
Merge pull request #64 from enen92/clear_color
Browse files Browse the repository at this point in the history
Windows: Clear color (background black)
  • Loading branch information
enen92 authored Oct 28, 2024
2 parents f5e69c3 + 14a5181 commit dc2b8a9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/GreyNetic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,12 @@ void CScreensaverGreyNetic::Stop()
void CScreensaverGreyNetic::Render()
{
#ifdef WIN32
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);

g_pContext->IASetPrimitiveTopology(D3D11_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP);
UINT strides = sizeof(MYCUSTOMVERTEX), offsets = 0;
g_pContext->IASetVertexBuffers(0, 1, &g_pVBuffer, &strides, &offsets);
Expand Down

0 comments on commit dc2b8a9

Please sign in to comment.