Need help running G/Q/ZDoom/ECWolf/Zandronum/3DGE/EDuke32/Raze? Did your computer break? Ask here.
Moderator:GZDoom Developers
Forum rules Contrary to popular belief, we are not all-knowing-all-seeing magical beings!
If you want help you're going to have to provide lots of info. Like what is your hardware, what is your operating system, what version of GZDoom/LZDoom/whatever you're using, what mods you're loading, how you're loading it, what you've already tried for fixing the problem, and anything else that is even remotely relevant to the problem.
We can't magically figure out what it is if you're going to be vague, and if we feel like you're just wasting our time with guessing games we will act like that's what you're really doing and won't help you.
Using video driver KMSDRM
Failed to load OpenGL functions.
...when trying to run it outside Xorg server using the KMSDRM driver of SDL2. I am using a Pi3 where SDL2 runs on GLES2.
In the past, "+vid_renderer=0" was needed for this to work, then "+vid_renderer=0" was not needed, and now it does not work at all.
I believe it has to do with the software surface removal in this new version, but I believe that makes no sense in SDL2 since SDL2 uses GLES/GL surfaces ONLY.
The removals were actually a part of a clean up effort to make the code more manageable on all platforms. The code such as it is can be extended upon if needed to provide support for additional display backends, as long as they're not old and deprecated, but it definitely shouldn't be reverted. That being said, using anything besides X11 was never officially supported by the GZDoom team, and it's kind of one of those things that was on the support status of "oh, it worked? cool!"
@Rachael: So, are you going only OpenGL (aka desktop GL) specific now? No way to run the software renderer on SDL2 anymore?
That really makes no much sense... Why would you leave all other platforms using SDL2 but not desktop GL?
That is correct. The entire rendering backend was switched over to hardware rendering - the software renderer uses it as well to display the screen 2D elements - only the game view is rendered by the CPU. If you want to use any of it in an unaccelerated framebuffer - it'll have to be emulated.
That being said, I am surprised KMS doesn't support OpenGL directly.
It DOES support OpenGL, but not desktop GL but GL_ES (GLES1, GLES2, GLES3...)
So I guess it depends on what you are trying to init and how. Are you using SDL2 to init GL? Where and how? What version are you trying to init?
Luckily GZDoom does support GL_ES - simply set the "gl_es" CVAR to true. Your GPU drivers must support GL_ES 3.0 for this to work, however, or GZDoom will simply fail to load.
The main init code is done in /src/posix/sdl/sdlglvideo.cpp - but some of it will be done in /src/gl_load/gl_interface.cpp
vanfanel wrote:That really makes no much sense... Why would you leave all other platforms using SDL2 but not desktop GL?
It depends what one considers "making sense".
The main problem was that the engine had 3 different backends for the software renderer plus the hardware accelerated backend. Our recent survey clearly shows that the number of users relying on those other backends was far less than 1 %.
If you now consider that maintaining these backends costs time, things will look a lot different. We had to cope with 4 sets of code rendering the 2D stuff and they had wildly differing feature sets and limitations. And the worst of the bunch was in fact the pure software backend which was in a state that it genuinely started blocking the addition of new features.
Sometimes old legacy features need to be removed to make code maintainable again and this was a classic case for that.
Anyway - X11 works fine on the Pi - and you'll have to use regular OpenGL for it to work (GZDoom uses the Legacy path for VideoCore4 chipsets) - if you can get that running with acceleration, for now, GZDoom will continue working.