mirror of
https://github.com/ZDoom/qzdoom.git
synced 2025-03-10 03:02:21 +00:00
- added a compile option to fully disable the software renderer.
This is mainly for new games which have been designed for hardware rendering. Note that this does not remove the software renderer's code - all it does is to disable the vid_rendermode CVAR by turning it into a static constant with the value 4.
This commit is contained in:
parent
c860e2d732
commit
dab61709f8
6 changed files with 25 additions and 2 deletions
|
@ -27,6 +27,11 @@ if( APPLE )
|
||||||
option( OSX_COCOA_BACKEND "Use native Cocoa backend instead of SDL" ON )
|
option( OSX_COCOA_BACKEND "Use native Cocoa backend instead of SDL" ON )
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
option( ZDOOM_ENABLE_SWR "Enable software renderer" ON )
|
||||||
|
if( NOT ZDOOM_ENABLE_SWR )
|
||||||
|
add_definitions( -DNO_SWRENDERER )
|
||||||
|
endif()
|
||||||
|
|
||||||
target_architecture(TARGET_ARCHITECTURE)
|
target_architecture(TARGET_ARCHITECTURE)
|
||||||
message(STATUS "Architecture is ${TARGET_ARCHITECTURE}")
|
message(STATUS "Architecture is ${TARGET_ARCHITECTURE}")
|
||||||
|
|
||||||
|
|
|
@ -250,6 +250,12 @@ static bool CheckSkipOptionBlock(FScanner &sc)
|
||||||
filter = true;
|
filter = true;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
else if (sc.Compare("SWRender"))
|
||||||
|
{
|
||||||
|
#ifndef NO_SWRENDERER
|
||||||
|
filter = true;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
}
|
}
|
||||||
while (sc.CheckString(","));
|
while (sc.CheckString(","));
|
||||||
sc.MustGetStringName(")");
|
sc.MustGetStringName(")");
|
||||||
|
|
|
@ -231,6 +231,7 @@ CUSTOM_CVAR(Float, i_timescale, 1.0f, CVAR_NOINITCALL | CVAR_VIRTUAL)
|
||||||
|
|
||||||
// PUBLIC DATA DEFINITIONS -------------------------------------------------
|
// PUBLIC DATA DEFINITIONS -------------------------------------------------
|
||||||
|
|
||||||
|
#ifndef NO_SWRENDERER
|
||||||
CUSTOM_CVAR(Int, vid_rendermode, 4, CVAR_ARCHIVE | CVAR_GLOBALCONFIG | CVAR_NOINITCALL)
|
CUSTOM_CVAR(Int, vid_rendermode, 4, CVAR_ARCHIVE | CVAR_GLOBALCONFIG | CVAR_NOINITCALL)
|
||||||
{
|
{
|
||||||
if (self < 0 || self > 4)
|
if (self < 0 || self > 4)
|
||||||
|
@ -251,6 +252,7 @@ CUSTOM_CVAR(Int, vid_rendermode, 4, CVAR_ARCHIVE | CVAR_GLOBALCONFIG | CVAR_NOIN
|
||||||
|
|
||||||
// No further checks needed. All this changes now is which scene drawer the render backend calls.
|
// No further checks needed. All this changes now is which scene drawer the render backend calls.
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
CUSTOM_CVAR (Int, fraglimit, 0, CVAR_SERVERINFO)
|
CUSTOM_CVAR (Int, fraglimit, 0, CVAR_SERVERINFO)
|
||||||
{
|
{
|
||||||
|
|
|
@ -149,7 +149,11 @@ public:
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#ifndef NO_SWRENDERER
|
||||||
EXTERN_CVAR(Int, vid_rendermode)
|
EXTERN_CVAR(Int, vid_rendermode)
|
||||||
|
#else
|
||||||
|
constexpr int vid_rendermode = 4;
|
||||||
|
#endif
|
||||||
|
|
||||||
inline bool V_IsHardwareRenderer()
|
inline bool V_IsHardwareRenderer()
|
||||||
{
|
{
|
||||||
|
|
|
@ -2271,7 +2271,10 @@ OptionMenu VideoModeMenu protected
|
||||||
|
|
||||||
Option "$VIDMNU_PREFERBACKEND", "vid_preferbackend", "PreferBackend"
|
Option "$VIDMNU_PREFERBACKEND", "vid_preferbackend", "PreferBackend"
|
||||||
StaticText " "
|
StaticText " "
|
||||||
|
IfOption(SWRender)
|
||||||
|
{
|
||||||
Option "$VIDMNU_RENDERMODE", "vid_rendermode", "RenderMode"
|
Option "$VIDMNU_RENDERMODE", "vid_rendermode", "RenderMode"
|
||||||
|
}
|
||||||
Option "$VIDMNU_FULLSCREEN", "vid_fullscreen", "YesNo"
|
Option "$VIDMNU_FULLSCREEN", "vid_fullscreen", "YesNo"
|
||||||
|
|
||||||
IfOption(Mac)
|
IfOption(Mac)
|
||||||
|
|
|
@ -47,7 +47,10 @@ OptionMenu VideoOptionsSimple protected
|
||||||
Title "$DSPLYMNU_TITLE"
|
Title "$DSPLYMNU_TITLE"
|
||||||
|
|
||||||
Option "$VIDMNU_PREFERBACKEND", "vid_preferbackend", "PreferBackend"
|
Option "$VIDMNU_PREFERBACKEND", "vid_preferbackend", "PreferBackend"
|
||||||
|
IfOption(SWRender)
|
||||||
|
{
|
||||||
Option "$VIDMNU_RENDERMODE", "vid_rendermode", "RenderMode"
|
Option "$VIDMNU_RENDERMODE", "vid_rendermode", "RenderMode"
|
||||||
|
}
|
||||||
Option "$VIDMNU_FULLSCREEN", "vid_fullscreen", "YesNo"
|
Option "$VIDMNU_FULLSCREEN", "vid_fullscreen", "YesNo"
|
||||||
IfOption(Mac)
|
IfOption(Mac)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue