HDK
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
RE_OGLState.h
Go to the documentation of this file.
1
/*
2
* PROPRIETARY INFORMATION. This software is proprietary to
3
* Side Effects Software Inc., and is not to be reproduced,
4
* transmitted, or disclosed in any way without written permission.
5
*
6
* NAME: RE_OGLState.h ( UI Library, C++)
7
*
8
* COMMENTS:
9
* The stored GL state for RE_OGLRender.
10
*
11
*/
12
#ifndef RE_OGLState_h
13
#define RE_OGLState_h
14
15
#include "
RE_API.h
"
16
#include "
RE_Types.h
"
17
#include "
RE_TextureTypes.h
"
18
#include "
RE_Uniform.h
"
19
20
#include <
UT/UT_Rect.h
>
21
#include <
UT/UT_Array.h
>
22
#include <
UT/UT_BitArray.h
>
23
#include <
UT/UT_IntArray.h
>
24
25
class
RE_OGLFramebuffer
;
26
class
RE_OGLTexture
;
27
class
RE_Render
;
28
class
RE_Shader
;
29
30
class
RE_API
RE_OGLState
31
{
32
public
:
33
RE_OGLState
();
34
~
RE_OGLState
();
35
36
// clear all cached information without altering actual GL state
37
void
invalidate();
38
39
// State data
40
int
_colorBufferWriting
;
41
42
// 0 = disabled, 1 = enabled, 3 = state is unknown
43
unsigned
44
myFillOffsetState : 2,
45
myLineOffsetState : 2,
46
myLineSmoothingState : 2,
47
myPointOffsetState : 2,
48
mySampleMaskState : 2,
49
myScissorState : 2,
50
myStencilState : 2,
51
mySeamlessMapState : 2;
52
53
float
wPosX, wPosY,
wPosZ
;
54
float
rx, ry,
rz
;
55
56
UT_DimRect
scissorState
;
57
UT_DimRect
viewportState
;
58
59
int
viewportStateValid
;
60
int
scissorStateValid
;
61
62
float
myXZoom,
myYZoom
;
63
64
float
zNear
,
zFar
;
65
float
_offset_variable
;
66
float
_offset_constant
;
67
68
UT_Int32Array
mySampleMask
;
69
UT_BitArray
mySampleMaskValid
;
70
71
unsigned
myColorMask
;
72
73
int
_s_clear_value
;
74
int
_s_write_mask
;
75
RE_SFunction
_s_function
;
76
int
_s_function_ref
;
77
int
_s_function_mask
;
78
RE_SOperation
_s_operation_sfail
;
79
RE_SOperation
_s_operation_dpfail
;
80
RE_SOperation
_s_operation_dppass
;
81
82
// Stacks
83
RE_OGLFramebuffer
*myDrawFBOStack[
RE_FRAMEBUFFER_STACK_SIZE
];
84
int
myDrawFBOStackIndex
;
85
RE_OGLFramebuffer
*myReadFBOStack[
RE_FRAMEBUFFER_STACK_SIZE
];
86
int
myReadFBOStackIndex
;
87
88
float
lineWidthStack[
PATTERN_STACK_SIZE
];
89
int
lineWidthIndex
;
90
91
struct
92
{
93
float
pointSize
;
94
bool
programPointSize
;
95
} pointSizeStack[
PATTERN_STACK_SIZE
];
96
int
pointSizeIndex
;
97
98
struct
99
{
100
unsigned
char
read:4,
101
write:4;
102
} myAlignmentStack[
RE_ALIGN_STACK_SIZE
];
103
int
myAlignmentStackIndex
;
104
105
// These are the state caches for our mulitple texture units:
106
struct
re_TexStackItem
107
{
108
int
myActiveUnit
;
109
int
myRestoreUnit
;
110
uint8
myMinTexAdjust
;
111
uint8
myMaxTexAdjust
;
112
113
RE_TextureID
myUnits[
RE_MAX_TEXTURES
];
114
115
} myTexStack[
RE_MAX_TEXTURE_STATE_STACK
];
116
117
int
myTexStackIndex
;
118
119
// smooth lines stack
120
int
myBlendSmoothLevel
;
121
re_BlendSmoothState
myBlendSmoothStack[
RE_SMOOTH_STACK_SIZE
];
122
123
// stenciling stack
124
int
myStencilLevel
;
125
re_StencilState
myStencilStack[
RE_STENCIL_STACK_SIZE
];
126
127
// shader stack
128
int
myShaderLevel
;
129
RE_Shader
*myShaderStack[
RE_SHADER_STACK_SIZE
];
130
131
// depth stack
132
int
myDepthLevel
;
133
re_DepthState
myDepthStack[
RE_DEPTH_STACK_SIZE
];
134
135
// backface/winding stack
136
UT_IntArray
myBackfaceWinding
;
137
138
unsigned
myShaderStackValid : 1,
139
myFBOStackValid : 1;
140
141
UT_IntArray
myBoundUniformBlocks
;
142
};
143
144
#endif
re_BlendSmoothState
Definition:
RE_Types.h:753
RE_OGLState::pointSize
float pointSize
Definition:
RE_OGLState.h:93
UT_BitArray
Definition:
UT_BitArray.h:29
RE_STENCIL_STACK_SIZE
#define RE_STENCIL_STACK_SIZE
Definition:
RE_Types.h:934
RE_OGLState::myBoundUniformBlocks
UT_IntArray myBoundUniformBlocks
Definition:
RE_OGLState.h:141
RE_OGLState::re_TexStackItem::myMinTexAdjust
uint8 myMinTexAdjust
Definition:
RE_OGLState.h:110
RE_OGLState::zNear
float zNear
Definition:
RE_OGLState.h:64
RE_API.h
UT_IntArray.h
RE_API
#define RE_API
Definition:
RE_API.h:10
RE_OGLState::re_TexStackItem::myRestoreUnit
int myRestoreUnit
Definition:
RE_OGLState.h:109
RE_OGLState::viewportStateValid
int viewportStateValid
Definition:
RE_OGLState.h:59
RE_TextureTypes.h
UT_Rect.h
RE_OGLState::lineWidthIndex
int lineWidthIndex
Definition:
RE_OGLState.h:89
RE_OGLFramebuffer
Definition:
RE_OGLFramebuffer.h:73
UT_Array.h
RE_OGLState::myDrawFBOStackIndex
int myDrawFBOStackIndex
Definition:
RE_OGLState.h:84
UT_ValArray< int32 >
RE_OGLState::scissorState
UT_DimRect scissorState
Definition:
RE_OGLState.h:56
RE_OGLState::viewportState
UT_DimRect viewportState
Definition:
RE_OGLState.h:57
RE_OGLState::myReadFBOStackIndex
int myReadFBOStackIndex
Definition:
RE_OGLState.h:86
RE_DEPTH_STACK_SIZE
#define RE_DEPTH_STACK_SIZE
Definition:
RE_Types.h:939
RE_OGLState::scissorStateValid
int scissorStateValid
Definition:
RE_OGLState.h:60
RE_OGLState::programPointSize
bool programPointSize
Definition:
RE_OGLState.h:94
RE_OGLState::_s_function
RE_SFunction _s_function
Definition:
RE_OGLState.h:75
RE_OGLState::re_TexStackItem::myMaxTexAdjust
uint8 myMaxTexAdjust
Definition:
RE_OGLState.h:111
RE_OGLState::myShaderLevel
int myShaderLevel
Definition:
RE_OGLState.h:128
RE_OGLState::_colorBufferWriting
int _colorBufferWriting
Definition:
RE_OGLState.h:40
uint8
unsigned char uint8
Definition:
SYS_Types.h:36
RE_OGLState::re_TexStackItem
Definition:
RE_OGLState.h:106
RE_OGLState::myYZoom
float myYZoom
Definition:
RE_OGLState.h:62
RE_OGLState::_s_clear_value
int _s_clear_value
Definition:
RE_OGLState.h:73
RE_OGLState::myBackfaceWinding
UT_IntArray myBackfaceWinding
Definition:
RE_OGLState.h:136
UT_BitArray.h
RE_OGLState::mySampleMask
UT_Int32Array mySampleMask
Definition:
RE_OGLState.h:68
re_StencilState
Definition:
RE_Types.h:841
RE_OGLState::_s_operation_dpfail
RE_SOperation _s_operation_dpfail
Definition:
RE_OGLState.h:79
RE_TextureID
unsigned int RE_TextureID
Definition:
RE_TextureTypes.h:14
RE_OGLState::mySampleMaskValid
UT_BitArray mySampleMaskValid
Definition:
RE_OGLState.h:69
RE_Render
Definition:
RE_Render.h:29
RE_OGLState
Definition:
RE_OGLState.h:30
RE_FRAMEBUFFER_STACK_SIZE
#define RE_FRAMEBUFFER_STACK_SIZE
Definition:
RE_Types.h:936
RE_MAX_TEXTURE_STATE_STACK
#define RE_MAX_TEXTURE_STATE_STACK
Definition:
RE_TextureTypes.h:22
RE_Types.h
RE_Uniform.h
zFar
GLdouble GLdouble GLdouble GLdouble GLdouble zFar
Definition:
glad.h:2817
RE_OGLState::re_TexStackItem::myActiveUnit
int myActiveUnit
Definition:
RE_OGLState.h:108
RE_Shader
Definition:
RE_Shader.h:59
RE_OGLState::wPosZ
float wPosZ
Definition:
RE_OGLState.h:53
PATTERN_STACK_SIZE
#define PATTERN_STACK_SIZE
Definition:
RE_Types.h:932
RE_OGLState::myAlignmentStackIndex
int myAlignmentStackIndex
Definition:
RE_OGLState.h:103
RE_OGLTexture
Definition:
RE_OGLTexture.h:31
RE_OGLState::_s_function_ref
int _s_function_ref
Definition:
RE_OGLState.h:76
RE_OGLState::_s_function_mask
int _s_function_mask
Definition:
RE_OGLState.h:77
RE_OGLState::myColorMask
unsigned myColorMask
Definition:
RE_OGLState.h:71
UT_Rect< UT_DimRectImpl >
RE_SOperation
RE_SOperation
Definition:
RE_Types.h:495
RE_OGLState::rz
float rz
Definition:
RE_OGLState.h:54
RE_OGLState::myStencilLevel
int myStencilLevel
Definition:
RE_OGLState.h:124
RE_OGLState::myBlendSmoothLevel
int myBlendSmoothLevel
Definition:
RE_OGLState.h:120
RE_SHADER_STACK_SIZE
#define RE_SHADER_STACK_SIZE
Definition:
RE_Types.h:937
RE_OGLState::_s_write_mask
int _s_write_mask
Definition:
RE_OGLState.h:74
RE_OGLState::_offset_variable
float _offset_variable
Definition:
RE_OGLState.h:65
RE_OGLState::myTexStackIndex
int myTexStackIndex
Definition:
RE_OGLState.h:117
RE_OGLState::_s_operation_sfail
RE_SOperation _s_operation_sfail
Definition:
RE_OGLState.h:78
RE_OGLState::myDepthLevel
int myDepthLevel
Definition:
RE_OGLState.h:132
RE_OGLState::_s_operation_dppass
RE_SOperation _s_operation_dppass
Definition:
RE_OGLState.h:80
RE_SFunction
RE_SFunction
Definition:
RE_Types.h:483
RE_OGLState::_offset_constant
float _offset_constant
Definition:
RE_OGLState.h:66
RE_SMOOTH_STACK_SIZE
#define RE_SMOOTH_STACK_SIZE
Definition:
RE_Types.h:933
RE_MAX_TEXTURES
#define RE_MAX_TEXTURES
Definition:
RE_TextureTypes.h:17
RE_OGLState::pointSizeIndex
int pointSizeIndex
Definition:
RE_OGLState.h:96
re_DepthState
Definition:
RE_Types.h:911
RE_ALIGN_STACK_SIZE
#define RE_ALIGN_STACK_SIZE
Definition:
RE_Types.h:935
RE
RE_OGLState.h
Generated on Sun Nov 17 2024 03:03:18 for HDK by
1.8.6