Commit graph

472 commits

Author SHA1 Message Date
Filippos Karapetis
ce51fd937f BACKENDS: Use C++ 11 range-based for loops 2025-03-27 13:47:57 +08:00
Eric Fry
a716d981aa GRAPHICS: Changed text to clarify EGA video mode. 2024-12-18 00:09:38 +02:00
Eric Fry
292d66e95f GRAPHICS: Apply aspect ratio correction to 16 color VGA 640x350 video mode. 2024-12-18 00:09:38 +02:00
Cameron Cawley
20b41fc8d9 GRAPHICS: OPENGL: Separate the GLTexture class from the graphics manager 2024-11-30 18:21:47 +02:00
Le Philousophe
107b60ad06 BACKENDS: OPENGL: Fix segfault when compiled without RGB color
The cursor is not impacted by this option, only the game screen.
This fixes bug 15251.
2024-11-09 23:56:16 +01:00
Le Philousophe
7a69ccc4b8 JANITORIAL: Cleanup whitespaces problems 2024-09-29 17:08:13 +02:00
Vladimir Serbinenko
488353480f SDL, COMMON: Support screen rotation 2024-09-29 02:10:39 +03:00
Hubert Maier
4533e12280 JANITORIAL: BACKENDS: Fix typos 2024-09-16 02:13:34 +03:00
Le Philousophe
caf7901cb4 BACKENDS: OPENGL: Update blending color when it's dirty
This makes sure the color is updated before drawing the texture and
avoids extraneous calls when the color was already set.
2024-08-31 16:41:40 +02:00
Cameron Cawley
9970ea6917 BACKENDS: OPENGL: Support aspect ratio correction for Hercules games 2024-07-01 18:40:33 +03:00
Le Philousophe
81196ec6c6 OPENGL: Don't use glBlendColor when it's not available
Bare Windows XP only has OpenGL 1.1 implementation where the function
is not here.
Fallback on no blending at all: this is like it was before.
2024-06-30 15:57:03 +02:00
Cameron Cawley
1357bfe672 COMMON: Avoid including engine headers in common code for DebugChannelDef 2024-06-20 20:15:57 +01:00
Le Philousophe
a04fe8ef2f OPENGL: Don't always force redraw when ImGui is enabled
Only do it when ImGui is enabled by the engine and move the check in SDL
backend where ImGui is supported.
This makes the OpenGL backend independent of ImGui.
2024-04-28 21:48:10 +02:00
scemino
b721f95ffe BACKENDS: Add imgui in OpenGL backend 2024-04-28 13:59:31 +02:00
Christian Kündig
7bdadaefae EMSCRIPTEN: GRAPHICS: Fix screenshots 2024-02-27 17:07:13 +01:00
Le Philousophe
6342045cc3 BACKENDS: OPENGL: Don't take the alpha channel from the game texture
It's not always set correctly by engines (AGS) and a fill call to clear
the screen will set it to 0 along with the other components.
Setting the framebuffer to some transparent value is not something we
intend to do as this let the content underneath the drawing texture
visible like it's the case on ChromeOS.
This has been reported here: https://forums.scummvm.org/viewtopic.php?p=99293
2024-02-24 16:43:14 +01:00
Cameron Cawley
5b1b14ad80 COMMON: Mark more symbols as const 2023-12-26 20:23:59 +01:00
Le Philousophe
3c5fe56de6 BACKENDS: OPENGL: Small cleanups on paths 2023-12-24 13:19:25 +01:00
Le Philousophe
2f34975164 COMMON: Make shaders API use the Path class 2023-12-24 13:19:25 +01:00
Le Philousophe
e689166a2c BACKENDS: Make screenshots use the Path class 2023-12-24 13:19:25 +01:00
Le Philousophe
34c70f148d BACKENDS: OPENGL: Don't update screen if there is no pipeline
This avoids crashes when updateScreen is called when context has been
destroyed and not yet created again.
2023-12-09 18:11:30 +01:00
sluicebox
ddc2de5e4f BACKENDS: OPENGL: Fix FakeTexture palette init. PVS-Studio V1086 2023-11-20 12:39:29 +02:00
Kaloyan Chehlarski
d3976468b1 BACKENDS: LIBRETRO: Fix memory leak
Coverity CID 1502443
2023-11-02 11:41:22 +02:00
Cameron Cawley
bcc9259382 BACKENDS: Report if the backend supports cursors with alpha channels 2023-10-29 02:02:11 +02:00
Cameron Cawley
d8cca29783 BACKENDS: Allow filling part of the screen with OSystem::fillScreen 2023-08-06 23:03:46 +02:00
Le Philousophe
5a84a5fdc1 BACKENDS: OPENGL: Rework shader assets search
Determine in which archive the shader is located and load assets from
the same archive.
When using a FSNode, use the filesystem code to build the base path.
Use a Path object to store the base path to allow proper join of
components.
2023-07-09 21:41:58 +02:00
Le Philousophe
adda0dc063 BACKENDS: OPENGL: Allow the backend to specify the render target
For now only backbuffer is used.
2023-07-03 21:50:32 +02:00
Le Philousophe
10714db6f0 BACKENDS: OPENGL: Make setSize a Framebuffer function 2023-07-03 21:50:32 +02:00
Le Philousophe
2d1ca55ffb BACKENDS: OPENGL: Don't depend on USE_ASPECT
USE_ASPECT disables software aspect ratio correction.
In OpenGL it's done by GPU.
2023-06-25 15:14:13 +02:00
antoniou79
68c293a004 GUI: Ommit aspect ratio checkbox if this feature is missing
Also fix compilation when building for --disable-aspect (buggy end bracket in backends/graphics/surfacesdl/surfacesdl-graphics.cpp)
2023-06-17 20:21:29 +02:00
Le Philousophe
a95f42317c BACKENDS: OPENGL: Clear screen using opaque black instead of transparent
This looks like an overlook since the creation of the backend.
Previous Android backend used this and it shouldn't harm other
platforms.
This should fix a bug on ChromeOS.
2023-06-04 18:22:59 +02:00
Walter Agazzi
2c1741e5c6 GRAPHICS: Preventively remove alpha channel for screenshots
Preserving the alpha channel for screenshots
is not really needed and causes problems in
the AGS engine (and possibily other engines)
2023-04-02 11:38:18 +02:00
Le Philousophe
f7ca853d34 OPENGL: Make sure shader has been created before cloning it 2023-03-19 09:46:03 +01:00
Donovan Watteau
18ab6803d6 JANITORIAL: Fix various "an" typos in comments 2023-03-16 14:47:28 +01:00
elasota
2841b9931d GRAPHICS: Fix Normal and AdvMame scalers not applying cursor mask to additive texture 2023-03-05 21:13:01 +01:00
elasota
18f947272a GRAPHICS: Properly handle cursor mask texture in GL context teardown/recreate.
Fixes cursor transparency breaking after toggling fullscreen mode on Windows.
2023-03-05 21:13:01 +01:00
D G Turner
edf97f385c GRAPHICS: Fix Set-But-Unused-Variable GCC Compiler Warning 2023-02-20 00:43:42 +00:00
elasota
3db67a33ac GRAPHICS: Add support for pixels with masks and inverted pixels 2023-02-19 23:51:09 +01:00
Le Philousophe
c6c73ea0ea OPENGL: Properly take extra pixels into account when using scalers
As in SurfaceSDL, the dirty rect must be grown.
2023-02-13 21:08:53 +01:00
Le Philousophe
4a7d75595d OPENGLSDL: Make sure pipeline is destroyed when Manager is destroyed
When destroying the Manager its context is always destroyed.
Destroying OpenGLGraphicsManager must destroy the pipeline too.
2023-02-12 18:06:21 +01:00
Le Philousophe
97c8746d2e BACKENDS: OPENGL: Use a floating point cursor size
When scaler shaders are used, cursor size is adapted to scale on the
game screen texture and not on the back buffer so the size is scaled
twice and is imprecise.
Using a float gives more precision without any performance impact as the
OpenGL code already expects floats.
2023-02-05 20:48:51 +01:00
Eugene Sandulenko
e0736936e9
BACKENDS: OPENGL: Use isCLUT8() 2023-02-02 19:33:20 +01:00
Le Philousophe
0416279980 OPENGL: Fix glitch when shaking screen
Everything was converted to unsigned instead of the opposite.
2023-01-24 19:40:48 +01:00
Eugene Sandulenko
aa14d59447
BACKENDS: OPENGL: Switch shaders to SearchSet 2023-01-08 01:15:51 +01:00
Eugene Sandulenko
ef65534250
BACKENDS: SHADERS: Make possibility to load shaders from SearchMan 2023-01-08 01:15:44 +01:00
Cameron Cawley
7f2d9fd0fd GRAPHICS: Split conversion.cpp into multiple files 2022-12-22 23:45:14 +01:00
elasota
3496e82abc BACKENDS: Add 1-pixel border to cursors to ensure linear interpolation of edge pixels doesn't get cut off half-way. 2022-11-29 00:48:00 +01:00
Le Philousophe
77fce6614e BACKENDS: OPENGL: Disable scissor test when overlay is for games
WIthout this, the game cannot draw outside its area for subtitles.
This is exhibited when scaling is set to center.
2022-11-20 17:18:38 +01:00
Le Philousophe
87bad2cc7d COMMON: Allow games to use overlay for something else than GUI
This can be used for subtitles without changing the mouse coordinates.
2022-11-12 19:12:05 +01:00
Le Philousophe
6fa7a6f30f BACKENDS: OPENGL: Check if libretro is here before loading shader 2022-11-11 13:24:55 +01:00