Equalizer
1.10.1
Parallel Rendering Framework
|
A holder for multiple images. More...
#include <frameData.h>
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... | |
const fabric::FrameData & | getData () const |
bool | addImage (const co::ObjectVersion &frameDataVersion, const PixelViewport &pvp, const Zoom &zoom, const uint32_t buffers, const bool useAlpha, uint8_t *data) |
void | setReady (const co::ObjectVersion &frameData, const fabric::FrameData &data) |
Data Access | |
EQ_API Frame::Type | getType () const |
EQ_API void | setType (const Frame::Type type) |
Set the storage type. More... | |
EQ_API uint32_t | getBuffers () const |
EQ_API void | setBuffers (const uint32_t buffers) |
Set the enabled frame buffer attachments. More... | |
EQ_API const Range & | getRange () const |
Get the range. More... | |
EQ_API void | setRange (const Range &range) |
Set the range of this frame. More... | |
EQ_API const Pixel & | getPixel () const |
EQ_API const SubPixel & | getSubPixel () const |
EQ_API uint32_t | getPeriod () const |
EQ_API uint32_t | getPhase () const |
EQ_API const Images & | getImages () const |
The images of this frame data holder. More... | |
EQ_API void | setPixelViewport (const PixelViewport &pvp) |
Set the covered area for readbacks. More... | |
EQ_API const PixelViewport & | getPixelViewport () const |
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... | |
EQ_API void | setZoom (const Zoom &zoom) |
EQ_API const Zoom & | getZoom () 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. More... | |
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 Image * | newImage (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... | |
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... | |
void | readback (const Frame &frame, util::ObjectManager &glObjects, const DrawableConfig &config) |
Read back an image for this frame data. More... | |
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. 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... | |
EQ_API void | disableBuffer (const Frame::Buffer buffer) |
Disable the usage of a frame buffer attachment for all images. More... | |
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 53 of file frameData.h.
EQ_API eq::FrameData::FrameData | ( | ) |
Construct a new frame data holder.
|
virtual |
Destruct this frame data.
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.
listener | the listener. |
EQ_API void eq::FrameData::clear | ( | ) |
Clear the frame by recycling the attached images.
void eq::FrameData::deleteGLObjects | ( | util::ObjectManager & | om | ) |
Delete data allocated by the given object manager on all images.
EQ_API void eq::FrameData::disableBuffer | ( | const Frame::Buffer | buffer | ) |
Disable the usage of a frame buffer attachment for all images.
buffer | the buffer to disable. |
void eq::FrameData::flush | ( | ) |
Flush the frame by deleting all images.
EQ_API uint32_t eq::FrameData::getBuffers | ( | ) | const |
EQ_API const Images& eq::FrameData::getImages | ( | ) | const |
The images of this frame data holder.
EQ_API uint32_t eq::FrameData::getPeriod | ( | ) | const |
EQ_API uint32_t eq::FrameData::getPhase | ( | ) | const |
EQ_API const Pixel& eq::FrameData::getPixel | ( | ) | const |
EQ_API const PixelViewport& eq::FrameData::getPixelViewport | ( | ) | const |
EQ_API const Range& eq::FrameData::getRange | ( | ) | const |
Get the range.
The range is set for Equalizer frames to the range of the frame data relative to the destination channel.
EQ_API const SubPixel& eq::FrameData::getSubPixel | ( | ) | const |
EQ_API Frame::Type eq::FrameData::getType | ( | ) | const |
EQ_API bool eq::FrameData::isReady | ( | ) | const |
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.
void eq::FrameData::readback | ( | const Frame & | frame, |
util::ObjectManager & | glObjects, | ||
const DrawableConfig & | config | ||
) |
Read back an image for this frame data.
The newly read image is added to the data using newImage(). Existing images are retained.
frame | the corresponding output frame holder. |
glObjects | the GL object manager for the current GL context. |
config | the configuration of the source frame buffer. |
void eq::FrameData::removeListener | ( | Listener & | listener | ) |
Remove a frame listener.
listener | the listener. |
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.
EQ_API void eq::FrameData::setBuffers | ( | const uint32_t | buffers | ) |
Set the enabled frame buffer attachments.
The default buffers are set for Equalizer input and output frames according to the configuration, or to 0 for application-created frame datas.
EQ_API void eq::FrameData::setPixelViewport | ( | const PixelViewport & | pvp | ) |
Set the covered area for readbacks.
Preset for Equalizer output frames. The given pixel viewport is used together with the Frame offset to compute the area for the readback() operation.
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.
EQ_API void eq::FrameData::setRange | ( | const Range & | range | ) |
Set the range of this frame.
void eq::FrameData::setReady | ( | ) |
Set the frame data ready.
The frame data is automatically set ready by readback() and after receiving an output frame.
EQ_API void eq::FrameData::setType | ( | const Frame::Type | type | ) |
Set the storage type.
Images eq::FrameData::startReadback | ( | const Frame & | frame, |
util::ObjectManager & | glObjects, | ||
const DrawableConfig & | config, | ||
const PixelViewports & | regions | ||
) |
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.
frame | the corresponding output frame holder. |
glObjects | the GL object manager for the current GL context. |
config | the configuration of the source frame buffer. |
regions | the areas to read back. |
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.
buffer | the frame buffer attachment. |
name | the compressor name. |
EQ_API void eq::FrameData::waitReady | ( | const uint32_t | timeout = LB_TIMEOUT_INDEFINITE | ) | const |
Wait for the frame data to become available.