Equalizer  1.11.0
Parallel Rendering Framework
fabric/frame.h
1 /* Copyright (c) 2012-2016, Stefan Eilemann <eile@eyescale.ch>
2  *
3  * This library is free software; you can redistribute it and/or modify it under
4  * the terms of the GNU Lesser General Public License version 2.1 as published
5  * by the Free Software Foundation.
6  *
7  * This library is distributed in the hope that it will be useful, but WITHOUT
8  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9  * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
10  * details.
11  *
12  * You should have received a copy of the GNU Lesser General Public License
13  * along with this library; if not, write to the Free Software Foundation, Inc.,
14  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
15  */
16 
17 #ifndef EQFABRIC_FRAME_H
18 #define EQFABRIC_FRAME_H
19 
20 #include <eq/fabric/api.h>
21 #include <eq/fabric/eye.h> // enum
22 #include <eq/fabric/types.h>
23 #include <co/object.h> // base class
24 
25 namespace eq
26 {
27 namespace fabric
28 {
29 namespace detail { class Frame; }
30 
32 class Frame : public co::Object
33 {
34 public:
39  enum Buffer
40  {
41  BUFFER_NONE = LB_BIT_NONE,
42  BUFFER_UNDEFINED = LB_BIT1,
43  BUFFER_COLOR = LB_BIT5,
44  BUFFER_DEPTH = LB_BIT9,
45  BUFFER_ALL = LB_BIT_ALL_32
46  };
47 
49  enum Type
50  {
53  };
54 
56  EQFABRIC_API Frame();
57 
59  EQFABRIC_API virtual ~Frame();
60 
64  EQFABRIC_API void setName( const std::string& name );
65 
67  EQFABRIC_API const std::string& getName() const;
68 
70  EQFABRIC_API const Vector2i& getOffset() const;
71 
80  EQFABRIC_API void setOffset( const Vector2i& offset );
81 
90  EQFABRIC_API void setZoom( const Zoom& zoom );
91 
93  EQFABRIC_API const Zoom& getZoom() const;
94 
96  EQFABRIC_API const co::ObjectVersion& getDataVersion( const Eye ) const;
98 
100  EQFABRIC_API
101  const std::vector< uint128_t >& getInputNodes( const Eye eye ) const;
102 
104  EQFABRIC_API const co::NodeIDs& getInputNetNodes(const Eye eye) const;
105 
106 protected:
107  virtual ChangeType getChangeType() const { return INSTANCE; }
108  EQFABRIC_API virtual void getInstanceData( co::DataOStream& os );
109  EQFABRIC_API virtual void applyInstanceData( co::DataIStream& is );
110 
112  EQFABRIC_API void _setDataVersion( const unsigned i,
113  const co::ObjectVersion& ov );
114 
116  EQFABRIC_API std::vector< uint128_t >& _getInputNodes( const unsigned i );
117 
119  EQFABRIC_API co::NodeIDs& _getInputNetNodes( const unsigned i );
120 
121 private:
122  detail::Frame* const _impl;
123 };
124 
126 EQFABRIC_API std::ostream& operator << ( std::ostream&, const Frame& );
128 EQFABRIC_API std::ostream& operator << ( std::ostream&, const Frame::Type );
130 EQFABRIC_API std::ostream& operator << (std::ostream&, const Frame::Buffer);
131 }
132 }
133 
134 namespace lunchbox
135 {
136 template<> inline void byteswap( eq::fabric::Frame::Type& value )
137  { byteswap( reinterpret_cast< uint32_t& >( value )); }
138 }
139 #endif // EQFABRIC_FRAME_H
EQFABRIC_API void setName(const std::string &name)
Set the name of the frame.
A zoom specification with methods for manipulation.
Definition: zoom.h:35
EQFABRIC_API Frame()
Construct a new frame.
Defines export visibility macros for library EqualizerFabric.
Buffer
Components of the frame are to be used during readback and assembly.
Definition: fabric/frame.h:39
EQFABRIC_API void setOffset(const Vector2i &offset)
Set the position of the frame wrt the channel.
Type
The storage type for pixel data.
Definition: fabric/frame.h:49
virtual EQFABRIC_API ~Frame()
Destruct the frame.
Eye
Eye pass bit mask for which is enabled.
Definition: fabric/eye.h:33
use a GL texture to store pixel data
Definition: fabric/frame.h:52
A holder for a frame data and related parameters.
Definition: fabric/frame.h:32
Inherit, only if no others are set.
Definition: fabric/frame.h:42
EQFABRIC_API const Zoom & getZoom() const
The Equalizer client library.
Definition: eq/agl/types.h:23
use main memory to store pixel data
Definition: fabric/frame.h:51
EQFABRIC_API const std::string & getName() const
EQFABRIC_API void setZoom(const Zoom &zoom)
Set the zoom for this frame holder.
EQFABRIC_API const Vector2i & getOffset() const