Equalizer  1.12.0
Parallel Rendering Framework
frame.h
1 
2 /* Copyright (c) 2006-2015, Stefan Eilemann <eile@equalizergraphics.com>
3  * Daniel Nachbaur <danielnachbaur@gmail.com>
4  * Cedric Stalder <cedric.stalder@gmail.com>
5  * Enrique <egparedes@ifi.uzh.ch>
6  *
7  * This library is free software; you can redistribute it and/or modify it under
8  * the terms of the GNU Lesser General Public License version 2.1 as published
9  * by the Free Software Foundation.
10  *
11  * This library is distributed in the hope that it will be useful, but WITHOUT
12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
13  * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
14  * details.
15  *
16  * You should have received a copy of the GNU Lesser General Public License
17  * along with this library; if not, write to the Free Software Foundation, Inc.,
18  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19  */
20 
21 #ifndef EQ_FRAME_H
22 #define EQ_FRAME_H
23 
24 #include <eq/api.h>
25 #include <eq/types.h>
26 #include <eq/zoomFilter.h> // enum
27 #include <eq/fabric/frame.h> // base class
28 
29 namespace eq
30 {
31 namespace detail{ class Frame; }
32 
43 class Frame : public fabric::Frame
44 {
45 public:
47  EQ_API Frame();
48 
50  EQ_API virtual ~Frame();
51 
58  EQ_API void setZoomFilter( const ZoomFilter zoomFilter );
59 
64  EQ_API ZoomFilter getZoomFilter() const;
65 
67  EQ_API const Images& getImages() const;
68 
70  EQ_API void setFrameData( FrameDataPtr data );
71 
73  EQ_API FrameDataPtr getFrameData();
74 
76  EQ_API ConstFrameDataPtr getFrameData() const;
77 
79  EQ_API uint32_t getBuffers() const;
80 
87  EQ_API void disableBuffer( const Buffer buffer );
88 
90  EQ_API void setAlphaUsage( const bool useAlpha );
91 
93  EQ_API void setQuality( const Buffer buffer, const float quality );
94 
96  EQ_API void useCompressor( const Buffer buffer, const uint32_t name );
98 
102  EQ_API void clear();
103 
105  void deleteGLObjects( util::ObjectManager& om );
106 
118  EQ_API void readback( util::ObjectManager& glObjects,
119  const DrawableConfig& config,
120  const PixelViewports& regions,
121  const RenderContext& context );
122 
137  EQ_API Images startReadback( util::ObjectManager& glObjects,
138  const DrawableConfig& config,
139  const PixelViewports& regions,
140  const RenderContext& context );
141 
149  void setReady();
150 
157  EQ_API bool isReady() const;
158 
160  EQ_API void waitReady( const uint32_t timeout =
161  LB_TIMEOUT_INDEFINITE ) const;
162 
169  void addListener( lunchbox::Monitor<uint32_t>& listener );
170 
177  void removeListener( lunchbox::Monitor<uint32_t>& listener );
179 
180 private:
181  detail::Frame* const _impl;
182 };
183 };
184 #endif // EQ_FRAME_H
EQ_API bool isReady() const
Test the readiness of the frame.
EQ_API void readback(util::ObjectManager &glObjects, const DrawableConfig &config, const PixelViewports &regions, const RenderContext &context)
Read back a set of images.
EQ_API Images startReadback(util::ObjectManager &glObjects, const DrawableConfig &config, const PixelViewports &regions, const RenderContext &context)
Start reading back a set of images for this frame.
EQ_API uint32_t getBuffers() const
void removeListener(lunchbox::Monitor< uint32_t > &listener)
Remove a frame listener.
EQ_API Frame()
Construct a new frame.
EQ_API ZoomFilter getZoomFilter() const
std::vector< PixelViewport > PixelViewports
A vector of eq::PixelViewport.
Definition: eq/types.h:173
virtual EQ_API ~Frame()
Destruct the frame.
Buffer
Components of the frame are to be used during readback and assembly.
Definition: fabric/frame.h:39
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:25
std::vector< Image * > Images
A vector of pointers to eq::Image.
Definition: eq/types.h:161
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.
The Equalizer client library.
Definition: eq/agl/types.h:23
EQ_API void setFrameData(FrameDataPtr data)
Set the data 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:217
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:43
lunchbox::RefPtr< FrameData > FrameDataPtr
A reference-counted pointer to an eq::FrameData.
Definition: eq/types.h:215
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.