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;
65 bool saveScreenshot(
const Common::Path &filename)
const override;
68 bool setupMode(uint width, uint height);
70 #if SDL_VERSION_ATLEAST(2, 0, 0) 71 int _glContextProfileMask, _glContextMajor, _glContextMinor;
73 SDL_GLContext _glContext;
75 uint32 _lastVideoModeLoad;
88 bool _queuedScreenshot =
false;
89 void saveScreenshot()
override;
92 OpenGL::ContextType _glContextType;
94 uint _forceFrameUpdate = 0;
95 uint _lastRequestedWidth;
96 uint _lastRequestedHeight;
101 bool _wantsFullScreen;
102 uint _ignoreResizeEvents;
105 VideoMode() : width(0), height(0) {}
106 VideoMode(uint w, uint h) : width(w), height(h) {}
108 bool operator<(
const VideoMode &right)
const {
109 if (width < right.width) {
111 }
else if (width == right.width && height < right.height) {
118 bool operator==(
const VideoMode &right)
const {
119 return width == right.width && height == right.height;
122 bool operator!=(
const VideoMode &right)
const {
123 return !(*
this == right);
129 VideoModeArray _fullscreenVideoModes;
131 uint _desiredFullscreenWidth;
132 uint _desiredFullscreenHeight;
void refreshScreen() override
Definition: sdl-events.h:40
Definition: sdl-graphics.h:38
Feature
Definition: system.h:403
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:57
void notifyResize(const int width, const int height) override
void notifyVideoExpose() override
Definition: sdl-window.h:30
bool loadVideoMode(uint requestedWidth, uint requestedHeight, const Graphics::PixelFormat &format) override