forked from farbrausch/fr_public
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.hpp
91 lines (75 loc) · 2.34 KB
/
main.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
/*+**************************************************************************/
/*** ***/
/*** This file is distributed under a BSD license. ***/
/*** See LICENSE.txt for details. ***/
/*** ***/
/**************************************************************************+*/
/****************************************************************************/
/*** ***/
/*** (C) 2005 Dierk Ohlerich, all rights reserved ***/
/*** ***/
/****************************************************************************/
#ifndef FILE_CUBE_MAIN_HPP
#define FILE_CUBE_MAIN_HPP
#include "base/system.hpp"
#include "base/graphics.hpp"
#include "util/painter.hpp"
#include "util/shaders.hpp"
/****************************************************************************/
enum Lines
{
LINE_DISPLAY,
LINE_WINDOW,
LINE_SCREEN,
LINE_REFRESH,
LINE_FSAA,
LINE_ASPECT,
LINE_RTSIZE,
LINE_OVERSIZE,
LINE_OVERFSAA,
LINE_MAX,
};
struct Resolution
{
sString<64> Name;
sInt XSize,YSize;
void Init(sInt x,sInt y,const sChar *name) { XSize=x; YSize=y; Name.PrintF(name,x,y); }
};
class MyApp : public sApp
{
sPainter *Painter;
sTexture2D *Tex;
sMaterial *Mtrl;
sMaterial *White;
sGeometry *Geo;
sGeometry *GeoQuad;
sMaterialEnv Env;
sArray<Resolution> ScreenSizes;
sArray<Resolution> ScreenAspects;
sArray<Resolution> RefreshRates;
sArray<Resolution> MultisampleModes;
sArray<Resolution> OverSizes;
sArray<Resolution> RTSizes;
sScreenMode LastMode;
sInt Cursor;
sInt SetMax[LINE_MAX];
sInt SetStrobe[LINE_MAX];
sString<128> SetString[LINE_MAX];
sChar *SetLabel[LINE_MAX];
sTiming Timer;
void PaintRT(sInt time);
void PaintCube(sInt time);
void PaintSamplePattern(sInt time);
public:
MyApp();
~MyApp();
void OnPaint3D();
void OnPrepareFrame();
void OnInput(const sInput2Event &ie);
void InitGui();
void ExitGui();
void PrintGui();
void UpdateGui();
};
/****************************************************************************/
#endif // FILE_CUBE_MAIN_HPP