mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-10 23:02:08 +00:00
- do not render player sprites to canvases in the hardware renderer.
This commit is contained in:
parent
0ca7723c0e
commit
2fa5a88701
4 changed files with 9 additions and 9 deletions
|
@ -111,12 +111,12 @@ void FGLRenderer::DrawScene(HWDrawInfo *di, int drawmode)
|
||||||
if (vp.camera != nullptr)
|
if (vp.camera != nullptr)
|
||||||
{
|
{
|
||||||
ActorRenderFlags savedflags = vp.camera->renderflags;
|
ActorRenderFlags savedflags = vp.camera->renderflags;
|
||||||
di->CreateScene();
|
di->CreateScene(drawmode == DM_MAINVIEW);
|
||||||
vp.camera->renderflags = savedflags;
|
vp.camera->renderflags = savedflags;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
di->CreateScene();
|
di->CreateScene(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
glDepthMask(true);
|
glDepthMask(true);
|
||||||
|
|
|
@ -796,7 +796,7 @@ void HWDrawInfo::RenderBSPNode (void *node)
|
||||||
DoSubsector ((subsector_t *)((uint8_t *)node - 1));
|
DoSubsector ((subsector_t *)((uint8_t *)node - 1));
|
||||||
}
|
}
|
||||||
|
|
||||||
void HWDrawInfo::RenderBSP(void *node)
|
void HWDrawInfo::RenderBSP(void *node, bool drawpsprites)
|
||||||
{
|
{
|
||||||
Bsp.Clock();
|
Bsp.Clock();
|
||||||
|
|
||||||
|
@ -829,6 +829,6 @@ void HWDrawInfo::RenderBSP(void *node)
|
||||||
// Process all the sprites on the current portal's back side which touch the portal.
|
// Process all the sprites on the current portal's back side which touch the portal.
|
||||||
if (mCurrentPortal != nullptr) mCurrentPortal->RenderAttached(this);
|
if (mCurrentPortal != nullptr) mCurrentPortal->RenderAttached(this);
|
||||||
|
|
||||||
|
if (drawpsprites)
|
||||||
PreparePlayerSprites(Viewpoint.sector, in_area);
|
PreparePlayerSprites(Viewpoint.sector, in_area);
|
||||||
}
|
}
|
||||||
|
|
|
@ -421,7 +421,7 @@ GLDecal *HWDrawInfo::AddDecal(bool onmirror)
|
||||||
//
|
//
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
void HWDrawInfo::CreateScene()
|
void HWDrawInfo::CreateScene(bool drawpsprites)
|
||||||
{
|
{
|
||||||
const auto &vp = Viewpoint;
|
const auto &vp = Viewpoint;
|
||||||
angle_t a1 = FrustumAngle();
|
angle_t a1 = FrustumAngle();
|
||||||
|
@ -436,7 +436,7 @@ void HWDrawInfo::CreateScene()
|
||||||
screen->mVertexData->Map();
|
screen->mVertexData->Map();
|
||||||
screen->mLights->Map();
|
screen->mLights->Map();
|
||||||
|
|
||||||
RenderBSP(Level->HeadNode());
|
RenderBSP(Level->HeadNode(), drawpsprites);
|
||||||
|
|
||||||
// And now the crappy hacks that have to be done to avoid rendering anomalies.
|
// And now the crappy hacks that have to be done to avoid rendering anomalies.
|
||||||
// These cannot be multithreaded when the time comes because all these depend
|
// These cannot be multithreaded when the time comes because all these depend
|
||||||
|
|
|
@ -237,7 +237,7 @@ public:
|
||||||
|
|
||||||
HWPortal * FindPortal(const void * src);
|
HWPortal * FindPortal(const void * src);
|
||||||
void RenderBSPNode(void *node);
|
void RenderBSPNode(void *node);
|
||||||
void RenderBSP(void *node);
|
void RenderBSP(void *node, bool drawpsprites);
|
||||||
|
|
||||||
static HWDrawInfo *StartDrawInfo(FLevelLocals *lev, HWDrawInfo *parent, FRenderViewpoint &parentvp, HWViewpointUniforms *uniforms);
|
static HWDrawInfo *StartDrawInfo(FLevelLocals *lev, HWDrawInfo *parent, FRenderViewpoint &parentvp, HWViewpointUniforms *uniforms);
|
||||||
void StartScene(FRenderViewpoint &parentvp, HWViewpointUniforms *uniforms);
|
void StartScene(FRenderViewpoint &parentvp, HWViewpointUniforms *uniforms);
|
||||||
|
@ -246,7 +246,7 @@ public:
|
||||||
void SetViewArea();
|
void SetViewArea();
|
||||||
int SetFullbrightFlags(player_t *player);
|
int SetFullbrightFlags(player_t *player);
|
||||||
|
|
||||||
void CreateScene();
|
void CreateScene(bool drawpsprites);
|
||||||
void RenderScene(FRenderState &state);
|
void RenderScene(FRenderState &state);
|
||||||
void RenderTranslucent(FRenderState &state);
|
void RenderTranslucent(FRenderState &state);
|
||||||
void RenderPortal(HWPortal *p, FRenderState &state, bool usestencil);
|
void RenderPortal(HWPortal *p, FRenderState &state, bool usestencil);
|
||||||
|
|
Loading…
Reference in a new issue