Equalizer  2.1.0
Parallel Rendering Framework
fabric/frameData.h
1 
2 /* Copyright (c) 2006-2017, Stefan Eilemann <eile@equalizergraphics.com>
3  * Daniel Nachbaur <danielnachbaur@gmail.com>
4  *
5  * This library is free software; you can redistribute it and/or modify it under
6  * the terms of the GNU Lesser General Public License version 2.1 as published
7  * by the Free Software Foundation.
8  *
9  * This library is distributed in the hope that it will be useful, but WITHOUT
10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11  * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12  * details.
13  *
14  * You should have received a copy of the GNU Lesser General Public License
15  * along with this library; if not, write to the Free Software Foundation, Inc.,
16  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17  */
18 
19 #ifndef EQFABRIC_FRAMEDATA_H
20 #define EQFABRIC_FRAMEDATA_H
21 
22 #include <eq/fabric/api.h>
23 #include <eq/fabric/types.h>
24 #include <eq/fabric/vmmlib.h>
25 
26 #include <eq/fabric/frame.h> // for Frame::Type
27 #include <eq/fabric/renderContext.h> // member
28 
29 namespace eq
30 {
31 namespace fabric
32 {
33 class FrameData
34 {
35 public:
36  FrameData()
37  : _frameType(Frame::TYPE_MEMORY)
38  , _buffers(Frame::Buffer::none)
39  {
40  }
41 
49  void setPixelViewport(const PixelViewport& pvp) { _pvp = pvp; }
51  const PixelViewport& getPixelViewport() const { return _pvp; }
53  void setBuffers(const Frame::Buffer buffers) { _buffers = buffers; }
55  void disableBuffer(const Frame::Buffer buffer) { _buffers &= ~buffer; }
57  Frame::Buffer getBuffers() const { return _buffers; }
59  void setContext(const RenderContext& context) { _context = context; }
61  const RenderContext& getContext() const { return _context; }
62  RenderContext& getContext() { return _context; }
64  void setZoom(const Zoom& zoom) { _zoom = zoom; }
66  const Zoom& getZoom() const { return _zoom; }
72  void setType(const fabric::Frame::Type type) { _frameType = type; }
74  Frame::Type getType() const { return _frameType; }
75  EQFABRIC_API void serialize(co::DataOStream& os) const;
76  EQFABRIC_API void deserialize(co::DataIStream& is);
77 
78 protected:
79  PixelViewport _pvp;
80  RenderContext _context; //<! source channel render context
81  Zoom _zoom;
82  Frame::Type _frameType;
83  Frame::Buffer _buffers;
84 };
85 }
86 }
87 
88 #endif // EQFABRIC_FRAMEDATA_H
A zoom specification with methods for manipulation.
Definition: zoom.h:35
const RenderContext & getContext() const
Frame::Buffer getBuffers() const
Defines export visibility macros for library EqualizerFabric.
void disableBuffer(const Frame::Buffer buffer)
Disable the usage of a frame buffer attachment for all images.
Frame::Type getType() const
const Zoom & getZoom() const
const PixelViewport & getPixelViewport() const
void setBuffers(const Frame::Buffer buffers)
Set the (color, depth) buffers of the source frame.
void setType(const fabric::Frame::Type type)
Set the frame storage type.
Type
The storage type for pixel data.
Definition: fabric/frame.h:52
The Equalizer client library.
Definition: eq/agl/types.h:23
use main memory to store pixel data
Definition: fabric/frame.h:54
Buffer
Components of the frame are to be used during readback and assembly.
Definition: fabric/frame.h:42
void setZoom(const Zoom &zoom)
Set additional zoom for input frames.
void setPixelViewport(const PixelViewport &pvp)
Set the covered area for readbacks.
void setContext(const RenderContext &context)
Set the source context decomposition wrt dest channel.
The context applied to a channel during rendering operations.
Definition: renderContext.h:37
Holds a 2D pixel viewport with methods for manipulation.
Definition: pixelViewport.h:34