renderContext.h

00001 
00002 /* Copyright (c) 2006-2009, Stefan Eilemann <eile@equalizergraphics.com> 
00003  *
00004  * This library is free software; you can redistribute it and/or modify it under
00005  * the terms of the GNU Lesser General Public License version 2.1 as published
00006  * by the Free Software Foundation.
00007  *  
00008  * This library is distributed in the hope that it will be useful, but WITHOUT
00009  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
00010  * FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more
00011  * details.
00012  * 
00013  * You should have received a copy of the GNU Lesser General Public License
00014  * along with this library; if not, write to the Free Software Foundation, Inc.,
00015  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
00016  */
00017 
00018 #ifndef EQ_RENDERCONTEXT_H
00019 #define EQ_RENDERCONTEXT_H
00020 
00021 #include <eq/client/colorMask.h>        // member
00022 #include <eq/client/eye.h>              // member
00023 #include <eq/client/pixel.h>            // member
00024 #include <eq/client/pixelViewport.h>    // member
00025 #include <eq/client/range.h>            // member
00026 #include <eq/client/types.h>
00027 #include <eq/client/zoom.h>             // member
00028 
00029 #include <eq/net/objectVersion.h>
00030 #include <eq/base/base.h>
00031 
00032 
00033 
00034 namespace eq
00035 {
00039     struct RenderContext 
00040     {
00041     public: 
00042         EQ_EXPORT RenderContext();
00043 
00044         uint32_t       frameID;        //<! identifier from Config::beginFrame
00045 
00046         uint32_t       buffer;         //<! buffer as passed to glDrawBuffer() 
00047         ColorMask      bufferMask;     //<! color mask for anaglyph stereo
00048         PixelViewport  pvp;            //<! pixel viewport of channel wrt window
00049         Frustumf       frustum;        //<! frustum for projection matrix
00050         Frustumf       ortho;          //<! ortho frustum for projection matrix
00051         Matrix4f       headTransform;  //<! frustum transform for modelview
00052 
00053         Viewport       vp;             //<! fractional viewport wrt dest channel
00054         Range          range;          //<! database-range wrt to dest channel
00055         Pixel          pixel;          //<! pixel decomposition wrt to dest
00056         Zoom           zoom;           //<! up/downsampling wrt to dest
00057         Vector2i       offset;         //<! absolute position wrt dest channel
00058 
00059         Eye            eye;            //<! current eye pass
00060         net::ObjectVersion view;       //<! destination view id and version
00061 
00062         Vector4i overdraw;
00063         uint32_t       taskID;
00064 
00065         union // placeholder for binary-compatible changes
00066         {
00067             char dummy[16];
00068         };
00069     };
00070 
00071     EQ_EXPORT std::ostream& operator << ( std::ostream& os, 
00072                                           const RenderContext& ctx );
00073 }
00074 
00075 #endif // EQ_RENDERCONTEXT_H
Generated on Mon Aug 10 18:58:41 2009 for Equalizer 0.9 by  doxygen 1.5.8