Equalizer  1.10.1
Parallel Rendering Framework
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
frame.h
1 
2 /* Copyright (c) 2006-2013, Stefan Eilemann <eile@equalizergraphics.com>
3  * 2011, Daniel Nachbaur <danielnachbaur@gmail.com>
4  * 2010, Cedric Stalder <cedric.stalder@gmail.com>
5  *
6  * This library is free software; you can redistribute it and/or modify it under
7  * the terms of the GNU Lesser General Public License version 2.1 as published
8  * by the Free Software Foundation.
9  *
10  * This library is distributed in the hope that it will be useful, but WITHOUT
11  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12  * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
13  * details.
14  *
15  * You should have received a copy of the GNU Lesser General Public License
16  * along with this library; if not, write to the Free Software Foundation, Inc.,
17  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18  */
19 
20 #ifndef EQ_FRAME_H
21 #define EQ_FRAME_H
22 
23 #include <eq/api.h>
24 #include <eq/types.h>
25 #include <eq/zoomFilter.h> // enum
26 #include <eq/fabric/frame.h> // base class
27 
28 namespace eq
29 {
30 namespace detail{ class Frame; }
31 
42  class Frame : public fabric::Frame
43  {
44  public:
46  EQ_API Frame();
47 
49  EQ_API virtual ~Frame();
50 
54  EQ_API const std::string& getName() const;
55 
60  EQ_API const Range& getRange() const;
61 
66  EQ_API const Pixel& getPixel() const;
67 
72  EQ_API const SubPixel& getSubPixel() const;
73 
78  EQ_API uint32_t getPeriod() const;
79 
84  EQ_API uint32_t getPhase() const;
85 
90  EQ_API void setZoomFilter( const ZoomFilter zoomFilter );
91 
96  EQ_API ZoomFilter getZoomFilter() const;
97 
99  EQ_API const Images& getImages() const;
100 
102  EQ_API void setFrameData( FrameDataPtr data );
103 
105  EQ_API FrameDataPtr getFrameData();
106 
108  EQ_API ConstFrameDataPtr getFrameData() const;
109 
111  EQ_API uint32_t getBuffers() const;
112 
119  EQ_API void disableBuffer( const Buffer buffer );
120 
122  EQ_API void setAlphaUsage( const bool useAlpha );
123 
125  EQ_API void setQuality( const Buffer buffer, const float quality );
126 
128  EQ_API void useCompressor( const Buffer buffer, const uint32_t name );
130 
134  EQ_API void clear();
135 
137  void deleteGLObjects( util::ObjectManager& om );
138 
148  EQ_API void readback( util::ObjectManager& glObjects,
149  const DrawableConfig& config );
150 
161  EQ_API void readback( util::ObjectManager& glObjects,
162  const DrawableConfig& config,
163  const PixelViewports& regions );
164 
178  EQ_API Images startReadback( util::ObjectManager& glObjects,
179  const DrawableConfig& config,
180  const PixelViewports& regions );
181 
189  void setReady();
190 
197  EQ_API bool isReady() const;
198 
200  EQ_API void waitReady( const uint32_t timeout =
201  LB_TIMEOUT_INDEFINITE ) const;
202 
209  void addListener( lunchbox::Monitor<uint32_t>& listener );
210 
217  void removeListener( lunchbox::Monitor<uint32_t>& listener );
219 
220  private:
221  detail::Frame* const _impl;
222  };
223 };
224 #endif // EQ_FRAME_H
EQ_API bool isReady() const
Test the readiness of the frame.
EQ_API uint32_t getBuffers() const
void removeListener(lunchbox::Monitor< uint32_t > &listener)
Remove a frame listener.
EQ_API uint32_t getPhase() const
EQ_API const Pixel & getPixel() const
EQ_API const SubPixel & getSubPixel() const
EQ_API Frame()
Construct a new frame.
EQ_API ZoomFilter getZoomFilter() const
EQ_API const Range & getRange() const
EQ_API void readback(util::ObjectManager &glObjects, const DrawableConfig &config)
Read back an image.
std::vector< PixelViewport > PixelViewports
A vector of eq::PixelViewport.
Definition: eq/types.h:172
virtual EQ_API ~Frame()
Destruct the frame.
Buffer
The buffer format defines which components of the frame are to be used during readback and assembly...
Definition: fabric/frame.h:40
EQ_API void setZoomFilter(const ZoomFilter zoomFilter)
Set the filter applied to zoomed assemble operations.
ZoomFilter
Filtering algorithm to applied during zoom operations.
Definition: zoomFilter.h:26
std::vector< Image * > Images
A vector of pointers to eq::Image.
Definition: eq/types.h:160
EQ_API void setAlphaUsage(const bool useAlpha)
Set alpha usage for newly allocated images.
EQ_API void useCompressor(const Buffer buffer, const uint32_t name)
Sets a compressor for compression for following transmissions.
A holder for a frame data and related parameters.
Definition: fabric/frame.h:32
EQ_API void waitReady(const uint32_t timeout=LB_TIMEOUT_INDEFINITE) const
Wait for the frame to become available.
EQ_API void disableBuffer(const Buffer buffer)
Disable the usage of a frame buffer attachment for all images.
EQ_API const std::string & getName() const
EQ_API void setFrameData(FrameDataPtr data)
Set the data for this frame.
EQ_API Images startReadback(util::ObjectManager &glObjects, const DrawableConfig &config, const PixelViewports &regions)
Start reading back a set of images for this frame.
void addListener(lunchbox::Monitor< uint32_t > &listener)
Add a listener which will be incremented when the frame is ready.
lunchbox::RefPtr< const FrameData > ConstFrameDataPtr
A reference-counted pointer to a const eq::FrameData.
Definition: eq/types.h:214
EQ_API const Images & getImages() const
A facility class to manage OpenGL objects across shared contexts.
Definition: objectManager.h:52
A holder for a frame data and related parameters.
Definition: frame.h:42
lunchbox::RefPtr< FrameData > FrameDataPtr
A reference-counted pointer to an eq::FrameData.
Definition: eq/types.h:212
EQ_API void setQuality(const Buffer buffer, const float quality)
Set the minimum quality after compression.
EQ_API FrameDataPtr getFrameData()
void setReady()
Set the frame ready.
EQ_API uint32_t getPeriod() const