Equalizer  2.0.0
Parallel Rendering Framework
eq::FrameData Class Reference

A holder for multiple images. More...

#include <frameData.h>

+ Inheritance diagram for eq::FrameData:
+ Collaboration diagram for eq::FrameData:

Classes

struct  ImageHeader
 

Public Member Functions

void assembleFrame (Frame *frame, Channel *channel)
 
EQ_API FrameData ()
 Construct a new frame data holder. More...
 
virtual EQ_API ~FrameData ()
 Destruct this frame data. More...
 
bool addImage (const co::ObjectVersion &frameDataVersion, const PixelViewport &pvp, const Zoom &zoom, const RenderContext &context, const uint32_t buffers, const bool useAlpha, uint8_t *data)
 
void setReady (const co::ObjectVersion &frameData, const fabric::FrameData &data)
 
Data Access
EQ_API const ImagesgetImages () const
 The images of this frame data holder. More...
 
EQ_API void setAlphaUsage (const bool useAlpha)
 Set alpha usage for newly allocated images. More...
 
void setQuality (const Frame::Buffer buffer, const float quality)
 Set the minimum quality after download and compression. More...
 
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. More...
 
- Public Member Functions inherited from eq::fabric::FrameData
void setPixelViewport (const PixelViewport &pvp)
 Set the covered area for readbacks. More...
 
const PixelViewportgetPixelViewport () const
 
void setBuffers (const uint32_t buffers)
 Set the (color, depth) buffers of the source frame. More...
 
void disableBuffer (const Frame::Buffer buffer)
 Disable the usage of a frame buffer attachment for all images. More...
 
uint32_t getBuffers () const
 
void setContext (const RenderContext &context)
 Set the source context decomposition wrt dest channel. More...
 
const RenderContextgetContext () const
 
RenderContextgetContext ()
 
void setZoom (const Zoom &zoom)
 Set additional zoom for input frames. More...
 
const ZoomgetZoom () const
 
void setType (const fabric::Frame::Type type)
 Set the frame storage type. More...
 
Frame::Type getType () const
 
EQFABRIC_API void serialize (co::DataOStream &os) const
 
EQFABRIC_API void deserialize (co::DataIStream &is)
 

Protected Member Functions

virtual ChangeType getChangeType () const
 
virtual void getInstanceData (co::DataOStream &os)
 
virtual void applyInstanceData (co::DataIStream &is)
 

Operations

typedef lunchbox::Monitor< uint32_t > Listener
 Ready listener.
 
EQ_API ImagenewImage (const Frame::Type type, const DrawableConfig &config)
 Allocate and add a new image. More...
 
EQ_API void clear ()
 Clear the frame by recycling the attached images. More...
 
EQ_API void flush ()
 Flush the frame by deleting all images. More...
 
void deleteGLObjects (util::ObjectManager &om)
 Delete data allocated by the given object manager on all images. More...
 
EQ_API void resetPlugins ()
 Deallocate all transfer and compression plugins on all images. More...
 
Images startReadback (const Frame &frame, util::ObjectManager &glObjects, const DrawableConfig &config, const PixelViewports &regions, const RenderContext &context)
 Start reading back a set of images for this frame data. More...
 
void setReady ()
 Set the frame data ready. More...
 
EQ_API bool isReady () const
 
EQ_API void waitReady (const uint32_t timeout=LB_TIMEOUT_INDEFINITE) const
 Wait for the frame data to become available. More...
 
void setVersion (const uint64_t version)
 
void addListener (Listener &listener)
 Add a ready listener. More...
 
void removeListener (Listener &listener)
 Remove a frame listener. More...
 

Additional Inherited Members

- Protected Attributes inherited from eq::fabric::FrameData
PixelViewport _pvp
 
RenderContext _context
 
Zoom _zoom
 
Frame::Type _frameType
 
uint32_t _buffers
 

Detailed Description

A holder for multiple images.

