mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-10 23:01:59 +00:00
- disable player sprite drawing on canvases for the softpoly renderer.
This commit is contained in:
parent
1a29d39355
commit
0ca7723c0e
2 changed files with 7 additions and 5 deletions
|
@ -68,7 +68,7 @@ void PolyRenderer::RenderView(player_t *player, DCanvas *target, void *videobuff
|
|||
RenderTarget = target;
|
||||
RenderToCanvas = false;
|
||||
|
||||
RenderActorView(player->mo, false);
|
||||
RenderActorView(player->mo, true, false);
|
||||
|
||||
Threads.MainThread()->FlushDrawQueue();
|
||||
|
||||
|
@ -102,7 +102,7 @@ void PolyRenderer::RenderViewToCanvas(AActor *actor, DCanvas *canvas, int x, int
|
|||
viewactive = true;
|
||||
|
||||
// Render:
|
||||
RenderActorView(actor, dontmaplines);
|
||||
RenderActorView(actor, false, dontmaplines);
|
||||
Threads.MainThread()->FlushDrawQueue();
|
||||
DrawerThreads::WaitForWorkers();
|
||||
|
||||
|
@ -119,7 +119,7 @@ void PolyRenderer::RenderViewToCanvas(AActor *actor, DCanvas *canvas, int x, int
|
|||
RenderTarget = savedRenderTarget;
|
||||
}
|
||||
|
||||
void PolyRenderer::RenderActorView(AActor *actor, bool dontmaplines)
|
||||
void PolyRenderer::RenderActorView(AActor *actor, bool drawpsprites, bool dontmaplines)
|
||||
{
|
||||
PolyTotalBatches = 0;
|
||||
PolyTotalTriangles = 0;
|
||||
|
@ -181,7 +181,9 @@ void PolyRenderer::RenderActorView(AActor *actor, bool dontmaplines)
|
|||
mainViewpoint.StencilValue = GetNextStencilValue();
|
||||
Scene.CurrentViewpoint = &mainViewpoint;
|
||||
Scene.Render(&mainViewpoint);
|
||||
if (drawpsprites)
|
||||
PlayerSprites.Render(Threads.MainThread());
|
||||
|
||||
Scene.CurrentViewpoint = nullptr;
|
||||
|
||||
if (Viewpoint.camera)
|
||||
|
|
|
@ -71,7 +71,7 @@ public:
|
|||
FLevelLocals *Level;
|
||||
|
||||
private:
|
||||
void RenderActorView(AActor *actor, bool dontmaplines);
|
||||
void RenderActorView(AActor *actor, bool drawpsprites, bool dontmaplines);
|
||||
void SetSceneViewport();
|
||||
|
||||
RenderPolyPlayerSprites PlayerSprites;
|
||||
|
|
Loading…
Reference in a new issue