While trying to build a LSB5.0 compliant* version of SDL2 for my game, I
found that on old linux distributions, SDL2 library do not crash and the
game run but the screen stays black under X11.
Example with i686 arch:
CentOS/RHEL 4
Slackware 12
Mandriva 2006
Ubuntu 5.10
Everything works fine in Ubuntu 10.04 and above.
You will tell me that I am crazy to test that, but there is nothing that
forbids it
I havenât found anything in the wiki that says âminimum X.org version is
x.yâ
Furthermore SDL2 does compile on CentOS 4 so there is something in X11
initialisation that may have changed over time.
Failing that: is it the renderer API that isnât working? I bet itâs a GL 2.0 issue.
âryan.
It fails even in windowed mode (but then the window is white).
The 3 flags below trigger the âblack screenâ bug on CentOS 4.
SDL_RENDERER_ACCELERATED in SDL_CreateRenderer()
SDL_WINDOW_FULLSCREEN_DESKTOP in SDL_CreateWindow()
SDL_WINDOW_OPENGL in SDL_CreateWindow()
It seems that fullscreen mode may not work in CentOS 4.
My game now runs normally in windowed mode by changing this line in my
code :
SDL_CreateRenderer(window, -1 ,SDL_RENDERER_ACCELERATED);
with
SDL_CreateRenderer(window, -1, 0);
Judging by what you just did, Ryanâs suggestion is likely correct that
youâre not being backed by hardware. SDL_RENDERER_ACCELERATED attempts to
use hardware rendering instead of software (ie back onto OpenGL or DirectX).
Do you have your graphics driver installed?On Mon, Feb 22, 2016 at 4:03 PM, Matt <matt.59491 at gmail.com> wrote:
Le 22/02/2016 03:07, Ryan C. Gordon a ?crit :
What can I do to debug this problem ?
Is it fullscreen thatâs broken, by any chance?
Failing that: is it the renderer API that isnât working? I bet itâs a GL
2.0 issue.
âryan.
It fails even in windowed mode (but then the window is white).
The 3 flags below trigger the âblack screenâ bug on CentOS 4.
SDL_RENDERER_ACCELERATED in SDL_CreateRenderer()
SDL_WINDOW_FULLSCREEN_DESKTOP in SDL_CreateWindow()
SDL_WINDOW_OPENGL in SDL_CreateWindow()
It seems that fullscreen mode may not work in CentOS 4.
My game now runs normally in windowed mode by changing this line in my
code :
SDL_CreateRenderer(window, -1 ,SDL_RENDERER_ACCELERATED);
with
SDL_CreateRenderer(window, -1, 0);