Add poly renderer to the menus

This commit is contained in:
Magnus Norddahl 2016-11-21 15:19:24 +01:00
parent 5e9c9c825d
commit fabac78ea8
4 changed files with 10 additions and 8 deletions

View file

@ -63,7 +63,7 @@
#include "p_setup.h"
#include "version.h"
CUSTOM_CVAR(Bool, r_newrenderer, 0, CVAR_NOINITCALL)
CUSTOM_CVAR(Bool, r_polyrenderer, 0, CVAR_ARCHIVE | CVAR_GLOBALCONFIG | CVAR_NOINITCALL)
{
if (self == 1 && !hasglnodes)
{
@ -915,7 +915,7 @@ void R_RenderActorView (AActor *actor, bool dontmaplines)
// Link the polyobjects right before drawing the scene to reduce the amounts of calls to this function
PO_LinkToSubsectors();
InSubsector = NULL;
if (!r_newrenderer)
if (!r_polyrenderer)
{
R_RenderBSPNode(nodes + numnodes - 1); // The head node is the last node output.
}
@ -932,7 +932,7 @@ void R_RenderActorView (AActor *actor, bool dontmaplines)
if (viewactive)
{
PlaneCycles.Clock();
if (!r_newrenderer)
if (!r_polyrenderer)
{
R_DrawPlanes();
R_DrawPortals();
@ -953,7 +953,7 @@ void R_RenderActorView (AActor *actor, bool dontmaplines)
NetUpdate ();
MaskedCycles.Clock();
if (!r_newrenderer)
if (!r_polyrenderer)
R_DrawMasked ();
MaskedCycles.Unclock();

View file

@ -47,7 +47,7 @@
#include "r_poly.h"
EXTERN_CVAR(Bool, r_shadercolormaps)
EXTERN_CVAR(Bool, r_newrenderer) // [SP] dpJudas's new renderer
EXTERN_CVAR(Bool, r_polyrenderer) // [SP] dpJudas's new renderer
EXTERN_CVAR(Float, maxviewpitch) // [SP] CVAR from GZDoom
void R_SWRSetWindow(int windowSize, int fullWidth, int fullHeight, int stHeight, float trueratio);
@ -242,7 +242,7 @@ void FSoftwareRenderer::WriteSavePic (player_t *player, FileWriter *file, int wi
void FSoftwareRenderer::DrawRemainingPlayerSprites()
{
if (!r_newrenderer)
if (!r_polyrenderer)
{
R_DrawRemainingPlayerSprites();
}
@ -262,12 +262,12 @@ void FSoftwareRenderer::DrawRemainingPlayerSprites()
int FSoftwareRenderer::GetMaxViewPitch(bool down)
{
return (r_newrenderer) ? int(maxviewpitch) : (down ? MAX_DN_ANGLE : MAX_UP_ANGLE);
return (r_polyrenderer) ? int(maxviewpitch) : (down ? MAX_DN_ANGLE : MAX_UP_ANGLE);
}
bool FSoftwareRenderer::RequireGLNodes()
{
return r_newrenderer;
return r_polyrenderer;
}
//==========================================================================

View file

@ -2152,6 +2152,7 @@ MODMNU_CHIPOMATIC = "Chip-o-matic";
RNDMNU_TITLE = "CHANGE RENDERER";
RNDMNU_RENDERER = "Hardware Acceleration";
RNDMNU_TRUECOLOR = "Software Truecolor Mode";
RNDMNU_POLY = "Poly Renderer (experimental)";
RNDMNU_CANVAS = "Software Canvas";
// Video Options

View file

@ -1773,6 +1773,7 @@ OptionMenu RendererMenu
Title "$RNDMNU_TITLE"
Option "$RNDMNU_RENDERER", "vid_renderer", "PolyDoom"
Option "$RNDMNU_TRUECOLOR", "swtruecolor", "OnOff"
Option "$RNDMNU_POLY", "r_polyrenderer", "OnOff"
IfOption(Windows)
{
Option "$RNDMNU_CANVAS", "vid_used3d", "D3DGL"