ScummVM API documentation
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
playground3d.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 PLAYGROUND3D_H
23 #define PLAYGROUND3D_H
24 
25 #include "common/array.h"
26 
27 #include "graphics/framelimiter.h"
28 
29 #include "engines/engine.h"
30 
31 #include "engines/playground3d/gfx.h"
32 
33 namespace Playground3d {
34 
35 class Playground3dEngine : public Engine {
36 public:
38  ~Playground3dEngine() override;
39 
40  Common::Error run() override;
41 
42  bool hasFeature(EngineFeature f) const override;
43 
44  void genTextures();
45 
46  void processInput();
47 
48  void drawFrame(int testId);
49 
50 private:
51  OSystem *_system;
52  Renderer *_gfx;
53  Graphics::FrameLimiter *_frameLimiter;
54  Math::Vector4d _clearColor;
55  Math::Vector4d _fogColor;
56  float _fade;
57  bool _fadeIn;
58  bool _fogEnable;
59  Graphics::Surface *_rgbaTexture;
60  Graphics::Surface *_rgbTexture;
61  Graphics::Surface *_rgb565Texture;
62  Graphics::Surface *_rgba5551Texture;
63  Graphics::Surface *_rgba4444Texture;
64 
65  float _rotateAngleX, _rotateAngleY, _rotateAngleZ;
66 
67  Graphics::Surface *generateRgbaTexture(int width, int height, Graphics::PixelFormat format);
68  void drawAndRotateCube();
69  void drawPolyOffsetTest();
70  void dimRegionInOut();
71  void drawInViewport();
72  void drawRgbaTexture();
73 };
74 
75 } // End of namespace Playground3d
76 
77 #endif // PLAYGROUND3D_H
Definition: framelimiter.h:37
Definition: gfx.h:35
Definition: surface.h:67
EngineFeature
Definition: engine.h:253
Definition: error.h:84
Common::Error run() override
Definition: pixelformat.h:138
bool hasFeature(EngineFeature f) const override
Definition: gfx.h:37
Definition: playground3d.h:35
Definition: system.h:161
Definition: engine.h:144