ScummVM API documentation
libretro-graphics-opengl.h
1/* Copyright (C) 2024 Giovanni Cascione <ing.cascione@gmail.com>
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 3 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 *
16 */
17
18#ifndef BACKENDS_LIBRETRO_GRAPHICS_OPENGL_H
19#define BACKENDS_LIBRETRO_GRAPHICS_OPENGL_H
20
21#include "backends/graphics/opengl/opengl-graphics.h"
22#include "backends/graphics/opengl/texture.h"
23
24namespace OpenGL {
25class Surface;
26}
27
29public:
30 LibretroOpenGLGraphics(OpenGL::ContextType contextType);
31 bool loadVideoMode(uint requestedWidth, uint requestedHeight, bool resizable, int antialiasing) override {
32 return true;
33 }
34 void refreshScreen() override;
35 void setSystemMousePosition(const int x, const int y) override {};
36 void setMouseCursor(const void *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, const Graphics::PixelFormat *format, const byte *mask, frac_t scaleX, frac_t scaleY) override;
37 void initSize(uint width, uint height, const Graphics::PixelFormat *format) override;
38 void setMousePosition(int x, int y);
39 void resetContext(OpenGL::ContextType contextType);
40 OSystem::TransactionError endGFXTransaction() override;
41 bool hasFeature(OSystem::Feature f) const override;
42protected:
43 bool gameNeedsAspectRatioCorrection() const override {
44 return false;
45 }
46 void handleResizeImpl(const int width, const int height) override;
47private:
48 void overrideCursorScaling(void);
49};
50
52
53protected:
54 void activateInternal() override;
55};
56
57#endif //BACKENDS_LIBRETRO_GRAPHICS_OPENGL_H
Definition: libretro-graphics-opengl.h:51
void activateInternal() override
Definition: libretro-graphics-opengl.h:28
bool gameNeedsAspectRatioCorrection() const override
Definition: libretro-graphics-opengl.h:43
bool loadVideoMode(uint requestedWidth, uint requestedHeight, bool resizable, int antialiasing) override
Definition: libretro-graphics-opengl.h:31
void refreshScreen() override
void handleResizeImpl(const int width, const int height) override
void setSystemMousePosition(const int x, const int y) override
Definition: libretro-graphics-opengl.h:35
Definition: framebuffer.h:183
Definition: opengl-graphics.h:60
int32 frac_t
Definition: frac.h:52
Feature
Definition: system.h:415
TransactionError
Definition: system.h:1188
Definition: pixelformat.h:138