Hello everyone,
I had a very annoying problem with SDL_FULLSCREEN and SDL_OPENGL on
GNU/Linux. I fixed it and thought I should contribute it upstream.
Also, maybe there is an alternate solution which would be simpler.
Please let me know if so.
When I switch to SDL_FULLSCREEN my window on X11 (Ubuntu 9.10 Karmic
with SDL 1.2.13) the OpenGL rendering area (the viewPort) dimensions
are not changed. This is because there is no SDL_VIDEORESIZE event
that is triggered. Is there an other event that I can catch ?
What I have done meanwhile: I get the SDL Display, get the X11 display
using SDL_SysWMinfo.info.x11.display, then I get the width and height
of this X11 display using XDisplayWidth() and XDisplayHeight() from
X11/Xlib.h. Finally, when the SDLK_ESCAPE is pressed, I redimension
the OpenGL rendering area to that size. See
http://bitbucket.org/aalex/toonloop1/src/dae1643beb05/src/sdlshare.cpp
Is there a simple way to do this?
Thanks,–
Alexandre Quessy
http://alexandre.quessy.net/
Hello,
I have just seen SDL_VIDEO_FULLSCREEN_DISPLAY in SDL 1.2.14. I guess
that’s what I should be using, right? I see that 1.2.14 is packaged
for Ubuntu Lucid. (10.04) That’s nice.
a
2010/3/13 Alexandre Quessy <@Alexandre_Quessy>:> Hello everyone,
I had a very annoying problem with SDL_FULLSCREEN and SDL_OPENGL on
GNU/Linux. I fixed it and thought I should contribute it upstream.
Also, maybe there is an alternate solution which would be simpler.
Please let me know if so.
When I switch to SDL_FULLSCREEN my window on X11 (Ubuntu 9.10 Karmic
with SDL 1.2.13) the OpenGL rendering area (the viewPort) dimensions
are not changed. This is because there is no SDL_VIDEORESIZE event
that is triggered. Is there an other event that I can catch ?
What I have done meanwhile: I get the SDL Display, get the X11 display
using SDL_SysWMinfo.info.x11.display, then I get the width and height
of this X11 display using XDisplayWidth() and XDisplayHeight() from
X11/Xlib.h. Finally, when the SDLK_ESCAPE is pressed, I redimension
the OpenGL rendering area to that size. See
http://bitbucket.org/aalex/toonloop1/src/dae1643beb05/src/sdlshare.cpp
Is there a simple way to do this?
Thanks,
Alexandre Quessy
http://alexandre.quessy.net/
–
Alexandre Quessy
http://alexandre.quessy.net/