mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-10 14:51:46 +00:00
- Disable model rendering in the software renderer
This commit is contained in:
parent
6c4f6f94f4
commit
a8b79a28c8
7 changed files with 22 additions and 8 deletions
|
@ -262,7 +262,8 @@ namespace swrenderer
|
|||
drawerargs.SetTextureVStep(sampler.uv_step);
|
||||
drawerargs.SetTextureVPos(sampler.uv_pos);
|
||||
drawerargs.DrawColumn(Thread);
|
||||
drawerargs.DrawDepthColumn(Thread, zbufferdepth);
|
||||
if (r_models)
|
||||
drawerargs.DrawDepthColumn(Thread, zbufferdepth);
|
||||
|
||||
uint64_t step64 = sampler.uv_step;
|
||||
uint64_t pos64 = sampler.uv_pos;
|
||||
|
@ -281,7 +282,8 @@ namespace swrenderer
|
|||
drawerargs.SetTextureVStep(sampler.uv_step);
|
||||
drawerargs.SetTextureVPos(sampler.uv_pos);
|
||||
drawerargs.DrawColumn(Thread);
|
||||
drawerargs.DrawDepthColumn(Thread, zbufferdepth);
|
||||
if (r_models)
|
||||
drawerargs.DrawDepthColumn(Thread, zbufferdepth);
|
||||
|
||||
uint64_t step64 = sampler.uv_step;
|
||||
uint64_t pos64 = sampler.uv_pos;
|
||||
|
@ -308,7 +310,8 @@ namespace swrenderer
|
|||
drawerargs.SetTextureVStep(sampler.uv_step);
|
||||
drawerargs.SetTextureVPos(uv_pos);
|
||||
drawerargs.DrawColumn(Thread);
|
||||
drawerargs.DrawDepthColumn(Thread, zbufferdepth);
|
||||
if (r_models)
|
||||
drawerargs.DrawDepthColumn(Thread, zbufferdepth);
|
||||
|
||||
y += count;
|
||||
left -= count;
|
||||
|
|
|
@ -275,7 +275,8 @@ namespace swrenderer
|
|||
drawerargs.SetDestX2(x2);
|
||||
|
||||
drawerargs.DrawSpan(Thread);
|
||||
drawerargs.DrawDepthSpan(Thread, zbufferdepth);
|
||||
if (r_models)
|
||||
drawerargs.DrawDepthSpan(Thread, zbufferdepth);
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -225,7 +225,8 @@ namespace swrenderer
|
|||
else
|
||||
drawerargs.DrawDoubleSkyColumn(Thread);
|
||||
|
||||
drawerargs.DrawDepthSkyColumn(Thread, 1.0f / 65536.0f);
|
||||
if (r_models)
|
||||
drawerargs.DrawDepthSkyColumn(Thread, 1.0f / 65536.0f);
|
||||
}
|
||||
|
||||
void RenderSkyPlane::DrawSkyColumn(int start_x, int y1, int y2)
|
||||
|
|
|
@ -29,6 +29,8 @@ class DrawerCommandQueue;
|
|||
typedef std::shared_ptr<DrawerCommandQueue> DrawerCommandQueuePtr;
|
||||
class RenderMemory;
|
||||
|
||||
EXTERN_CVAR(Bool, r_models);
|
||||
|
||||
namespace swrenderer
|
||||
{
|
||||
class VisibleSpriteList;
|
||||
|
|
|
@ -963,6 +963,10 @@ namespace swrenderer
|
|||
{
|
||||
RenderVoxel::Project(Thread, thing, sprite.pos, sprite.voxel, sprite.spriteScale, sprite.renderflags, fakeside, fakefloor, fakeceiling, sec, thingShade, foggy, thingColormap);
|
||||
}
|
||||
else if (!r_models)
|
||||
{
|
||||
RenderSprite::Project(Thread, thing, sprite.pos, sprite.tex, sprite.spriteScale, sprite.renderflags, fakeside, fakefloor, fakeceiling, sec, thingShade, foggy, thingColormap);
|
||||
}
|
||||
else
|
||||
{
|
||||
int spritenum = thing->sprite;
|
||||
|
|
|
@ -67,6 +67,7 @@ EXTERN_CVAR(Bool, r_shadercolormaps)
|
|||
EXTERN_CVAR(Int, r_clearbuffer)
|
||||
|
||||
CVAR(Bool, r_scene_multithreaded, false, 0);
|
||||
CVAR(Bool, r_models, false, 0);
|
||||
|
||||
namespace swrenderer
|
||||
{
|
||||
|
@ -156,7 +157,8 @@ namespace swrenderer
|
|||
|
||||
R_UpdateFuzzPosFrameStart();
|
||||
|
||||
MainThread()->Viewport->SetupPolyViewport();
|
||||
if (r_models)
|
||||
MainThread()->Viewport->SetupPolyViewport();
|
||||
|
||||
ActorRenderFlags savedflags = MainThread()->Viewport->viewpoint.camera->renderflags;
|
||||
// Never draw the player unless in chasecam mode
|
||||
|
|
|
@ -88,14 +88,15 @@ namespace swrenderer
|
|||
int floorlight, ceilinglight;
|
||||
F3DFloor *rover;
|
||||
|
||||
renderHUDModel = gl_IsHUDModelForPlayerAvailable(players[consoleplayer].camera->player);
|
||||
|
||||
if (!r_drawplayersprites ||
|
||||
!Thread->Viewport->viewpoint.camera ||
|
||||
!Thread->Viewport->viewpoint.camera->player ||
|
||||
(players[consoleplayer].cheats & CF_CHASECAM) ||
|
||||
(r_deathcamera && Thread->Viewport->viewpoint.camera->health <= 0))
|
||||
return;
|
||||
|
||||
if (r_models && gl_IsHUDModelForPlayerAvailable(players[consoleplayer].camera->player))
|
||||
renderHUDModel = true;
|
||||
|
||||
FDynamicColormap *basecolormap;
|
||||
CameraLight *cameraLight = CameraLight::Instance();
|
||||
|
|
Loading…
Reference in a new issue