mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-11 15:22:15 +00:00
- disable software models
This commit is contained in:
parent
c3bd93a85c
commit
ee443b6fb6
3 changed files with 14 additions and 10 deletions
|
@ -34,6 +34,7 @@
|
||||||
EXTERN_CVAR(Bool, r_drawplayersprites)
|
EXTERN_CVAR(Bool, r_drawplayersprites)
|
||||||
EXTERN_CVAR(Bool, r_deathcamera)
|
EXTERN_CVAR(Bool, r_deathcamera)
|
||||||
EXTERN_CVAR(Bool, r_fullbrightignoresectorcolor)
|
EXTERN_CVAR(Bool, r_fullbrightignoresectorcolor)
|
||||||
|
EXTERN_CVAR(Bool, r_models)
|
||||||
|
|
||||||
void RenderPolyPlayerSprites::Render(PolyRenderThread *thread)
|
void RenderPolyPlayerSprites::Render(PolyRenderThread *thread)
|
||||||
{
|
{
|
||||||
|
@ -59,7 +60,7 @@ void RenderPolyPlayerSprites::Render(PolyRenderThread *thread)
|
||||||
(r_deathcamera && viewpoint.camera->health <= 0))
|
(r_deathcamera && viewpoint.camera->health <= 0))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
renderHUDModel = gl_IsHUDModelForPlayerAvailable(players[consoleplayer].camera->player);
|
renderHUDModel = r_models && gl_IsHUDModelForPlayerAvailable(players[consoleplayer].camera->player);
|
||||||
|
|
||||||
PolyTransferHeights fakeflat(viewpoint.camera->subsector);
|
PolyTransferHeights fakeflat(viewpoint.camera->subsector);
|
||||||
|
|
||||||
|
|
|
@ -74,15 +74,18 @@ bool RenderPolySprite::GetLine(AActor *thing, DVector2 &left, DVector2 &right)
|
||||||
|
|
||||||
void RenderPolySprite::Render(PolyRenderThread *thread, const PolyClipPlane &clipPlane, AActor *thing, subsector_t *sub, uint32_t stencilValue, float t1, float t2)
|
void RenderPolySprite::Render(PolyRenderThread *thread, const PolyClipPlane &clipPlane, AActor *thing, subsector_t *sub, uint32_t stencilValue, float t1, float t2)
|
||||||
{
|
{
|
||||||
int spritenum = thing->sprite;
|
if (r_models)
|
||||||
bool isPicnumOverride = thing->picnum.isValid();
|
|
||||||
FSpriteModelFrame *modelframe = isPicnumOverride ? nullptr : gl_FindModelFrame(thing->GetClass(), spritenum, thing->frame, !!(thing->flags & MF_DROPPED));
|
|
||||||
if (modelframe)
|
|
||||||
{
|
{
|
||||||
const auto &viewpoint = PolyRenderer::Instance()->Viewpoint;
|
int spritenum = thing->sprite;
|
||||||
DVector3 pos = thing->InterpolatedPosition(viewpoint.TicFrac);
|
bool isPicnumOverride = thing->picnum.isValid();
|
||||||
PolyRenderModel(thread, PolyRenderer::Instance()->WorldToClip, clipPlane, stencilValue, (float)pos.X, (float)pos.Y, (float)pos.Z, modelframe, thing);
|
FSpriteModelFrame *modelframe = isPicnumOverride ? nullptr : gl_FindModelFrame(thing->GetClass(), spritenum, thing->frame, !!(thing->flags & MF_DROPPED));
|
||||||
return;
|
if (modelframe)
|
||||||
|
{
|
||||||
|
const auto &viewpoint = PolyRenderer::Instance()->Viewpoint;
|
||||||
|
DVector3 pos = thing->InterpolatedPosition(viewpoint.TicFrac);
|
||||||
|
PolyRenderModel(thread, PolyRenderer::Instance()->WorldToClip, clipPlane, stencilValue, (float)pos.X, (float)pos.Y, (float)pos.Z, modelframe, thing);
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
DVector2 line[2];
|
DVector2 line[2];
|
||||||
|
|
|
@ -66,7 +66,7 @@ void PeekThreadedErrorPane();
|
||||||
EXTERN_CVAR(Int, r_clearbuffer)
|
EXTERN_CVAR(Int, r_clearbuffer)
|
||||||
|
|
||||||
CVAR(Bool, r_scene_multithreaded, false, 0);
|
CVAR(Bool, r_scene_multithreaded, false, 0);
|
||||||
CVAR(Bool, r_models, true, 0);
|
CVAR(Bool, r_models, false, 0);
|
||||||
|
|
||||||
namespace swrenderer
|
namespace swrenderer
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue