Commit graph

359 commits

Author SHA1 Message Date
Thierry Crozat
fd77916f86 SURFACESDL: Add hotkey to enable/disable filtering 2016-10-13 01:46:26 +01:00
Thierry Crozat
3a69898729 SURFACESDL: Add support for filtering feature when using SDL2
This implements the request from ticket #9573: SDL1/2: Different
rendering/filtering?
2016-10-13 01:45:01 +01:00
Bastien Bouclet
7941e5d530 SDL: Switch to full screen updates when the OSD is transparent
Previous releases also did full screen updates for transparent OSD messages.
There should be no performance regression with that regard.

Computing smaller update rects is non trivial, but should be looked into if
performance is an issue for OSD icons.

Fixes #9598
2016-10-03 07:31:18 +02:00
Bastien Bouclet
0f9583e4ca SDL: Make sure the cloud icon is cleared immediatly after it is hidden 2016-09-18 17:55:09 +02:00
Bastien Bouclet
05bc82b622 SDL: Switch the surface renderer to use small surfaces for OSD drawing 2016-09-13 20:33:42 +02:00
Eugene Sandulenko
b8ee5322f4 JANITORIAL: Remove trailing whitespaces 2016-09-03 21:20:16 +02:00
Eugene Sandulenko
7910123446 SDL: Optimize OSD drawing 2016-09-03 21:20:02 +02:00
Willem Jan Palenstijn
d60879b535 SDL: Fix const cast 2016-08-30 21:52:27 +02:00
Alexander Tkachev
91f75efa99 GUI: Fix copyRectOnOSD()
Now it doesn't require full redraw, but asks to redraw the area which is
copied to.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
de84701aea GUI: Separate OSD message alpha from OSD surface
Now OSD is always drawn.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
1b9987ddc9 GUI: Add getOSDFormat() and make OSD 32 bpp 2016-08-24 16:07:55 +06:00
Alexander Tkachev
2a15b8b280 GUI: Add clearOSD() method
So one can erase everything from OSD and then blit something on it.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
7ff1f91808 GUI: Add copyRectToOSD()
I was lazy to implement that in OpenGLGraphicsManager and I'm not sure
it's implemented correctly in SurfaceSdlGraphicsManager, but it works
for me.
2016-08-24 16:07:55 +06:00
Vincent Pelletier
33036790cb SDL: Accept 32bits video mode.
Now that TinyGL supports 32bits final framebuffer.
In SDL1, let SDL decide between 16 and 32.
In SDL2, create 32bits texture & surface.
2016-07-24 02:35:53 +02:00
Bastien Bouclet
f8cce66926 SDL: Improve code organisation and documentation
No functional change
2016-07-14 12:04:06 +02:00
Bastien Bouclet
2141277df9 SDL: Detect the desktop resolution earlier
So that nothing has a chance to change it beforehand.
2016-07-14 12:04:05 +02:00
Bastien Bouclet
8927dcdcf6 SDL: Rewrite OpenGL overlay handling to use TiledSurface 2016-07-14 12:03:38 +02:00
Bastien Bouclet
287f97228f BACKENDS: Make suggestSideTextures go through GraphicsManager 2016-07-14 12:02:55 +02:00
Bastien Bouclet
52f2dfc869 SDL: Split the GraphicsManager into Surface and OpenGL 2016-07-14 12:02:51 +02:00
Ben Castricum
da55658a80 SDL: Fix mouse trailing part of bug #7141
Overlays are shown with _currentShakePos offset too, so no need to
compensate the mousepointer position for overlays. This compensation
was done inconsistently in draw/undraw mouse causing the mouse trails.
2016-07-01 08:26:03 +02:00
Bastien Bouclet
40e76b4cdd SDL: Add initial support for building with SDL2 2016-06-12 20:39:47 +02:00
Bastien Bouclet
9b0f37993c SDL: Don't use the screen buffer in OpenGL mode
It makes no sense, and SDL2 does not provide one.
2016-06-12 20:17:57 +02:00
Bastien Bouclet
d4ce2d8c50 SDL: Attempt to fix build on AmigaOS 2016-06-12 20:14:59 +02:00
Bastien Bouclet
9c0950f76c SDL: Fix build for platforms with incomplete OpenGL headers 2016-06-12 20:08:05 +02:00
Bastien Bouclet
fe4aac9ada Merge pull request #1250 from bgK/wip-multisampling
Multisampling for framebuffers
2016-06-12 19:53:14 +02:00
Bastien Bouclet
87ceda2324 SDL: Don't try to draw the SubScreen if it's null
Also simplify the closeOverlay method. This has the side effect of properly freeing
SubScreen when building without OpenGL.
2016-06-11 13:32:04 +02:00
Bastien Bouclet
5ae1e3a01c OPENGL: Honor the configured MSAA samples for FBOs 2016-06-11 13:12:37 +02:00
Dries Harnie
be5202d11d OPENGL: Multisampling for framebuffers (SDL) 2016-06-11 13:12:37 +02:00
Bastien Bouclet
3e0136160d SDL: Don't enable screen level multisampling when rendering to a FBO 2016-06-11 13:12:37 +02:00
Bastien Bouclet
992106596c SDL: Rework OpenGL window creation
The new implementation builds a list of suitable OpenGL context properties,
sorted by preference.
The context creation goes through that list and stops at the first successfully
created context.
2016-06-11 13:12:30 +02:00
Eugene Sandulenko
3e568910c8 GCW0: Disable triple buffering.
Too many artifacts. It is not possible with current ScummVM
drawing approaches.
2016-04-10 16:36:42 +02:00
Eugene Sandulenko
a7930f2af7 GCW0: Enable triple buffering 2016-04-10 15:09:14 +02:00
Pawel Kolodziejski
68ee863367 SDL: attempt to fix compilation for AmigaOS4 2016-03-09 18:21:18 +01:00
Bastien Bouclet
19757429f2 SDL: Reorganize the game render target selection code
Introduce a GameRenderTarget enumeration defining how the game is rendered
on the screen: directly, using a sub-surface, or using a framebuffer.

