Skip to content

Commit

Permalink
- set default backend to Vulkan, if Vulkan fails go GLES not OpenGL
Browse files Browse the repository at this point in the history
  • Loading branch information
madame-rachelle committed Oct 1, 2023
1 parent 40ec46e commit d33f269
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/common/platform/posix/cocoa/i_video.mm
Expand Up @@ -462,7 +462,7 @@ void SetupOpenGLView(CocoaWindow* const window, const OpenGLProfile profile)
if (fb == nullptr)
{
#ifdef HAVE_GLES2
if(V_GetBackend() == 2)
if(V_GetBackend() != 0)
fb = new OpenGLESRenderer::OpenGLFrameBuffer(0, vid_fullscreen);
else
#endif
Expand Down
2 changes: 1 addition & 1 deletion src/common/platform/posix/sdl/sdlglvideo.cpp
Expand Up @@ -315,7 +315,7 @@ DFrameBuffer *SDLVideo::CreateFrameBuffer ()
if (fb == nullptr)
{
#ifdef HAVE_GLES2
if (V_GetBackend() == 2)
if (V_GetBackend() != 0)
fb = new OpenGLESRenderer::OpenGLFrameBuffer(0, vid_fullscreen);
else
#endif
Expand Down
2 changes: 1 addition & 1 deletion src/common/platform/win32/win32glvideo.cpp
Expand Up @@ -109,7 +109,7 @@ DFrameBuffer *Win32GLVideo::CreateFrameBuffer()
SystemGLFrameBuffer *fb;

#ifdef HAVE_GLES2
if (V_GetBackend() == 2)
if (V_GetBackend() != 0)
fb = new OpenGLESRenderer::OpenGLFrameBuffer(m_hMonitor, vid_fullscreen);
else
#endif
Expand Down
2 changes: 1 addition & 1 deletion src/common/rendering/v_video.cpp
Expand Up @@ -93,7 +93,7 @@ CUSTOM_CVAR(Int, vid_maxfps, 200, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
}
}

CUSTOM_CVAR(Int, vid_preferbackend, 0, CVAR_ARCHIVE | CVAR_GLOBALCONFIG | CVAR_NOINITCALL)
CUSTOM_CVAR(Int, vid_preferbackend, 1, 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
Expand Down

0 comments on commit d33f269

Please sign in to comment.