LCOV - code coverage report
Current view: top level - eq/fabric - renderContext.h (source / functions) Hit Total Coverage
Test: Equalizer Lines: 1 23 4.3 %
Date: 2016-09-29 05:02:09 Functions: 2 3 66.7 %

          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             : #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/vmmlib.h>
      28             : #include <eq/fabric/zoom.h>             // member
      29             : #include <co/objectVersion.h>
      30             : #include <eq/fabric/api.h>
      31             : 
      32             : namespace eq
      33             : {
      34             : namespace fabric
      35             : {
      36             : /** The context applied to a channel during rendering operations. */
      37       11776 : class RenderContext
      38             : {
      39             : public:
      40             :     EQFABRIC_API RenderContext();
      41             :     EQFABRIC_API void apply( const Tile& tile, bool local ); //!< @internal
      42             : 
      43             :     Frustumf       frustum;        //!< frustum for projection matrix
      44             :     Frustumf       ortho;          //!< ortho frustum for projection matrix
      45             : 
      46             :     Matrix4f       headTransform;  //!< frustum transform for modelview
      47             :     Matrix4f       orthoTransform; //!< orthographic frustum transform
      48             : 
      49             :     co::ObjectVersion view;        //!< destination view id and version
      50             :     uint128_t      frameID;        //!< identifier from Config::beginFrame
      51             :     PixelViewport  pvp;            //!< pixel viewport of channel wrt window
      52             :     Pixel          pixel;          //!< pixel decomposition wrt to dest
      53             :     Vector4i       overdraw;       //!< @internal for pw pp filters
      54             :     Viewport       vp;             //!< fractional viewport wrt dest view
      55             : 
      56             :     Vector2i       offset;         //!< absolute position wrt dest channel
      57             :     Range          range;          //!< database-range wrt to dest channel
      58             :     SubPixel       subPixel;       //!< subpixel decomposition wrt to dest
      59             :     Zoom           zoom;           //!< up/downsampling wrt to dest
      60             : 
      61             :     uint32_t       buffer;         //!< buffer as passed to glDrawBuffer()
      62             :     uint32_t       taskID;         //!< @internal per-channel task counter
      63             :     uint32_t       period;         //!< DPlex period
      64             :     uint32_t       phase;          //!< DPlex phase
      65             :     Eye            eye;            //!< current eye pass
      66             :     uint32_t       alignToEight;   //!< @internal padding
      67             : 
      68             :     ColorMask      bufferMask;     //!< color mask for anaglyph stereo
      69             :     bool           alignDummy[28]; //!< @internal padding
      70             : };
      71             : 
      72             : EQFABRIC_API std::ostream& operator << ( std::ostream&, const RenderContext& );
      73             : }
      74             : }
      75             : 
      76             : namespace lunchbox
      77             : {
      78           0 : template<> inline void byteswap( eq::fabric::RenderContext& value )
      79             : {
      80           0 :     byteswap( value.frustum );
      81           0 :     byteswap( value.ortho );
      82             : 
      83           0 :     byteswap( value.headTransform );
      84           0 :     byteswap( value.orthoTransform );
      85             : 
      86           0 :     byteswap( value.view );
      87           0 :     byteswap( value.frameID );
      88           0 :     byteswap( value.pvp );
      89           0 :     byteswap( value.pixel );
      90           0 :     byteswap( value.overdraw );
      91           0 :     byteswap( value.vp );
      92             : 
      93           0 :     byteswap( value.offset );
      94           0 :     byteswap( value.range );
      95           0 :     byteswap( value.subPixel );
      96           0 :     byteswap( value.zoom );
      97             : 
      98           0 :     byteswap( value.buffer );
      99           0 :     byteswap( value.taskID );
     100           0 :     byteswap( value.period );
     101           0 :     byteswap( value.phase );
     102           0 :     byteswap( value.eye );
     103             : 
     104           0 :     byteswap( value.bufferMask );
     105           0 : }
     106             : }
     107             : 
     108             : #endif // EQFABRIC_RENDERCONTEXT_H

Generated by: LCOV version 1.11