19 #ifndef EQ_FRAMEDATA_H
20 #define EQ_FRAMEDATA_H
25 #include <eq/fabric/pixelViewport.h>
26 #include <eq/fabric/pixel.h>
27 #include <eq/fabric/range.h>
28 #include <eq/fabric/subPixel.h>
30 #include <co/object.h>
31 #include <lunchbox/monitor.h>
32 #include <lunchbox/spinLock.h>
36 namespace detail {
class FrameData; }
53 class FrameData :
public co::Object,
public lunchbox::Referenced
59 uint32_t internalFormat;
60 uint32_t externalFormat;
63 uint32_t compressorName;
64 uint32_t compressorFlags;
93 EQ_API
void setBuffers(
const uint32_t buffers );
104 EQ_API
const Range&
getRange()
const;
107 EQ_API
void setRange(
const Range& range );
113 EQ_API
const Pixel&
getPixel()
const;
170 EQ_API
void setZoom(
const Zoom& zoom );
173 EQ_API
const Zoom& getZoom()
const;
201 const DrawableConfig& config );
229 const DrawableConfig& config );
247 const DrawableConfig& config,
263 EQ_API
void waitReady(
const uint32_t timeout = LB_TIMEOUT_INDEFINITE )
267 void setVersion(
const uint64_t version );
302 bool addImage(
const co::ObjectVersion& frameDataVersion,
303 const PixelViewport& pvp,
const Zoom& zoom,
304 const uint32_t buffers,
const bool useAlpha,
306 void setReady(
const co::ObjectVersion& frameData,
310 virtual ChangeType getChangeType()
const {
return INSTANCE; }
311 virtual void getInstanceData( co::DataOStream& os );
312 virtual void applyInstanceData( co::DataIStream& is );
315 detail::FrameData*
const _impl;
319 const DrawableConfig& config,
323 void _applyVersion(
const uint128_t& version );
326 void _setReady(
const uint64_t version );
328 LB_TS_VAR( _commandThread );
332 EQ_API std::ostream&
operator << ( std::ostream&,
const FrameData& );
335 #endif // EQ_FRAMEDATA_H
Images startReadback(const Frame &frame, util::ObjectManager &glObjects, const DrawableConfig &config, const PixelViewports ®ions)
Start reading back a set of images for this frame data.
lunchbox::Monitor< uint32_t > Listener
Ready listener.
void flush()
Flush the frame by deleting all images.
A channel represents a two-dimensional viewport within a Window.
EQ_API void setAlphaUsage(const bool useAlpha)
Set alpha usage for newly allocated images.
EQ_API void setBuffers(const uint32_t buffers)
Set the enabled frame buffer attachments.
virtual EQ_API ~FrameData()
Destruct this frame data.
void readback(const Frame &frame, util::ObjectManager &glObjects, const DrawableConfig &config)
Read back an image for this frame data.
EQ_API std::ostream & operator<<(std::ostream &os, const ConfigEvent *event)
Print the config event to the given output stream.
EQ_API const Images & getImages() const
The images of this frame data holder.
std::vector< PixelViewport > PixelViewports
A vector of eq::PixelViewport.
EQ_API void setRange(const Range &range)
Set the range of this frame.
EQ_API FrameData()
Construct a new frame data holder.
EQ_API Frame::Type getType() const
Buffer
The buffer format defines which components of the frame are to be used during readback and assembly...
Type
The storage type for pixel data.
std::vector< Image * > Images
A vector of pointers to eq::Image.
EQ_API void disableBuffer(const Frame::Buffer buffer)
Disable the usage of a frame buffer attachment for all images.
EQ_API bool isReady() const
void useCompressor(const Frame::Buffer buffer, const uint32_t name)
Sets a compressor which will be allocated and used during transmit of the image buffer.
void addListener(Listener &listener)
Add a ready listener.
EQ_API const PixelViewport & getPixelViewport() const
A holder for multiple images.
EQ_API void setPixelViewport(const PixelViewport &pvp)
Set the covered area for readbacks.
EQ_API const SubPixel & getSubPixel() const
EQ_API void resetPlugins()
Deallocate all transfer and compression plugins on all images.
void setReady()
Set the frame data ready.
EQ_API uint32_t getPeriod() const
EQ_API void clear()
Clear the frame by recycling the attached images.
A facility class to manage OpenGL objects across shared contexts.
EQ_API Image * newImage(const Frame::Type type, const DrawableConfig &config)
Allocate and add a new image.
A holder for a frame data and related parameters.
void deleteGLObjects(util::ObjectManager &om)
Delete data allocated by the given object manager on all images.
EQ_API void waitReady(const uint32_t timeout=LB_TIMEOUT_INDEFINITE) const
Wait for the frame data to become available.
void setQuality(const Frame::Buffer buffer, const float quality)
Set the minimum quality after download and compression.
EQ_API const Pixel & getPixel() const
EQ_API uint32_t getBuffers() const
EQ_API uint32_t getPhase() const
EQ_API const Range & getRange() const
Get the range.
void removeListener(Listener &listener)
Remove a frame listener.
Holds a 2D pixel viewport with methods for manipulation.
EQ_API void setType(const Frame::Type type)
Set the storage type.