This patch add OpenGL fullscreen mode and OpenGL HW scaler to SDL1.2 UI.
So we now can do fullscreen without mode change and can resize fuse window to any size.
configure.ac:
- if SDL UI selected -> check OpenGL library available: we can disable OpenGL
- if OpenGL enabled -> enable/disable HW scaler: we can disable hw scaler
- add some printout about OpenGL and hardware scaler
man/fuse.1:
- add description about --opengl-filter-nearest
settings.dat:
- add opengl-filter-nearest setting
ui/scaler/scaler.[ch]:
- add hardware scaler definition
ui/sdl/sdldisplay.[ch]:
- add code to OpenGL scaling, fullscreen and window resize handling. We use a 2D texture to display scaled image. We do it without shaders, so it may work with < OpenGL v2.0 (if hat matters at all :)
ui/sdl/sdlui.c:
- add code to catch SDL_VIDEORESIZE events
Thanks, Gergerly. I've tested your patch and works well on my PC.
I think that a "resizable" scaler name would be more friendly than "hardware" to a non-tech savvy user?
Yes, maybe "resizable" is better. I never found a good name for that...
I attach the patch with scaler renamed to "Resizable".
Last edit: Gergely Szasz 2018-03-18
I can't test this one as the Mac SDL doesn't have OpenGL (at least the one I have).
Sergio: do you think this needs any attention before committing?
Are you sure that it isn't needed different library/header names? On Windows I need opengl32 (ships with Windows) rather than GL. Check the AX_CHECK_GL macro for inspiration: "On the OSX platform, there’s two possible OpenGL implementation. One is the OpenGL that ships with OSX, the other comes with X11/XQuartz"
As far as I can see:
It would be good to test this patch with different machines/platorms.
Related
Patches: #326
Last edit: Sergio Baldoví 2018-04-15
First two points hopefully addressed in branch patches-405-sdl1-opengl-scaler.
I needed to add the following to get GL to be accepted by configure, but still didn't get the Resize filter on the Mac but haven't tried to work out what's going wrong:
I update the patch:
- i included the configure.ac stuff
- added 'resizable' to bash completion
- now timex screen works too
- and when menu is open and we rescale, or move, 'reexpose' the window, the screen is updated.
Only one strange things i encounered: the status bar icons rendered one pixel narrower and lower (from left and top), but when we open the menu, then showed up the full size icons .
I upload three patch:
1. diff from master
2. diff from branch (patches-405-sdl1-opengl-scaler) merged with master
3. diff from current branch (patches-405-sdl1-opengl-scaler)