Equalizer  1.6.1
renderContext.h
1 
2 /* Copyright (c) 2006-2012, Stefan Eilemann <eile@equalizergraphics.com>
3  *
4  * This library is free software; you can redistribute it and/or modify it under
5  * the terms of the GNU Lesser General Public License version 2.1 as published
6  * by the Free Software Foundation.
7  *
8  * This library is distributed in the hope that it will be useful, but WITHOUT
9  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
10  * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
11  * details.
12  *
13  * You should have received a copy of the GNU Lesser General Public License
14  * along with this library; if not, write to the Free Software Foundation, Inc.,
15  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16  */
17 
18 #ifndef EQFABRIC_RENDERCONTEXT_H
19 #define EQFABRIC_RENDERCONTEXT_H
20 
21 #include <eq/fabric/colorMask.h> // member
22 #include <eq/fabric/eye.h> // member
23 #include <eq/fabric/pixel.h> // member
24 #include <eq/fabric/pixelViewport.h> // member
25 #include <eq/fabric/range.h> // member
26 #include <eq/fabric/subPixel.h> // member
27 #include <eq/fabric/types.h>
28 #include <eq/fabric/zoom.h> // member
29 
30 #include <co/objectVersion.h>
31 #include <eq/fabric/api.h>
32 
33 namespace eq
34 {
35 namespace fabric
36 {
39  {
40  public:
41  EQFABRIC_API RenderContext();
42  EQFABRIC_API void apply( const Tile& tile );
43 
46 
49 
50  co::ObjectVersion view;
51  uint128_t frameID;
54  Vector4i overdraw;
56 
61 
62  uint32_t buffer;
63  uint32_t taskID;
64  uint32_t period;
65  uint32_t phase;
66  Eye eye;
67  uint32_t alignToEight;
68 
70  bool alignDummy[28];
71  };
72 
73  EQFABRIC_API std::ostream& operator << ( std::ostream& os,
74  const RenderContext& ctx );
75 }
76 }
77 
78 namespace lunchbox
79 {
80 template<> inline void byteswap( eq::fabric::RenderContext& value )
81 {
82  byteswap( value.frustum );
83  byteswap( value.ortho );
84 
85  byteswap( value.headTransform );
86  byteswap( value.orthoTransform );
87 
88  byteswap( value.view );
89  byteswap( value.frameID );
90  byteswap( value.pvp );
91  byteswap( value.pixel );
92  byteswap( value.overdraw );
93  byteswap( value.vp );
94 
95  byteswap( value.offset );
96  byteswap( value.range );
97  byteswap( value.subpixel );
98  byteswap( value.zoom );
99 
100  byteswap( value.buffer );
101  byteswap( value.taskID );
102  byteswap( value.period );
103  byteswap( value.phase );
104  byteswap( value.eye );
105 
106  byteswap( value.bufferMask );
107 }
108 }
109 
110 #endif // EQFABRIC_RENDERCONTEXT_H
The context applied to a channel during rendering operations.
Definition: renderContext.h:38
A fractional database range with methods for manipulation.
Definition: range.h:30
Eye eye
current eye pass
Definition: renderContext.h:66
Viewport vp
fractional viewport wrt dest view
Definition: renderContext.h:55
vmml::vector< 4, int > Vector4i
A four-component integer vector.
Definition: vmmlib.h:42
Vector2i offset
absolute position wrt dest channel
Definition: renderContext.h:57
co::ObjectVersion view
destination view id and version
Definition: renderContext.h:50
Holds a pixel decomposition specification with methods for manipulation.
Definition: pixel.h:39
SubPixel subpixel
subpixel decomposition wrt to dest
Definition: renderContext.h:59
Range range
database-range wrt to dest channel
Definition: renderContext.h:58
Eye
Eye pass bit mask for which is enabled.
Definition: fabric/eye.h:32
uint128_t frameID
identifier from Config::beginFrame
Definition: renderContext.h:51
Holds a subpixel decomposition specification along with some methods for manipulation.
Definition: subPixel.h:41
ColorMask bufferMask
color mask for anaglyph stereo
Definition: renderContext.h:69
uint32_t phase
DPlex phase.
Definition: renderContext.h:65
uint32_t period
DPlex period.
Definition: renderContext.h:64
Holds a 2D pixel viewport with methods for manipulation.
Definition: pixelViewport.h:34
vmml::matrix< 4, 4, float > Matrix4f
A 4x4 float matrix.
Definition: vmmlib.h:39
PixelViewport pvp
pixel viewport of channel wrt window
Definition: renderContext.h:52
Matrix4f headTransform
frustum transform for modelview
Definition: renderContext.h:47
Frustumf frustum
frustum for projection matrix
Definition: renderContext.h:44
Defines which parts of the color buffer are to be written.
Definition: colorMask.h:33
Pixel pixel
pixel decomposition wrt to dest
Definition: renderContext.h:53
A zoom specification with methods for manipulation.
Definition: zoom.h:34
Zoom zoom
up/downsampling wrt to dest
Definition: renderContext.h:60
vmml::frustum< float > Frustumf
A frustum definition.
Definition: vmmlib.h:50
Frustumf ortho
ortho frustum for projection matrix
Definition: renderContext.h:45
Matrix4f orthoTransform
orthographic frustum transform
Definition: renderContext.h:48
A fractional viewport with methods for manipulation.
Definition: viewport.h:36
uint32_t buffer
buffer as passed to glDrawBuffer()
Definition: renderContext.h:62
vmml::vector< 2, int > Vector2i
A two-component integer vector.
Definition: vmmlib.h:40