Equalizer  1.7.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
client/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/client/api.h>
24 #include <eq/client/types.h>
25 #include <eq/client/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 Frame::Buffer buffer,
126  const float quality );
127 
129  EQ_API void useCompressor( const Frame::Buffer buffer,
130  const uint32_t name );
132 
136  EQ_API void clear();
137 
139  void deleteGLObjects( util::ObjectManager& om );
140 
150  EQ_API void readback( util::ObjectManager& glObjects,
151  const DrawableConfig& config );
152 
163  EQ_API void readback( util::ObjectManager& glObjects,
164  const DrawableConfig& config,
165  const PixelViewports& regions );
166 
180  EQ_API Images startReadback( util::ObjectManager& glObjects,
181  const DrawableConfig& config,
182  const PixelViewports& regions );
183 
191  void setReady();
192 
199  EQ_API bool isReady() const;
200 
202  EQ_API void waitReady( const uint32_t timeout =
203  LB_TIMEOUT_INDEFINITE ) const;
204 
211  void addListener( lunchbox::Monitor<uint32_t>& listener );
212 
219  void removeListener( lunchbox::Monitor<uint32_t>& listener );
221 
222  private:
223  detail::Frame* const _impl;
224  };
225 };
226 #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: client/types.h:170
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: client/types.h:156
EQ_API void setAlphaUsage(const bool useAlpha)
Set alpha usage for newly allocated images.
EQ_API void useCompressor(const Frame::Buffer buffer, const uint32_t name)
Sets a compressor for compression for following transmissions.
EQ_API void setQuality(const Frame::Buffer buffer, const float quality)
Set the minimum quality after compression.
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: client/types.h:218
EQ_API const Images & getImages() const
A facility class to manage OpenGL objects across shared contexts.
Definition: objectManager.h:51
A holder for a frame data and related parameters.
Definition: client/frame.h:42
lunchbox::RefPtr< FrameData > FrameDataPtr
A reference-counted pointer to an eq::FrameData.
Definition: client/types.h:216
EQ_API FrameDataPtr getFrameData()
void setReady()
Set the frame ready.
EQ_API uint32_t getPeriod() const