22 #ifndef BACKENDS_GRAPHICS_OPENGLSDL_OPENGLSDL_GRAPHICS_H 23 #define BACKENDS_GRAPHICS_OPENGLSDL_OPENGLSDL_GRAPHICS_H 25 #include "backends/graphics/opengl/opengl-graphics.h" 26 #include "backends/graphics/sdl/sdl-graphics.h" 27 #include "backends/platform/sdl/sdl-sys.h" 29 #include "common/array.h" 30 #include "common/events.h" 42 void updateScreen()
override;
44 float getHiDPIScreenFactor()
const override;
51 void notifyResize(
const int width,
const int height)
override;
53 #if defined(USE_IMGUI) && SDL_VERSION_ATLEAST(2, 0, 0) 54 void *getImGuiTexture(
const Graphics::Surface &image,
const byte *palette,
int palCount)
override;
55 void freeImGuiTexture(
void *texture)
override;
58 #if SDL_VERSION_ATLEAST(2, 0, 0) 59 void destroyingWindow()
override;
63 bool loadVideoMode(uint requestedWidth, uint requestedHeight,
bool resizable,
int antialiasing)
override;
69 bool saveScreenshot(
const Common::Path &filename)
const override;
74 bool setupMode(uint width, uint height);
76 void deinitOpenGLContext();
78 #if SDL_VERSION_ATLEAST(2, 0, 0) 79 int _glContextProfileMask, _glContextMajor, _glContextMinor;
81 SDL_GLContext _glContext;
83 uint32 _lastVideoModeLoad;
96 bool _queuedScreenshot =
false;
97 void saveScreenshot()
override;
100 OpenGL::ContextType _glContextType;
102 int _requestedAntialiasing;
103 int _effectiveAntialiasing;
105 uint _forceFrameUpdate = 0;
106 uint _lastRequestedWidth;
107 uint _lastRequestedHeight;
112 bool _wantsFullScreen;
113 uint _ignoreResizeEvents;
116 VideoMode() : width(0), height(0) {}
117 VideoMode(uint w, uint h) : width(w), height(h) {}
119 bool operator<(
const VideoMode &right)
const {
120 if (width < right.width) {
122 }
else if (width == right.width && height < right.height) {
129 bool operator==(
const VideoMode &right)
const {
130 return width == right.width && height == right.height;
133 bool operator!=(
const VideoMode &right)
const {
134 return !(*
this == right);
140 VideoModeArray _fullscreenVideoModes;
142 uint _desiredFullscreenWidth;
143 uint _desiredFullscreenHeight;
void refreshScreen() override
Definition: sdl-events.h:40
Definition: sdl-graphics.h:38
Feature
Definition: system.h:405
bool canSwitchFullscreen() const override
bool notifyEvent(const Common::Event &event) override
Definition: openglsdl-graphics.h:32
void handleResizeImpl(const int width, const int height) override
Definition: opengl-graphics.h:60
void notifyResize(const int width, const int height) override
void notifyVideoExpose() override
bool loadVideoMode(uint requestedWidth, uint requestedHeight, bool resizable, int antialiasing) override
Definition: sdl-window.h:30