mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-11 07:12:02 +00:00
- allow OpenGL 3.0 MESA drivers to use vid_glswfb
This commit is contained in:
parent
d0fbdd1314
commit
79fc219afd
2 changed files with 3 additions and 6 deletions
|
@ -43,6 +43,7 @@ static TArray<FString> m_Extensions;
|
|||
RenderContext gl;
|
||||
|
||||
EXTERN_CVAR(Bool, gl_legacy_mode)
|
||||
EXTERN_CVAR(Bool, vid_glswfb)
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
|
@ -207,7 +208,8 @@ void gl_LoadExtensions()
|
|||
|
||||
// The minimum requirement for the modern render path is GL 3.3.
|
||||
// Although some GL 3.1 or 3.2 solutions may theoretically work they are usually too broken or too slow.
|
||||
if (gl_version < 3.3f)
|
||||
// unless, of course, we're simply using this as a software backend...
|
||||
if (gl_version < 3.3f && (!vid_glswfb || gl_version < 3.0f))
|
||||
{
|
||||
gl.legacyMode = true;
|
||||
gl.lightmethod = LM_LEGACY;
|
||||
|
|
|
@ -200,12 +200,7 @@ OpenGLSWFrameBuffer::OpenGLSWFrameBuffer(void *hMonitor, int width, int height,
|
|||
bool isGLES = (glversion && strlen(glversion) > 10 && memcmp(glversion, "OpenGL ES ", 10) == 0);
|
||||
|
||||
UCVarValue value;
|
||||
// GL 3.0 is mostly broken on MESA drivers which really are the only relevant case here that doesn't fulfill the requirements based on version number alone.
|
||||
#ifdef _WIN32
|
||||
value.Bool = !ogl_IsVersionGEQ(3, 0);
|
||||
#else
|
||||
value.Bool = !ogl_IsVersionGEQ(3, 1);
|
||||
#endif
|
||||
gl_legacy_mode.ForceSet (value, CVAR_Bool);
|
||||
|
||||
if (!isGLES && ogl_IsVersionGEQ(3, 0) == 0)
|
||||
|
|
Loading…
Reference in a new issue