HomeWildfire Games

Forces GL 2.1 core context creation in VideoMode.
AuditedrP26031

Description

Forces GL 2.1 core context creation in VideoMode.

Event Timeline

Stan added subscribers: nwtour, Stan.Dec 6 2021, 3:12 PM

Should I raise a concern @nwtour (It's better to post bugs on the commit than the revision btw)

nwtour raised a concern with this commit.EditedDec 6 2021, 4:28 PM

IMHO Increasing minimum requirements should be accompanied by a human-readable error handler describing those requirements.

ERROR: SetVideoMode failed in SDL_GL_CreateContext: ("Could not create GL context: GLXBadFBConfig") - it is difficult for a casual user to guess which version of the opengl the developers mean

This commit now has outstanding concerns.Dec 6 2021, 4:28 PM

IMHO Increasing minimum requirements should be accompanied by a human-readable error handler describing those requirements.

ERROR: SetVideoMode failed in SDL_GL_CreateContext: ("Could not create GL context: GLXBadFBConfig") - it is difficult for a casual user to guess which version of the opengl the developers mean

Could you say was the error before the commit? If not which change triggered the error?

nwtour added a comment.EditedDec 6 2021, 6:08 PM

Could you say was the error before the commit?

No, there was no error. Before commit 26031 the game just started

If not which change triggered the error?

I tried all the lines from commit 26031
Commenting this line allows you to launch the game (no forcing the gl version in the environment variable):

--- a/source/ps/VideoMode.cpp
+++ b/source/ps/VideoMode.cpp
@@ -428,7 +428,7 @@ bool CVideoMode::InitSDL()
                SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 2);
                SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 0);
 #else
-               SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_CORE);
+               //SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_CORE);
                SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 2);
                SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 1);
 #endif
$ glxinfo | grep version
server glx version string: 1.4
client glx version string: 1.4
GLX version: 1.4
    Max core profile version: 0.0
    Max compat profile version: 1.4
    Max GLES1 profile version: 1.1
    Max GLES[23] profile version: 2.0
OpenGL version string: 1.4 Mesa 20.1.8

Same issue like nwtour. #6395

nwtour added a comment.Dec 7 2021, 9:15 PM
In rP26031#54568, @Stan wrote:

It's better to post bugs on the commit than the revision btw

Why? By default, the author of the patch is not subscribed to notifications from the commit. He can easily miss a message.

Stan added a comment.Dec 7 2021, 9:49 PM
In rP26031#54568, @Stan wrote:

It's better to post bugs on the commit than the revision btw

Why? By default, the author of the patch is not subscribed to notifications from the commit. He can easily miss a message.

Committer is iirc. And if done properly with @author author is too.

It's also easier to keep track of raised concerns than closed revisions.

nwtour accepted this commit.Dec 10 2021, 10:43 PM
All concerns with this commit have now been addressed.Dec 10 2021, 10:43 PM