- place weapon sprites in a separate render list.

They need to be drawn in a different pass than the 2D overlay HUD so the backend must have them separately.
This commit is contained in:
Christoph Oelckers 2019-12-30 19:29:32 +01:00
parent 7ea053bd90
commit ad24a1ce31
24 changed files with 204 additions and 163 deletions

View file

@ -170,18 +170,6 @@ void GLInstance::InitGLState(int fogmode, int multisample)
OpenGLRenderer::GLRenderer->mBuffers->BindSceneFB(false);
}
void videoShowFrame(int32_t w)
{
OpenGLRenderer::GLRenderer->mBuffers->BlitSceneToTexture(); // Copy the resulting scene to the current post process texture
screen->PostProcessScene(0, nullptr); // at the moment this won't work because there's no guarantee that this is a clean buffer what we get here.
screen->Update();
// After finishing the frame, reset everything for the next frame. This needs to be done better.
screen->BeginFrame();
OpenGLRenderer::GLRenderer->mBuffers->BindSceneFB(false);
}
void GLInstance::Deinit()
{
#if 0
@ -530,7 +518,7 @@ void GLInstance::DrawImGui(ImDrawData* data)
void GLInstance::ClearScreen(PalEntry color)
{
twod.Clear(); // Since we clear the entire screen, all previous draw operations become redundant, so delete them.
twod->Clear(); // Since we clear the entire screen, all previous draw operations become redundant, so delete them.
#if 1
SetViewport(0, 0, xdim, ydim);
@ -540,7 +528,7 @@ void GLInstance::ClearScreen(PalEntry color)
false);
#else
// This must be synchronized with the rest of the 2D operations.
twod.AddColorOnlyQuad(0, 0, xdim, ydim, );
twod->AddColorOnlyQuad(0, 0, xdim, ydim, );
#endif
}