Commit graph

69 commits

Author SHA1 Message Date
Le Philousophe
2d1b05bf17 BACKENDS: SDL: Fix sdlGetAttribute shim on SDL2
sdlGetAttribute returns true on success (like SDL_GL_GetAttribute on
SDL3), but SDL_GL_GetAttribute on SDL2 return 0 on success.
2025-02-22 10:57:49 +01:00
scemino
8afb2c1f62 BACKENDS: Add SDL3 backend + update imgui 2025-02-18 22:13:56 +01:00
Cameron Cawley
255562991c GRAPHICS: OPENGL: Enable more features with OpenGL ES 3 2024-12-24 13:25:39 +02:00
Cameron Cawley
a9ca83819d BACKENDS: OPENGL: Use the shared Texture class for the overlay in 3D games 2024-11-30 18:21:47 +02:00
Le Philousophe
f04f248f20 BACKENDS: SDL: Implement ImGui API to load images 2024-09-29 17:04:03 +02:00
Le Philousophe
2eebb5db02 BACKENDS: SDL: Add SDL2 Renderer support for ImGui
Some adaptations will be needed for the the engines.
2024-09-29 17:04:03 +02:00
Le Philousophe
17a1b37dda BACKENDS: SDL: Refactor ImGui processing
This unifies the ImGui processing for both 2D and 3D engine.
This also make sure we don't destroy ImGui if init failed (like on older
OpenGL).
The destroy callback is also called whenever we destroy the context.
2024-06-30 15:57:03 +02:00
Eugene Sandulenko
34be774f4b
BACKENDS: IMGUI: Bump ImGui to v1.90.6 2024-05-17 22:19:46 +02:00
Eugene Sandulenko
4cd62e3398
BACKENDS: IMGUI: Renamed modified files to minimize diff with upstream 2024-05-17 01:46:45 +02:00
scemino
8e07681356 BACKENDS: Update setImGuiRenderCallback in OSystem 2024-05-03 20:04:30 +02:00
Le Philousophe
7a4f6aa2af OPENGLSDL3D: Make ImGui init and deinit variableless
It is inited only when context is created and deinited when it is
destroyed
2024-04-28 21:48:10 +02:00
Le Philousophe
e6a7d6bc9b OPENGLSDL: Don't compile code when not on SDL 2.0 2024-04-28 21:48:10 +02:00
scemino
b721f95ffe BACKENDS: Add imgui in OpenGL backend 2024-04-28 13:59:31 +02:00
scemino
9ff903dd75 BACKENDS: Fix imgui width sdl1 2024-03-07 20:08:26 +01:00
scemino
8807ab74db BACKENDS: New imgui proposition 2024-03-07 20:08:26 +01:00
scemino
9c7098fb84 BACKENDS: Fix regression imgui windows not visible 2024-03-07 20:08:26 +01:00
scemino
b917604200 BACKENDS: Fix create random IniFilename
This was due to a pointer not kept in memory
2024-03-07 20:08:26 +01:00
scemino
0cba66b204 TWP: Move ImGui to backends 2024-03-07 20:08:26 +01:00
Christian Kündig
7bdadaefae EMSCRIPTEN: GRAPHICS: Fix screenshots 2024-02-27 17:07:13 +01:00
Le Philousophe
e689166a2c BACKENDS: Make screenshots use the Path class 2023-12-24 13:19:25 +01:00
Le Philousophe
0ea1b5aef6 GRAPHICS3D: Clear screen while hiding overlay 2023-11-26 16:12:14 +01:00
Cameron Cawley
138a983d80 COMMON: Refactor VSync handling to match the other options 2023-01-16 18:09:53 +01:00
Cameron Cawley
7f2d9fd0fd GRAPHICS: Split conversion.cpp into multiple files 2022-12-22 23:45:14 +01:00
Paweł Kołodziejski
18f75444b2
BACKENDS3D: Revert my changes to Framebuffer viewport state.
It's useless for backend code flow.
Instead move into UpdateScreen() as short time solution.
2022-11-15 23:23:50 +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
Cameron Cawley
252d9f20e3 OPENGL: Fix crash in forced GLES2 mode 2022-09-24 09:14:08 +02:00
Cameron Cawley
350e21ba58 SDL: Better workaround for enabling the system cursor 2022-08-26 21:47:49 +01:00
Cameron Cawley
4f8962bff9 OPENGL3D: Restore support for aspect ratio correction 2022-08-26 21:47:11 +01:00
Le Philousophe
4ab044a254 OPENGL: Merge both OpenGL contexts 2022-06-26 18:32:10 +02:00
Paweł Kołodziejski
e9dc4afe89
BACKENDS: SDL3D: Put debug messages to specified level 2022-06-19 08:08:32 +02:00
Cameron Cawley
60c7372198 OPENGL3D: Make use of the active rect provided by WindowedGraphicsManager 2022-06-18 19:33:27 +01:00
Le Philousophe
31caab89e1 SDL: Make sure a context exists when calling SDL_GL_GetAttribute 2022-05-28 15:49:54 +02:00
Le Philousophe
7061b4109e AMIGAOS: Remove outdated ifdefs
We now link with OpenGL dynamically so symbols are provided by GLAD.
If it's not supported pointer will be null.
OGLES2 should support these functions so they must be removed
2022-04-17 12:34:38 +02:00
Le Philousophe
d9b4e457e8 ALL: Remove USE_GLES2 define
Replace it with USE_FORCED_GLES2
2022-01-18 16:49:03 +01:00
Paweł Kołodziejski
d1d77f887e BACKENDS3D: Moved Surfaces and Texture specific backend code to backends 2022-01-10 01:21:49 +01:00
Paweł Kołodziejski
d054f7785c GRAPHICS3D: MorphOS special code case is no longer needed 2022-01-03 14:29:32 +01:00
Cameron Cawley
21b0d6ded1 BACKENDS: Replace GLEW with GLAD, part of PR #3463 2021-12-30 14:53:48 +01:00
Cameron Cawley
43d87cb029 BACKENDS: Support detecting OpenGL ES 2 at runtime for 3D games 2021-12-30 13:57:50 +01:00
Paweł Kołodziejski
20cb0ae228
ALL: Cleanup ResidualVM -> ScummVM 2021-12-26 21:19:38 +01:00
Eugene Sandulenko
abea37c9bb
ALL: Update ScummVM project license to GPLv3+ 2021-12-26 18:48:43 +01:00
Paweł Kołodziejski
948923c62c
GRAPHICS3D: Move viewport change to save/restore surface, framebuffer 2021-12-05 10:36:10 +01:00
Paweł Kołodziejski
2a7aa00c85
BACKENDS: Remove PixelBuffer leftovers 2021-11-27 21:22:09 +01:00
Cameron Cawley
4d206e5286
GRAPHICS: Clean up OpenGL defines (#3551) 2021-11-18 00:56:21 +01:00
Hubert Maier
ea8b6e9ae2 AMIGAOS: Replace query with correct one 2021-11-01 12:16:23 +01:00
Alexandre Detiste
6044504762 JANITORIAL: typos
some in the variable names, some in the comments;
no change for the strings that interract with original games assets
2021-10-31 20:46:31 +01:00
Christian Kündig
8af8ac2e08 OPENGL EMSCRIPTEN: clean up ifdefs, fix opengl in main menu, remove 10ms delay in GRIM main loop 2021-08-20 21:13:49 +02:00
Christian Kündig
b7a2e22b0a DISTS: New Emscripten/WebAssembly dists target
This is an initial version of the emscripten build/dist target.
Many things are still missing, see dists/emscripten/README.md for
a detailed summary of what this provides and still misses
2021-08-20 21:13:49 +02: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
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
rsn8887
39d396cf83 SWITCH: Fix wrong zoom in 3D games 2021-04-21 14:14:51 -05:00