Line data Source code
1 :
2 : /* Copyright (c) 2006-2014, 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 : #include "renderContext.h"
19 : #include "tile.h"
20 :
21 : namespace eq
22 : {
23 : namespace fabric
24 : {
25 :
26 : // cppcheck-suppress uninitMemberVar
27 4187 : RenderContext::RenderContext()
28 : : frustum( Frustumf::DEFAULT )
29 : , ortho( Frustumf::DEFAULT )
30 : , headTransform( Matrix4f::IDENTITY )
31 : , orthoTransform( Matrix4f::IDENTITY )
32 : , frameID( 0 )
33 : , overdraw( Vector4i::ZERO )
34 : , offset( Vector2i::ZERO )
35 : , buffer( 0x0405 ) // GL_BACK
36 : , taskID( 0 )
37 : , period( 1 )
38 : , phase( 0 )
39 4187 : , eye( EYE_CYCLOP )
40 : {
41 4187 : }
42 :
43 0 : void RenderContext::apply( const Tile& tile )
44 : {
45 0 : frustum = tile.frustum;
46 0 : ortho = tile.ortho;
47 0 : pvp = tile.pvp;
48 0 : vp = tile.vp;
49 0 : }
50 :
51 0 : std::ostream& operator << ( std::ostream& os, const RenderContext& ctx )
52 : {
53 0 : return os << "ID " << ctx.frameID << " pvp " << ctx.pvp << " vp " << ctx.vp
54 0 : << " " << ctx.range << " " << ctx.eye << " " << ctx.zoom;
55 : }
56 :
57 : }
58 45 : }
|