-
Notifications
You must be signed in to change notification settings - Fork 1
/
displayop.hpp
80 lines (65 loc) · 1.67 KB
/
displayop.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
#ifndef DISPLAYOPERATION_HPP
#define DISPLAYOPERATION_HPP
class DisplayOperation;
class OpenGLDisplay;
class OpcodeState;
#include "framebuffer.hpp"
#include "ogl.hpp"
class DisplayOperation {
public:
virtual void execute( OpcodeState &state ) = 0;
virtual ~DisplayOperation() {}
};
class Repaint : public DisplayOperation {
public:
Repaint() {}
~Repaint() {}
void execute( OpcodeState &state );
};
class DrawAndUnlockFrame : public DisplayOperation {
private:
FrameHandle *handle;
static void load_tex( GLenum tnum, GLuint tex, uint width, uint height,
uint8_t *data );
public:
DrawAndUnlockFrame( FrameHandle *s_handle ) { handle = s_handle; }
~DrawAndUnlockFrame() { handle->decrement_lockcount(); }
void execute( OpcodeState &state );
};
class LoadMatrixCoefficients : public DisplayOperation {
private:
double green[ 3 ], blue[ 3 ], red[ 3 ];
public:
LoadMatrixCoefficients( double s_green[ 3 ],
double s_blue[ 3 ],
double s_red[ 3 ] ) {
for ( int i = 0; i < 3; i++ ) {
green[ i ] = s_green[ i ];
blue[ i ] = s_blue[ i ];
red[ i ] = s_red[ i ];
}
}
~LoadMatrixCoefficients() {}
void execute( OpcodeState &state );
};
class ShutDown : public DisplayOperation {
public:
ShutDown() {}
~ShutDown() {}
void execute( OpcodeState &state );
};
class FullScreenMode : public DisplayOperation {
private:
bool fullscreen;
public:
FullScreenMode( bool s_fullscreen ) { fullscreen = s_fullscreen; }
~FullScreenMode() {}
void execute( OpcodeState &state );
};
class NullOperation : public DisplayOperation {
public:
NullOperation( void ) {}
~NullOperation( void ) {}
void execute( OpcodeState & ) {}
};
#endif