Split the video initialisation code into smaller methods.
The logic should be exactly the same as before.
2016-03-06 12:20:25 +01:00
Johannes Schickel
fd688b73d7 SDL: Work around bug #7038 by limiting mode reset to Win32.
Bug is: "IRIX: X BadMatch when trying to start any 640x480 game".

40e019efd4 introduced resetting the pixel depth
when unloading modes for SDL output. This was required to make mode listing
for OpenGL work on Win8+.

This causes issues on non-Win32 platforms though. SDL might not give us a valid
a pixel depth, causing the resetting to fail. A particular example is X11 on
IRIX, when only 16bit output modes work. Initially SDL tells us that the pixel
depth is 32bit. Trying to set this up causes a crash though.

Since there is no way to validate SDL's return value, we simply limit the reset
to platforms where it is actually required, i.e. Win32.
2016-02-17 16:17:39 +01:00
Bastien Bouclet
31715787ca SYSTEM: Add a system method for retrieving the screen framebuffer 2016-02-06 08:53:41 +01:00
Bastien Bouclet
e6a31b2150 SDL: Set the OpenGL context type according to the USE_GLES2 define 2016-02-06 08:53:41 +01:00
Bastien Bouclet
7eee45add3 SDL: Use the SurfaceRenderer class to draw the textures 2016-02-06 08:53:41 +01:00
Bastien Bouclet
2b85430198 SDL: Use the OpenGL Texture class to draw the overlay 2016-02-06 08:53:41 +01:00
Bastien Bouclet
ed38c20cce OPENGL: Add a Context class used to describe the active OpenGL context 2016-02-06 08:02:50 +01:00
Bastien Bouclet
6c78bcebe4 GRAPHICS: Move opengles2 files to the opengl folder 2016-02-06 08:02:49 +01:00
Bastien Bouclet
4c2c1b4d36 GRAPHICS: Set the namespace for OpenGL classes to OpenGL 2016-02-06 08:02:27 +01:00
Bastien Bouclet
c16fec3a71 SDL: Unbind the shader after drawing
Otherwise the next call to Shader::use may still
mistakenly consider it to be active, and do nothing.
2016-01-16 08:06:01 +01:00
Johannes Schickel
366e164705 SDL: Implement initial support for resizable window with SDL2.
The code is disabled for now.
2015-12-18 19:12:11 +01:00
Johannes Schickel
5d48e211aa SDL: Fix mouse emulation with SDL2.
The mouse emulation via keyboard (or other means) was broken with
079037b739.
2015-12-13 21:30:25 +01:00
Johannes Schickel
cbc517f14f SDL: Fix warpMouse for SDL2.
Thanks to bgK for noticing.
2015-12-13 15:44:42 +01:00
Johannes Schickel
457640a162 SDL: Prevent cursor from leaving screen area in fullscreen with SDL2. 2015-12-08 15:43:36 +01:00
Johannes Schickel
079037b739 SDL: Prevent graphics stretching in fullscreen when using SDL2.
As a side effect we get better coordinates from mouse move events in
fullscreen, i.e. we do not get actual window coordinates but something close
to actual viewport coordinates. The easily noticable issue is that mouse
coordinates inside black bars are outside of the viewport. For example, the
x coordinate can get negative when there's a black bar at the left side.
2015-12-08 15:41:10 +01:00
Dries Harnie
ae4601c303 JANITORIAL: Code style fixes 2015-08-17 13:25:46 +02:00
Dries Harnie
8fc79af213 SYSTEM: Add side textures as a System feature 2015-08-17 13:25:46 +02:00