LCOV - code coverage report
Current view: top level - eq/fabric - renderContext.cpp (source / functions) Hit Total Coverage
Test: Equalizer Lines: 4 16 25.0 %
Date: 2016-07-30 05:04:55 Functions: 3 5 60.0 %

          Line data    Source code
       1             : 
       2             : /* Copyright (c) 2006-2016, 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       15468 : RenderContext::RenderContext()
      28             :     : frameID( 0 )
      29             :     , overdraw( Vector4i::ZERO )
      30             :     , offset( Vector2i::ZERO )
      31             :     , buffer( 0x0405 ) // GL_BACK
      32             :     , taskID( 0 )
      33             :     , period( 1 )
      34             :     , phase( 0 )
      35       15468 :     , eye( EYE_CYCLOP )
      36             : {
      37       15468 : }
      38             : 
      39           0 : void RenderContext::apply( const Tile& tile, const bool local )
      40             : {
      41           0 :     frustum = tile.frustum;
      42           0 :     ortho = tile.ortho;
      43           0 :     pvp = tile.pvp;
      44           0 :     vp = tile.vp;
      45           0 :     if( !local )
      46             :     {
      47           0 :         pvp.x = 0;
      48           0 :         pvp.y = 0;
      49             :     }
      50           0 : }
      51             : 
      52           0 : std::ostream& operator << ( std::ostream& os, const RenderContext& ctx )
      53             : {
      54           0 :     return os << "ID " << ctx.frameID << " pvp " << ctx.pvp << " vp " << ctx.vp
      55           0 :               << " " << ctx.range << " " << ctx.eye << " " << ctx.zoom;
      56             : }
      57             : 
      58             : }
      59          84 : }

Generated by: LCOV version 1.11