19 #ifndef EQ_FRAMEDATA_H
20 #define EQ_FRAMEDATA_H
22 #include <eq/client/frame.h>
23 #include <eq/client/types.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 );
315 EQ_API
void serialize( co::DataOStream& os )
const;
316 EQ_API
void deserialize( co::DataIStream& is );
319 const Data& getData()
const;
322 bool addImage(
const co::ObjectVersion& frameDataVersion,
323 const PixelViewport& pvp,
const Zoom& zoom,
324 const uint32_t buffers,
const bool useAlpha,
326 void setReady(
const co::ObjectVersion& frameData,
330 virtual ChangeType getChangeType()
const {
return INSTANCE; }
331 virtual void getInstanceData( co::DataOStream& os );
332 virtual void applyInstanceData( co::DataIStream& is );
335 detail::FrameData*
const _impl;
339 const DrawableConfig& config,
343 void _applyVersion(
const uint128_t& version );
346 void _setReady(
const uint64_t version );
348 LB_TS_VAR( _commandThread );
352 EQ_API std::ostream&
operator << ( std::ostream&,
const FrameData& );
359 byteswap( value.pvp );
360 byteswap( value.frameType );
361 byteswap( value.buffers );
362 byteswap( value.period );
363 byteswap( value.phase );
364 byteswap( value.range );
365 byteswap( value.pixel );
366 byteswap( value.subpixel );
367 byteswap( value.zoom );
371 #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.
use main memory to store pixel data
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.