Equalizer 1.0
|
A holder for multiple images. More...
#include <frameData.h>
Classes | |
struct | Data |
struct | ImageHeader |
Public Member Functions | |
void | assembleFrame (Frame *frame, Channel *channel) |
FrameData () | |
Construct a new frame data holder. | |
virtual | ~FrameData () |
Destruct this frame data. | |
bool | addImage (const NodeFrameDataTransmitPacket *packet) |
void | setReady (const NodeFrameDataReadyPacket *packet) |
Data Access | |
uint32_t | getBuffers () const |
void | setBuffers (const uint32_t buffers) |
Set the enabled frame buffer attachments. | |
const Range & | getRange () const |
Get the range. | |
void | setRange (const Range &range) |
Set the range of this frame. | |
const Pixel & | getPixel () const |
const SubPixel & | getSubPixel () const |
uint32_t | getPeriod () const |
uint32_t | getPhase () const |
const Images & | getImages () const |
The images of this frame data holder. | |
void | setPixelViewport (const PixelViewport &pvp) |
Set the covered area for readbacks. | |
void | setAlphaUsage (const bool useAlpha) |
Set alpha usage for newly allocated images. | |
void | setQuality (const Frame::Buffer buffer, const float quality) |
Set the minimum quality after download and compression. | |
void | setZoom (const Zoom &zoom) |
const Zoom & | getZoom () const |
Operations | |
Image * | newImage (const Frame::Type type, const DrawableConfig &config) |
Allocate and add a new image. | |
void | flush () |
Flush the frame by deleting all images. | |
void | clear () |
Clear the frame by recycling the attached images. | |
void | readback (const Frame &frame, util::ObjectManager< const void * > *glObjects, const DrawableConfig &config) |
Read back an image for this frame data. | |
void | setReady () |
Set the frame data ready. | |
bool | isReady () const |
void | waitReady () const |
Wait for the frame data to become available. | |
void | setVersion (const uint64_t version) |
void | addListener (co::base::Monitor< uint32_t > &listener) |
Add a ready listener. | |
void | removeListener (co::base::Monitor< uint32_t > &listener) |
Remove a frame listener. | |
void | disableBuffer (const Frame::Buffer buffer) |
Disable the usage of a frame buffer attachment for all images. | |
Protected Member Functions | |
virtual ChangeType | getChangeType () const |
virtual void | getInstanceData (co::DataOStream &os) |
Serialize all instance information of this distributed object. | |
virtual void | applyInstanceData (co::DataIStream &is) |
Deserialize the instance data. | |
Friends | |
struct | NodeFrameDataReadyPacket |
class | server::FrameData |
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 61 of file include/eq/frameData.h.
eq::FrameData::FrameData | ( | ) |
Construct a new frame data holder.
virtual eq::FrameData::~FrameData | ( | ) | [virtual] |
Destruct this frame data.
void eq::FrameData::addListener | ( | co::base::Monitor< uint32_t > & | listener | ) |
Add a ready listener.
The listener value will will be incremented when the frame is ready, which might happen immediately.
listener | the listener. |
virtual void eq::FrameData::applyInstanceData | ( | co::DataIStream & | is | ) | [protected, virtual] |
Deserialize the instance data.
This method is called during object mapping to populate slave instances with the master object's data.
is | the input stream. |
Implements co::Object.
void eq::FrameData::clear | ( | ) |
Clear the frame by recycling the attached images.
void eq::FrameData::disableBuffer | ( | const Frame::Buffer | buffer | ) | [inline] |
Disable the usage of a frame buffer attachment for all images.
buffer | the buffer to disable. |
Definition at line 254 of file include/eq/frameData.h.
void eq::FrameData::flush | ( | ) |
Flush the frame by deleting all images.
uint32_t eq::FrameData::getBuffers | ( | ) | const [inline] |
Definition at line 86 of file include/eq/frameData.h.
virtual ChangeType eq::FrameData::getChangeType | ( | ) | const [inline, protected, virtual] |
Reimplemented from co::Object.
Definition at line 263 of file include/eq/frameData.h.
References co::Object::INSTANCE.
const Images& eq::FrameData::getImages | ( | ) | const [inline] |
The images of this frame data holder.
Definition at line 136 of file include/eq/frameData.h.
virtual void eq::FrameData::getInstanceData | ( | co::DataOStream & | os | ) | [protected, virtual] |
Serialize all instance information of this distributed object.
os | The output stream. |
Implements co::Object.
uint32_t eq::FrameData::getPeriod | ( | ) | const [inline] |
Definition at line 127 of file include/eq/frameData.h.
uint32_t eq::FrameData::getPhase | ( | ) | const [inline] |
Definition at line 133 of file include/eq/frameData.h.
const Pixel& eq::FrameData::getPixel | ( | ) | const [inline] |
Definition at line 115 of file include/eq/frameData.h.
const Range& eq::FrameData::getRange | ( | ) | const [inline] |
Get the range.
The range is set for Equalizer frames to the range of the frame data relative to the destination channel.
Definition at line 106 of file include/eq/frameData.h.
const SubPixel& eq::FrameData::getSubPixel | ( | ) | const [inline] |
Definition at line 121 of file include/eq/frameData.h.
bool eq::FrameData::isReady | ( | ) | const [inline] |
Definition at line 221 of file include/eq/frameData.h.
References co::base::Monitor< T >::get().
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< const void * > * | glObjects, | ||
const DrawableConfig & | config | ||
) |
Read back an image 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. |
void eq::FrameData::removeListener | ( | co::base::Monitor< uint32_t > & | listener | ) |
Remove a frame listener.
listener | the listener. |
void eq::FrameData::setAlphaUsage | ( | const bool | useAlpha | ) | [inline] |
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.
Definition at line 155 of file include/eq/frameData.h.
void eq::FrameData::setBuffers | ( | const uint32_t | buffers | ) | [inline] |
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.
Definition at line 95 of file include/eq/frameData.h.
void eq::FrameData::setPixelViewport | ( | const PixelViewport & | pvp | ) | [inline] |
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.
Definition at line 146 of file include/eq/frameData.h.
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.
void eq::FrameData::setRange | ( | const Range & | range | ) | [inline] |
void eq::FrameData::setReady | ( | ) |
Set the frame data ready.
The frame data is automatically set ready by readback() and after receiving an output frame.
void eq::FrameData::waitReady | ( | ) | const [inline] |
Wait for the frame data to become available.
Definition at line 224 of file include/eq/frameData.h.
References co::base::Monitor< T >::waitGE().