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;
|
RenderTarget = target;
|
||||||
RenderToCanvas = false;
|
RenderToCanvas = false;
|
||||||
|
|
||||||
RenderActorView(player->mo, false);
|
RenderActorView(player->mo, true, false);
|
||||||
|
|
||||||
Threads.MainThread()->FlushDrawQueue();
|
Threads.MainThread()->FlushDrawQueue();
|
||||||
|
|
||||||
|
@ -102,7 +102,7 @@ void PolyRenderer::RenderViewToCanvas(AActor *actor, DCanvas *canvas, int x, int
|
||||||
viewactive = true;
|
viewactive = true;
|
||||||
|
|
||||||
// Render:
|
// Render:
|
||||||
RenderActorView(actor, dontmaplines);
|
RenderActorView(actor, false, dontmaplines);
|
||||||
Threads.MainThread()->FlushDrawQueue();
|
Threads.MainThread()->FlushDrawQueue();
|
||||||
DrawerThreads::WaitForWorkers();
|
DrawerThreads::WaitForWorkers();
|
||||||
|
|
||||||
|
@ -119,7 +119,7 @@ void PolyRenderer::RenderViewToCanvas(AActor *actor, DCanvas *canvas, int x, int
|
||||||
RenderTarget = savedRenderTarget;
|
RenderTarget = savedRenderTarget;
|
||||||
}
|
}
|
||||||
|
|
||||||
void PolyRenderer::RenderActorView(AActor *actor, bool dontmaplines)
|
void PolyRenderer::RenderActorView(AActor *actor, bool drawpsprites, bool dontmaplines)
|
||||||
{
|
{
|
||||||
PolyTotalBatches = 0;
|
PolyTotalBatches = 0;
|
||||||
PolyTotalTriangles = 0;
|
PolyTotalTriangles = 0;
|
||||||
|
@ -181,7 +181,9 @@ void PolyRenderer::RenderActorView(AActor *actor, bool dontmaplines)
|
||||||
mainViewpoint.StencilValue = GetNextStencilValue();
|
mainViewpoint.StencilValue = GetNextStencilValue();
|
||||||
Scene.CurrentViewpoint = &mainViewpoint;
|
Scene.CurrentViewpoint = &mainViewpoint;
|
||||||
Scene.Render(&mainViewpoint);
|
Scene.Render(&mainViewpoint);
|
||||||
PlayerSprites.Render(Threads.MainThread());
|
if (drawpsprites)
|
||||||
|
PlayerSprites.Render(Threads.MainThread());
|
||||||
|
|
||||||
Scene.CurrentViewpoint = nullptr;
|
Scene.CurrentViewpoint = nullptr;
|
||||||
|
|
||||||
if (Viewpoint.camera)
|
if (Viewpoint.camera)
|
||||||
|
|
|
@ -71,7 +71,7 @@ public:
|
||||||
FLevelLocals *Level;
|
FLevelLocals *Level;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void RenderActorView(AActor *actor, bool dontmaplines);
|
void RenderActorView(AActor *actor, bool drawpsprites, bool dontmaplines);
|
||||||
void SetSceneViewport();
|
void SetSceneViewport();
|
||||||
|
|
||||||
RenderPolyPlayerSprites PlayerSprites;
|
RenderPolyPlayerSprites PlayerSprites;
|
||||||
|
|
Loading…
Reference in a new issue