Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NBlood] OpenGL support on Raspberry Pi 4 #749

Open
vanfanel opened this issue Aug 21, 2023 · 4 comments
Open

[NBlood] OpenGL support on Raspberry Pi 4 #749

vanfanel opened this issue Aug 21, 2023 · 4 comments

Comments

@vanfanel
Copy link

Hello,

I just built latest NBlood on GNU/Linux aarch64 (Raspberry Pi 4, latest stable MESA) with OpenGL support.
It built and linked with no problem, by doing:

make blood -j3 USE_OPENGL=1

But when running the engine I get:


1.6992s ERROR| Unable to set video mode: SDL_GL_CreateContext failed: Could not create EGL context (call to eglCreateContext failed, reporting an error of EGL_BAD_ATTRIBUTE).                                               
 1.6993s ERROR| Video driver does not support OpenGL version 2 or greater; all OpenGL modes are unavailable.

But that's NOT true at all. The Pi4 supports desktop OpenGL up to version 2.1, and GLES up to 3.1.

Tried to fix it by editing source/build/src/sdlayer.cpp and adding these flags before SDL_GL_ATTRIBUTES(i, sdlayer_gl_attributes):


             { SDL_GL_CONTEXT_MAJOR_VERSION, 2 }, 
              { SDL_GL_CONTEXT_MINOR_VERSION, 0 },

Also tried with { SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_ES },, but it's still complaining about my driver not having OpenGL 2 compatibility, which as I said is false.

Any idea on what's going on here? Maybe it's trying to initialize an OpenGL 3.x context? Where? How?

@Jan200101
Copy link
Contributor

Have you tried switching the OpenGL Driver in raspi-config ?

@vanfanel
Copy link
Author

vanfanel commented Aug 22, 2023

@Jan200101 As I said, I am using MESA, which provides the up-to-date full/desktop OpenGL 2.1 support.
Ther legacy closed-source Broadcom driver isn't even installed on the system at all.

@fac3l3ss79
Copy link

fac3l3ss79 commented Aug 26, 2023

Same here on raspberry pi os 64 bit, same issue with nblood and eduke32 alike

@midzer
Copy link

midzer commented Jan 15, 2024

glClientWaitSync is available only if the GL version is 3.2 or greater.

glClientWaitSync and few other functions need a GL Version higher than 2.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants