113 Commits

Author SHA1 Message Date
Johannes Schickel
fe88375ff3 OPENGL: Support GLES2 contexts. 2016-03-16 20:29:25 +01:00
Johannes Schickel
67e2790beb OPENGLSDL: Slight cleanup. 2016-03-16 20:29:25 +01:00
Johannes Schickel
af727afe0c OPENGL: Simplify context type setting. 2016-03-16 20:29:25 +01:00
Johannes Schickel
da062ad1ea OPENGLSDL: Try to use GL(ES) context SDL2 defaults to. 2016-03-16 20:29:25 +01:00
Johannes Schickel
2277144623 OPENGL: Support RGB555 for OpenGL ES output.
This mode should *not* be used by any new engines/code. If someone is going
to use it and says it works with the OpenGL output, please make them wear a
red uniform and beam them onto a remote planet.
2016-03-16 20:29:25 +01:00
Johannes Schickel
d6d3e17d53 OPENGL: Allow runtime specification of OpenGL mode.
Formerly, we required that the OpenGL mode was fixed at compile time. Now we
allow the code to work with whatever it is given at runtime.

It is still possible to force a context type on compile time.
2016-03-16 20:29:25 +01:00
Johannes Schickel
9816e4f350 OPENGL: Remove support for ARGB8888.
This used to be used by Sword25. Since it is not supported by GLES and no
engine code uses it we drop support. Hopefully, this helps people to realize
they should not use that format in their engine.
2016-03-16 20:29:24 +01:00
Johannes Schickel
8f3783da09 OPENGL: Add functionality to query OpenGL functions on runtime.
This can and will be used for future extension usage support.

Tizen changes have been untested.
2016-03-16 20:29:24 +01:00
Johannes Schickel
898773e12f OPENGLSDL: Set proper mouse emulation dimensions.
Formerly we did not initialize the mouse emulation from SdlEventSource
properly. Now hopefully joysticks etc. should work fine with the SDL OpenGL
output too.
2015-12-13 23:53:27 +01:00
Johannes Schickel
fe2ee9ecf5 OPENGL: Refactor screen refresh handling.
Subclasses of OpenGLGraphicsManager are now supposed to supply a refreshScreen
function which handles actual screen updating (for example, buffer swapping).
2015-12-12 22:31:35 +01:00
vanfanel
1eecc41ef6 OPENGLSDL: Request GLES1.1 context with SDL2 for GLES targets. 2015-12-08 21:41:40 +01:00
Johannes Schickel
c300944335 SDL: Add TODO about fullscreen modes to OpenGL SDL code. 2015-05-16 16:57:44 +02:00
Littleboy
ed3a32a91a SDL: Check for NULL when listing available modes via SDL_ListModes
It can be returned when there are no dimensions available for the currently selected pixel format
2015-05-15 23:30:02 -04:00
Johannes Schickel
627d766325 SDL: Add basic abstraction class for the SDL window. 2015-02-16 01:03:29 +01:00
Johannes Schickel
8530997fff SDL: Add experimental support for SDL2.
This is based upon skristiansson's change set to make ScummVM work with SDL2.
2015-01-25 20:23:25 +01:00
Johannes Schickel
3a2db0135d SDL: Refactor WM specific functionality into SdlGraphicsManager. 2015-01-25 18:57:38 +01:00
Filippos Karapetis
d2c69a79fe BACKENDS: Remove trailing whitespace 2014-10-28 15:38:51 +02:00
Alyssa Milburn
48564efc88 OPENGLSDL: Don't ignore events after user-initiated resizes. 2014-07-04 22:37:43 +02:00
Johannes Schickel
dbbc458671 OPENGLSDL: Move time stamp for last video mode set after fallback mode setup. 2014-06-17 23:31:16 +02:00
Johannes Schickel
fff47ac4bd OPENGLSDL: Make workaround for fast resolution changes actually work for WME.
Thanks to fuzzie for noticing this.
2014-06-17 23:21:33 +02:00
Alyssa Milburn
92e02457f5 OPENGLSDL: Always ignore bad resolution changes.
Otherwise we can end up with the wrong resolution when we make
multiple resizes in quick succession.
2014-06-10 22:07:11 +02:00
Johannes Schickel
5883f4cc3f OPENGL/SDL: Default to RGBA8888 (memory layout).
This makes sure the default mode also works for OpenGL ES contexts.
2014-02-12 18:06:29 +01:00
Johannes Schickel
0063568484 OPENGL: Rename notifyContextChange to notifyContextCreate. 2014-02-11 11:10:49 +01:00
Johannes Schickel
b5ca9f5f10 OPENGLSDL: Notify OpenGL manager about context destruction. 2014-02-11 11:10:49 +01:00
Johannes Schickel
cfa6b1b4ae SDL: Further small cleanup related to manager switching. 2013-10-24 00:09:17 +02:00
Johannes Schickel
ea6d38d5f3 SDL: Make activateManager/deactivateManager SdlGraphicsManager specific.
We can do this now that we can use virtual inheritance and dynamic_cast
because we enabled RTTI.
2013-10-24 00:06:32 +02:00
Johannes Schickel
1a56b521b5 SDL: Always initialize video subsystem in initSDL. 2013-10-23 22:58:38 +02:00
Johannes Schickel
6e46e9dfaf SDL: Clean up graphics manager switching slighty.
Sadly this also requires us to extend GraphicsManager for this SDL specific
feature. However, since that's only used in the SDL backend and Tizen it
should be fine for now...
2013-10-23 22:58:34 +02:00
Johannes Schickel
05c347fc8a OPENGL/SDL: Add screenshot support. 2013-10-19 22:18:22 +02:00
Johannes Schickel
50a86463c1 SDL: Use OSD in OpenGL SDL backend. 2013-10-19 22:17:42 +02:00
Johannes Schickel
5ce830b976 SDL: Add a OpenGL SDL backend and hook it into the SDL backend.
The hooking code is nearly exactly the old hooking code. Only the OpenGL SDL
creation has been adapted since it uses a different constructor now.
2013-10-19 22:14:24 +02:00
Johannes Schickel
8a6e57cba1 BACKENDS: Remove OpenGL and OpenGL SDL backend.
This breaks our Tizen port.
2013-10-05 00:20:02 +02:00
Johannes Schickel
d2a536ff89 Revert "OPENGLSDL: Remove HACK in fullscreen toggle mode."
This reverts commit b6f7d697090ca6f90d20f0f2d5661cc4c8b71bf2. This actually
breaks fullscreen mode cycling.
2012-12-10 19:26:13 +01:00
Johannes Schickel
89abab97e3 JANITORIAL: Remove trailing whitespaces.
Powered by:
git ls-files "*.cpp" "*.h" "*.m" "*.mm" | xargs sed -i -e 's/[ \t]*$//'
2012-09-26 04:17:55 +02:00
Max Horn
5de3f9c765 ALL: Correct spelling of "Mac OS X" in various places 2012-05-31 10:30:29 +02:00
Johannes Schickel
b6f7d69709 OPENGLSDL: Remove HACK in fullscreen toggle mode.
Altering the fullscreen state will automatically force a refresh now.
2012-02-15 02:23:47 +01:00
Johannes Schickel
5b3ebdf43d OPENGL: Prevent access to a few more members in the SDL OpenGL code. 2012-02-15 02:23:37 +01:00
Johannes Schickel
97760ff101 OPENGLSDL: Don't cast EventType into int for switch. 2012-02-15 02:23:14 +01:00
Johannes Schickel
772aecf5f8 OPENGLSDL: Simplify the code a bit. 2011-12-15 21:53:09 +01:00
Johannes Schickel
c91b6d7d35 OPENGLSDL: Fix video mode initialization for 640x400 games with AR enabled.
Formerly they always used a height of 240 * scaleFactor, which would for
exmaple make the games requesting a 1x scaler use a height of 240 if AR
is enabled.

