Commit Graph
270 Commits
Author SHA1 Message Date
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
Le Philousophe e5c1a4249a BACKENDS: OPENGL: When no shader is selected, close 2022-11-06 20:02:59 +01:00
Le Philousophe 5484ebffae BACKENDS: OPENGL: Rework LibRetro pipeline
This makes LibRetro behave almost like other pipelines and make the code
in OpenGLGraphicsManager somewhat simpler.
2022-11-06 20:02:59 +01:00
Le Philousophe 6632e909da BACKENDS: OPENGL: Hide active pipeline and activate it as needed
This removes the idea of global pipeline.
The activePipeline is kept for pipeline lifecycle management only.
2022-11-06 20:02:59 +01:00
Le Philousophe 1859cf455d OPENGL: Use texture size of cursor instead of computing it
Computation was not correct and resulted in corrupted cursor
2022-10-29 18:08:39 +02:00
Le Philousophe 3f08b71d85 BACKENDS: OPENGL: With animated LibRetro shaders, always update screen 2022-10-22 16:51:08 +02:00
Le Philousophe 86ea6f581c BACKENDS: OPENGL: Fix cursor scaling with LibRetro 2022-10-22 16:51:08 +02:00
Le Philousophe 396d5fb425 BACKENDS: OPENGL: ALlow the use of software scalers with LibRetro 2022-10-17 22:09:35 +02:00
Le Philousophe d398034fe5 BACKENDS: OPENGL: Enable filtering when using scaling shaders 2022-10-16 20:42:54 +02:00
Le Philousophe a4f8491c55 BACKENDS: OPENGL: Try to recover from shader error at startup time
Let's just retry without the shader.
2022-10-15 16:45:24 +02:00
Cameron Cawley ebc79b24bb OPENGL: Added missing USE_FORCED_GLES check 2022-10-08 23:39:18 +02:00
Cameron Cawley aa21e7226a OPENGL: Refactored filtering support 2022-10-08 23:39:18 +02:00
Eugene Sandulenko da08d87257 OPENGL: Better check if shaders are supported 2022-10-08 23:39:18 +02:00
Eugene Sandulenko 3578052175 GUI: Enable filtering on platforms where shaders are not supported 2022-10-08 23:39:18 +02:00
Eugene Sandulenko cc0740685f OPENGL: Disable kFeatureFilteringMode because it conflicts with shaders 2022-10-08 23:39:18 +02:00
Eugene Sandulenko b67c4c0047 OPENGL: Gracefully restore previous graphics mode on shader failure 2022-10-08 23:39:18 +02:00
Eugene Sandulenko 8d61963716 OPENGL: Return error when shader did not work 2022-10-08 23:39:18 +02:00
Cameron Cawley 1b2a73c62a OPENGL: Implement selecting shaders from the GUI 2022-10-08 23:39:18 +02:00
Cameron Cawley c5705561b0 OPENGL: Add compatibility checks for LibRetro shader support 2022-10-08 23:39:18 +02:00
Cameron Cawley cdbb0fa32f OPENGL: Better path lookup and error handling 2022-10-08 23:39:18 +02:00
Cameron Cawley 5e4aaf5757 OPENGL: Render the screen and cursor to a target before applying shaders 2022-10-08 23:39:18 +02:00
Lothar Serra Mari 93b46ec40d BACKENDS: OPENGL: Resolve merge conflicts 2022-10-08 23:39:18 +02:00
Lothar Serra Mari 4f4f0b82a8 BACKENDS: OPENGL: Add very basic stock.glsl shader as fallback option 2022-10-08 23:39:18 +02:00
Lothar Serra Mari daeda92d3e BACKENDS: OPENGL: Add stub for loading shader preset from config file 2022-10-08 23:39:18 +02:00
Lothar Serra Mari 203af422d4 BACKENDS: OPENGL: Use simpler shader as test case 2022-10-08 23:39:18 +02:00
Johannes Schickel 9f3249286f BACKENDS: OPENGL: Initial WIP import for shader support 2022-10-08 23:39:18 +02:00
Cameron Cawley 863988fee4 OPENGL: Add proper error checking to the Shader class 2022-06-29 22:37:38 +01:00
Le Philousophe 98c306376f OPENGL: Merge both OpenGL shaders objects 2022-06-26 18:32:10 +02:00
Le Philousophe 4ab044a254 OPENGL: Merge both OpenGL contexts 2022-06-26 18:32:10 +02:00
Eugene Sandulenko abea37c9bb ALL: Update ScummVM project license to GPLv3+ 2021-12-26 18:48:43 +01:00
Cameron Cawley 3bd4e8c6a4 OPENGL: Restore cursor scaling 2021-11-23 23:17:30 +00:00
Cameron Cawley a21961516a GRAPHICS: Split ScalerPluginObject into two classes 2021-11-23 23:32:58 +01:00
Cameron Cawley 35adc961be Revert "OPENGL: Implement cursor scaling" (#3555)
This reverts commit 2db20b702e.
2021-11-21 12:40:28 +01:00
Cameron Cawley 2db20b702e OPENGL: Implement cursor scaling 2021-11-20 01:06:23 +01:00
Cameron Cawley fe5b87d0f1 OPENGL: Implement scaler support 2021-11-20 01:06:23 +01:00
Cameron Cawley 30c093bbd9 OPENGL: Combine TextureCLUT8 and FakeTexture 2021-11-20 01:06:23 +01:00
athrxx 3b061ae0e8 BACKENDS: (OPENGL/SURFACESDL) - include mouse pointer in screen shakes
This is the original behaviour of DOS games (where the screen shakes are done by writing certain offsets into the crt cotnrol register of the vga adapter).

Usually it doesn't matter much, since the shake is an effect that passes quickly. But the difference can be noticed in cases like DOTT when switching on the stereo in green tentacle's room. The shaking will continue until the stereo is turned off again. In that case it is really more appealing if the mouse cursor "sticks" to the background.
2021-11-16 20:34:20 +01:00
Eugene Sandulenko b0001ef9f6 BACKENDS: MACOSX: Display OSD messages on the Touchbar
Okay, so Apple now deprecated the Touchbar in their line of
MacBooks. Exciting! Time to finally add support for it!
2021-11-15 17:45:30 +01:00
Le Philousophe 68a327ecb1 BACKENDS: Harden grabOverlay in all platforms
Use specific copy code where applicable and replace duplicated code by
calls to copyBlit which optimizes blitting
2021-08-04 13:27:07 +02:00
Thierry Crozat ec06d940a2 BACKENDS: Explicitly use ellipsis for OSD text if needed
This is the default, so this commit does not change the behaviour.
But this will allow to change the default at a later stage.
2021-08-01 17:22:13 +02:00
Martin Gerhardy 5af1192580 BACKENDS: fixed segfault in EventRecorder with buffer out of bounds writes
==3124361== Invalid write of size 8
==3124361==    at 0x483F803: memmove (vg_replace_strmem.c:1270)
==3124361==    by 0x4DBF61: SurfaceSdlGraphicsManager::grabOverlay(void*, int) const (surfacesdl-graphics.cpp:1753)
==3124361==    by 0x482051: ModularGraphicsBackend::grabOverlay(void*, int) (modular-backend.cpp:215)
==3124361==    by 0x434EE1: GUI::ThemeEngine::clearAll() (ThemeEngine.cpp:376)
==3124361==    by 0x40128E: GUI::EventRecorder::preDrawOverlayGui() (EventRecorder.cpp:558)
==3124361==    by 0x481DB2: ModularGraphicsBackend::updateScreen() (modular-backend.cpp:173)
==3124361==    by 0x559967: Graphics::Screen::updateScreen() (screen.cpp:62)
==3124361==    by 0x55991C: Graphics::Screen::update() (screen.cpp:56)
==3124361==    by 0x38AFC7: TwinE::TwineScreen::update() (twine.cpp:126)
==3124361==    by 0x3B8759: TwinE::Screens::adjustPalette(unsigned char, unsigned char, unsigned char, unsigned int const*, int) (screens.cpp:150)
==3124361==    by 0x3B8A89: TwinE::Screens::fadeToPal(unsigned int const*) (screens.cpp:207)
==3124361==    by 0x3B8403: TwinE::Screens::loadImage(int, int, bool) (screens.cpp:80)
==3124361==  Address 0x31453050 is 16 bytes after a block of size 512,000 alloc'd
==3124361==    at 0x483AB65: calloc (vg_replace_malloc.c:760)
==3124361==    by 0x55B38C: Graphics::Surface::create(unsigned short, unsigned short, Graphics::PixelFormat const&) (surface.cpp:75)
==3124361==    by 0x551111: Graphics::ManagedSurface::create(unsigned short, unsigned short, Graphics::PixelFormat const&) (managed_surface.cpp:153)
==3124361==    by 0x4352D5: GUI::ThemeEngine::setGraphicsMode(GUI::ThemeEngine::GraphicsMode) (ThemeEngine.cpp:453)
==3124361==    by 0x434A52: GUI::ThemeEngine::init() (ThemeEngine.cpp:324)
==3124361==    by 0x43501B: GUI::ThemeEngine::refresh() (ThemeEngine.cpp:394)
==3124361==    by 0x405780: GUI::GuiManager::screenChange() (gui-manager.cpp:603)
==3124361==    by 0x405C6B: GUI::GuiManager::processEvent(Common::Event const&, GUI::Dialog*) (gui-manager.cpp:677)
==3124361==    by 0x404EBA: GUI::GuiManager::runLoop() (gui-manager.cpp:429)
==3124361==    by 0x3FD847: GUI::Dialog::runModal() (dialog.cpp:77)
==3124361==    by 0x36D747: launcherDialog() (main.cpp:106)
==3124361==    by 0x36FF92: scummvm_main (main.cpp:552)

It looks like the _videoMode.overlayHeight in SurfaceSdlGraphicsManager::grabOverlay and ThemeEngine::_backBuffer::h are somehow out of sync after
starting the game in a different resolution as the gui was started with. So the overlayHeight is updated - but the backbuffer (Surface) is not resized.

This is with event recorder being active - right after starting the game and switching the resolution.
2021-06-19 14:34:52 +02:00
Cameron Cawley 66c0c57d10 BACKENDS: Add support for OpenGL 1.1 contexts 2021-06-16 23:16:01 +01:00
Thierry Crozat 31a6b39fb3 SDL: Add new pixel perfect stretch mode for OpenGL
This mode ensure that an integral scaling is used both for the width
and for the height. Compared to the old pixel perfect stretch mode
it thus differs in the way it handles the aspect ratio correction.
It may stretch or squeeze the vertical direction to snap it to a
multiple of the original game height.
2021-06-05 14:17:40 +01:00
Thierry Crozat 1e51093102 Revert "OPENGL: Fix aspect ratio bug when switching render"
This reverts commit 8af0b8baa5.

That commit introduced a regression causing toggling the
aspect ratio correction using the hotkey to be ignored. And
I checked that reverting the commit did not reintroduced the
bug that it was supposed to fix. However since commit ceca0b5ae
the window size in OpenGL mode no longer depends on whether
the Aspect Ratio correction is enabled or not.
2021-06-02 21:50:18 +01:00