ScummVM API documentation
gfx_opengl.h
1/* ScummVM - Graphic Adventure Engine
2 *
3 * ScummVM is the legal property of its developers, whose names
4 * are too numerous to list here. Please refer to the COPYRIGHT
5 * file distributed with this source distribution.
6 *
7 * This program is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
19 *
20 */
21
22#ifndef GFX_OPENGL_H_
23#define GFX_OPENGL_H_
24
25#include "common/rect.h"
26#include "common/system.h"
27#include "math/vector3d.h"
28
29#include "engines/myst3/gfx.h"
30
31namespace Myst3 {
32
33class OpenGLRenderer : public Renderer {
34public:
35 OpenGLRenderer(OSystem *_system);
36 virtual ~OpenGLRenderer();
37
38 void init() override;
39
40 void clear() override;
41 void selectTargetWindow(Window *window, bool is3D, bool scaled) override;
42
43 Texture *createTexture3D(const Graphics::Surface *surface) override;
44
45 void drawRect2D(const Common::Rect &rect, uint8 a, uint8 r, uint8 g, uint8 b) override;
46 virtual void drawTexturedRect2D(const Common::Rect &screenRect, const Common::Rect &textureRect, Texture *texture,
47 float transparency = -1.0, bool additiveBlending = false) override;
48 virtual void drawTexturedRect3D(const Math::Vector3d &topLeft, const Math::Vector3d &bottomLeft,
49 const Math::Vector3d &topRight, const Math::Vector3d &bottomRight,
50 Texture *texture) override;
51
52 void drawCube(Texture **textures) override;
53 void draw2DText(const Common::String &text, const Common::Point &position) override;
54
55 Graphics::Surface *getScreenshot() override;
56 Texture *copyScreenshotToTexture() override;
57
58private:
59 void drawFace(uint face, Texture *texture);
60};
61
62} // End of namespace Myst3
63
64#endif // GFX_H_
Definition: str.h:59
Definition: gfx_opengl.h:33
void selectTargetWindow(Window *window, bool is3D, bool scaled) override
Definition: gfx.h:107
Definition: gfx.h:93
Definition: gfx.h:65
Definition: system.h:166
Definition: rect.h:144
Definition: rect.h:536
Definition: surface.h:67