This was a regression from b8dcd9a25eb27ef40aa5535fc83879d20db7e10c.
2011-12-15 21:48:14 +01:00
Johannes Schickel
325addff0c OPENGLSDL: Make fullscreen mode switching work again. 2011-09-23 19:45:44 +02:00
Johannes Schickel
b8dcd9a25e OPENGL: Fix aspect ratio correction behavior.
Now only 320x200 and 640x400 will result in aspect ratio correction to be used
if the user requested it. This should fix some strechting in Myst/Riven.
2011-08-12 04:06:54 +02:00
Johannes Schickel
a77c29327e OPENGLSDL: Do not change requested window size on resize.
This should help fix a lock up on window managers, which will try to force the
ScummVM window to a certain size, by just requesting the same size over and
over again.

Now we get black borders even in windowed mode when the aspect of the window
does not match the aspect of the game screen (and we are not in "normal" mode),
but that is usually the same in video players too, so shouldn't be too bad.
2011-08-12 03:46:32 +02:00
Johannes Schickel
04ab0e58b4 SDL: Take advantage of SdlGraphicsManager.
This gets rid of the hacks, where SdlEventSource added events with custom type
numbers to pass SDL_VIDEOEXPOSE and SDL_VIDEORESIZE to the graphics manager.

Furthermore it get rids of the uninituitive and hard to trace way of assigning
the proper mouse coordinates to mouse related events. Formerly it passed the
real screen coordinates through the even dispatching api to the graphics
manager (at least hopefully ;-) and let that handle creating a new event with
the proper coordinates. Now instead SdlEventSource handles the proper
coordinate setup itself.

Since this is a behavior change and I can not test all the SDL based small
devices ports this commit might break compilation for them and more serve it
might also break mouse position behavior. If any of that occurs I am sorry
about it.
2011-08-09 00:03:11 +02:00
Johannes Schickel
0630a88a04 SDL: Let SDL based graphics managers inherit from SdlGraphicsManager.
This also adapts port I can not test (not even the compilation). So if this
breaks anything I am sorry about it.
2011-08-09 00:03:11 +02:00
Max Horn
88913c0139 ALL: Remove trailing whitespaces
This tries to make our code a bit more compliant with our code formatting
conventions. For future use, this is the command I used:
  git ls-files "*.cpp" "*.h" | xargs sed -i -e 's/[ \t]*$//'
2011-06-20 00:59:48 +02:00
Johannes Schickel
f9f16ee358 OPENGLSDL: Add FIXME about desktop resolution retrieving. 2011-06-19 19:12:34 +02:00
Johannes Schickel
735604c2fd OPENGLSDL: Use String::format instead of sprintf. 2011-06-19 18:31:34 +02:00
Johannes Schickel
d316099f35 OPENGLSDL: Formatting fixes. 2011-06-19 18:27:18 +02:00
Thierry Crozat
014145f240 I18N: Make some OSD messages translatable 2011-06-06 23:20:11 +01:00