Skip to content
Permalink
Browse files

- replace vid_enablevulkan with vid_preferbackend - disabled startup …

…window selector for this (will replace when the startup screen changes are done)
  • Loading branch information
madame-rachelle committed Dec 1, 2019
1 parent 2c751d2 commit bdc7329d32af2e7dab3d17fc0e16e1321618a1bb
Showing with 17 additions and 8 deletions.
  1. +5 −1 src/rendering/v_video.cpp
  2. +10 −6 src/win32/hardware.cpp
  3. +2 −1 src/win32/i_system.cpp
@@ -108,12 +108,16 @@ 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.
}

CUSTOM_CVAR(Int, vid_enablevulkan, 0, CVAR_ARCHIVE | CVAR_GLOBALCONFIG | CVAR_NOINITCALL)
CUSTOM_CVAR(Int, vid_preferbackend, 0, CVAR_ARCHIVE | CVAR_GLOBALCONFIG | CVAR_NOINITCALL)
{
// [SP] This may seem pointless - but I don't want to implement live switching just
// yet - I'm pretty sure it's going to require a lot of reinits and destructions to
// do it right without memory leaks

// 0 - OpenGL
// 1 - Vulkan
// 2 - SoftPoly v2

Printf("Changing the video backend requires a restart for " GAMENAME ".\n");
}

@@ -51,7 +51,7 @@
#include "i_system.h"
#include "swrenderer/r_swrenderer.h"

EXTERN_CVAR(Int, vid_enablevulkan)
EXTERN_CVAR(Int, vid_preferbackend)

extern HWND Window;

@@ -129,11 +129,12 @@ void I_InitGraphics ()
// are the active app. Huh?
}

#if 1 // always use poly backend on this branch, for now.
Video = new Win32PolyVideo();
#else
if (vid_preferbackend == 2)
{
Video = new Win32PolyVideo();
}
#ifdef HAVE_VULKAN
else if (vid_enablevulkan == 1)
else if (vid_preferbackend == 1)
{
// first try Vulkan, if that fails OpenGL
try
@@ -151,8 +152,11 @@ void I_InitGraphics ()
{
Video = new Win32GLVideo();
}
#endif

if (Video == NULL)
Video = new Win32PolyVideo();

// we somehow STILL don't have a display!!
if (Video == NULL)
I_FatalError ("Failed to initialize display");

@@ -119,7 +119,8 @@ EXTERN_CVAR (Bool, queryiwad);
EXTERN_CVAR (Bool, disableautoload)
EXTERN_CVAR (Bool, autoloadlights)
EXTERN_CVAR (Bool, autoloadbrightmaps)
EXTERN_CVAR (Int, vid_enablevulkan)
//EXTERN_CVAR (Int, vid_enablevulkan) // hack - we're just disabling it for now, this code does nothing
uint32_t vid_enablevulkan = 0;

extern HWND Window, ConWindow, GameTitleWindow;
extern HANDLE StdOut;

0 comments on commit bdc7329

Please sign in to comment.
You can’t perform that action at this time.