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: 2017-12-16 05:07:20 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             : // cppcheck-suppress uninitMemberVar
      26        7534 : RenderContext::RenderContext()
      27             :     : frameID(0)
      28             :     , buffer(0x0405) // GL_BACK
      29             :     , taskID(0)
      30             :     , period(1)
      31             :     , phase(0)
      32        7534 :     , eye(EYE_CYCLOP)
      33             : {
      34        7534 : }
      35             : 
      36           0 : void RenderContext::apply(const Tile& tile, const bool local)
      37             : {
      38           0 :     frustum = tile.frustum;
      39           0 :     ortho = tile.ortho;
      40           0 :     pvp = tile.pvp;
      41           0 :     vp = tile.vp;
      42           0 :     if (!local)
      43             :     {
      44           0 :         pvp.x = 0;
      45           0 :         pvp.y = 0;
      46             :     }
      47           0 : }
      48             : 
      49           0 : std::ostream& operator<<(std::ostream& os, const RenderContext& ctx)
      50             : {
      51           0 :     return os << "ID " << ctx.frameID << " pvp " << ctx.pvp << " vp " << ctx.vp
      52           0 :               << " " << ctx.range << " " << ctx.eye << " " << ctx.zoom;
      53             : }
      54             : }
      55          60 : }

Generated by: LCOV version 1.11