Skip to content

Commit

Permalink
Merge pull request #71 from enen92/clearcolor
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 febd54c + 088ffcd commit b275f16
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/StarField.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,12 @@ void CStarField::DoDraw(void)
DisableShader();

#else
ID3D11RenderTargetView* renderTargetView;
m_pContext->OMGetRenderTargets(1, &renderTargetView, nullptr);
float clearColor[4] = { 0.0f, 0.0f, 0.0f, 1.0f };
m_pContext->ClearRenderTargetView(renderTargetView, clearColor);
SAFE_RELEASE(renderTargetView);

m_pContext->Unmap(m_pVBuffer, 0);
m_pContext->IASetPrimitiveTopology(D3D11_PRIMITIVE_TOPOLOGY_LINELIST);
UINT strides = sizeof(ST_CUSTOMVERTEX), offsets = 0;
Expand Down

0 comments on commit b275f16

Please sign in to comment.