The FrameData is used to connect the Image data for multiple frames. Equalizer uses the same frame data for all input and output frames of the same name. This enables frame-specific parameters to be set on the Frame, and generic parameters (of the output frame) to be set on the FrameData, as well as ready synchronization of the pixel data.

An application may allocate its own Frame and FrameData for application-specific purposes.

Parameters set on an Equalizer output frame data are automatically transported to the corresponding input frames.

Definition at line 49 of file frameData.h.

Constructor & Destructor Documentation

EQ_API eq::FrameData::FrameData ( )

Construct a new frame data holder.

Version
1.0
virtual EQ_API eq::FrameData::~FrameData ( )
virtual

Destruct this frame data.

Version
1.0

Member Function Documentation

void eq::FrameData::addListener ( Listener listener)

Add a ready listener.

The listener value will will be incremented when the frame is ready, which might happen immediately.

Parameters
listenerthe listener.
Version
1.0
EQ_API void eq::FrameData::clear ( )

Clear the frame by recycling the attached images.

Version
1.0
void eq::FrameData::deleteGLObjects ( util::ObjectManager om)

Delete data allocated by the given object manager on all images.

EQ_API void eq::FrameData::flush ( )

Flush the frame by deleting all images.

Version
1.0
EQ_API const Images& eq::FrameData::getImages ( ) const

The images of this frame data holder.

Version
1.0
EQ_API bool eq::FrameData::isReady ( ) const
Returns
true if the frame data is ready.
Version
1.0
EQ_API Image* eq::FrameData::newImage ( const Frame::Type  type,
const DrawableConfig &  config 
)

Allocate and add a new image.

The allocated image inherits the current quality, storage type from this frame data and the internal format corresponding to the given drawable config.

Returns
the image.
Version
1.0
void eq::FrameData::removeListener ( Listener listener)

Remove a frame listener.

Parameters
listenerthe listener.
Version
1.0
EQ_API void eq::FrameData::resetPlugins ( )

Deallocate all transfer and compression plugins on all images.

EQ_API void eq::FrameData::setAlphaUsage ( const bool  useAlpha)

Set alpha usage for newly allocated images.

Disabling alpha allows the selection of download or compression plugins which drop the alpha channel for better performance.

Version
1.0
void eq::FrameData::setQuality ( const Frame::Buffer  buffer,
const float  quality 
)

Set the minimum quality after download and compression.

Setting a lower quality decreases the image quality while increasing the performance of scalable rendering. An application typically selects a lower quality during interaction. Setting a quality of 1.0 provides lossless image compositing.

Version
1.0
void eq::FrameData::setReady ( )

Set the frame data ready.

The frame data is automatically set ready by readback() and after receiving an output frame.

Version
1.0
Images eq::FrameData::startReadback ( const Frame frame,
util::ObjectManager glObjects,
const DrawableConfig &  config,
const PixelViewports regions,
const RenderContext &  context 
)

Start reading back a set of images for this frame data.

The newly read images are added to the data using newImage(). Existing images are retained.

Parameters
framethe corresponding output frame holder.
glObjectsthe GL object manager for the current GL context.
configthe configuration of the source frame buffer.
regionsthe areas to read back.
contextthe render context producing the pixel data.
Returns
the new images which need finishReadback.
Version
1.3.0
void eq::FrameData::useCompressor ( const Frame::Buffer  buffer,
const uint32_t  name 
)

Sets a compressor which will be allocated and used during transmit of the image buffer.

The default compressor is EQ_COMPRESSOR_AUTO which selects the most suitable compressor wrt the current image and buffer parameters.

See also
_chooseCompressor()
Parameters
bufferthe frame buffer attachment.
namethe compressor name.
EQ_API void eq::FrameData::waitReady ( const uint32_t  timeout = LB_TIMEOUT_INDEFINITE) const

Wait for the frame data to become available.

Version
1.0

The documentation for this class was generated from the following file: