- disable software models

This commit is contained in:
Magnus Norddahl 2018-04-14 22:22:40 +02:00
parent c3bd93a85c
commit ee443b6fb6
3 changed files with 14 additions and 10 deletions

View file

@ -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);

View file

@ -74,6 +74,8 @@ 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)
{ {
if (r_models)
{
int spritenum = thing->sprite; int spritenum = thing->sprite;
bool isPicnumOverride = thing->picnum.isValid(); bool isPicnumOverride = thing->picnum.isValid();
FSpriteModelFrame *modelframe = isPicnumOverride ? nullptr : gl_FindModelFrame(thing->GetClass(), spritenum, thing->frame, !!(thing->flags & MF_DROPPED)); FSpriteModelFrame *modelframe = isPicnumOverride ? nullptr : gl_FindModelFrame(thing->GetClass(), spritenum, thing->frame, !!(thing->flags & MF_DROPPED));
@ -84,6 +86,7 @@ void RenderPolySprite::Render(PolyRenderThread *thread, const PolyClipPlane &cli
PolyRenderModel(thread, PolyRenderer::Instance()->WorldToClip, clipPlane, stencilValue, (float)pos.X, (float)pos.Y, (float)pos.Z, modelframe, thing); PolyRenderModel(thread, PolyRenderer::Instance()->WorldToClip, clipPlane, stencilValue, (float)pos.X, (float)pos.Y, (float)pos.Z, modelframe, thing);
return; return;
} }
}
DVector2 line[2]; DVector2 line[2];
if (!GetLine(thing, line[0], line[1])) if (!GetLine(thing, line[0], line[1]))

View file

@ -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
{ {