eq::Compositor Class Reference

A facility class for image assembly operations. More...

#include <compositor.h>

List of all members.

Classes

struct  ImageOp
 A structure describing an image assembly task. More...

Static Public Member Functions

Frame-based operations.
static void assembleFrames (const FrameVector &frames, Channel *channel)
 Assemble all frames in an arbitrary order using the best algorithm on the given channel.
static void assembleFramesSorted (const FrameVector &frames, Channel *channel, const bool blendAlpha=false)
 Assemble all frames in the given order using the default algorithm on the given channel.
static void assembleFramesUnsorted (const FrameVector &frames, Channel *channel)
 Assemble all frames in the order they become available directly on the given channel.
static void assembleFramesCPU (const FrameVector &frames, Channel *channel, const bool blendAlpha=false)
 Assemble all frames in arbitrary order in a memory buffer using the CPU before assembling the result on the given channel.
static const ImagemergeFramesCPU (const FrameVector &frames, const bool blendAlpha=false)
 Merge the provided frames into one image in main memory.
static bool mergeFramesCPU (const FrameVector &frames, const bool blendAlpha, void *colorBuffer, const uint32_t colorBufferSize, void *depthBuffer, const uint32_t depthBufferSize, PixelViewport &outPVP)
 Merge the provided frames into one main memory buffer.
static void assembleFrame (const Frame *frame, Channel *channel)
 Assemble a frame using the default algorithm.
Image-based operations.
static void assembleImage (const Image *image, const ImageOp &operation)
 Start assembling an image.
static void setupStencilBuffer (const Image *image, const ImageOp &operation)
 Setup the stencil buffer for a pixel compound recomposition.
static void assembleImage2D (const Image *image, const ImageOp &op)
 Start a tile-based assembly of the image color attachment.
static void assembleImageDB (const Image *image, const ImageOp &op)
 Start a Z-based assembly of the image color and depth attachment.
static void assembleImageDB_FF (const Image *image, const ImageOp &op)
 Start a Z-based assembly of the image color and depth attachment, based on OpenGL 1.1 functionality.
static void assembleImageDB_GLSL (const Image *image, const ImageOp &op)
 Start a Z-based assembly of the image color and depth attachment, using GLSL.


Detailed Description

A facility class for image assembly operations.

Definition at line 34 of file compositor.h.


Member Function Documentation

void eq::Compositor::assembleFrames ( const FrameVector frames,
Channel channel 
) [static]

Assemble all frames in an arbitrary order using the best algorithm on the given channel.

Parameters:
frames the frames to assemble.
channel the destination channel.

Definition at line 174 of file compositor.cpp.

References assembleFramesCPU(), and assembleFramesUnsorted().

Referenced by eq::Channel::frameAssemble().

Here is the call graph for this function:

Here is the caller graph for this function:

void eq::Compositor::assembleFramesSorted ( const FrameVector frames,
Channel channel,
const bool  blendAlpha = false 
) [static]

Assemble all frames in the given order using the default algorithm on the given channel.

For alpha-blending see comment for assembleFramesCPU().

Parameters:
frames the frames to assemble.
channel the destination channel.
blendAlpha blend color-only images if they have an alpha channel

Definition at line 186 of file compositor.cpp.

References assembleFrame(), assembleFramesCPU(), and eq::Frame::waitReady().

Here is the call graph for this function:

void eq::Compositor::assembleFramesUnsorted ( const FrameVector frames,
Channel channel 
) [static]

Assemble all frames in the order they become available directly on the given channel.

Parameters:
frames the frames to assemble.
channel the destination channel.

Definition at line 220 of file compositor.cpp.

References eq::Frame::addListener(), assembleFrame(), EQVERB, eq::Frame::isReady(), eq::Frame::removeListener(), and eq::base::Monitor< T >::waitGE().

Referenced by assembleFrames().

Here is the call graph for this function:

Here is the caller graph for this function:

void eq::Compositor::assembleFramesCPU ( const FrameVector frames,
Channel channel,
const bool  blendAlpha = false 
) [static]

Assemble all frames in arbitrary order in a memory buffer using the CPU before assembling the result on the given channel.

If alpha-blending is enabled, the images are blended into the intermediate image in main memory as if using: glBlendFuncSeparate( GL_ONE, GL_SRC_ALPHA, GL_ZERO, GL_SRC_ALPHA ) The resulting image is composited using glBlendFunc( GL_ONE, GL_SRC_ALPHA ) into the current framebuffer.

Parameters:
frames the frames to assemble.
channel the destination channel.
blendAlpha blend color-only images if they have an alpha channel

Definition at line 278 of file compositor.cpp.

References assembleImage(), eq::Frame::BUFFER_COLOR, eq::Frame::BUFFER_DEPTH, eq::Compositor::Compositor::ImageOp::buffers, eq::Compositor::Compositor::ImageOp::channel, EQVERB, mergeFramesCPU(), and eq::Image::writeImages().

Referenced by assembleFrames(), and assembleFramesSorted().

Here is the call graph for this function:

Here is the caller graph for this function:

const Image * eq::Compositor::mergeFramesCPU ( const FrameVector frames,
const bool  blendAlpha = false 
) [static]

Merge the provided frames into one image in main memory.

Definition at line 307 of file compositor.cpp.

References eq::Frame::BUFFER_COLOR, eq::Frame::BUFFER_DEPTH, eq::Image::clearPixelData(), EQVERB, eq::Image::getPixelPointer(), eq::Image::setFormat(), eq::Image::setPixelViewport(), and eq::Image::setType().

Referenced by assembleFramesCPU().

Here is the call graph for this function:

Here is the caller graph for this function:

bool eq::Compositor::mergeFramesCPU ( const FrameVector frames,
const bool  blendAlpha,
void *  colorBuffer,
const uint32_t  colorBufferSize,
void *  depthBuffer,
const uint32_t  depthBufferSize,
PixelViewport outPVP 
) [static]

Merge the provided frames into one main memory buffer.

The called has to allocate and clear (if needed) the output buffers to hold the necessary data. All input images have to use the same format and type, which will also be the output format. The depth buffer and depth buffer size may be 0, if the images contain no depth information.

The output pixel viewport receives the image size and offset wrt the destination channel.

Returns:
true if the compositing was successful, false otherwise, e.g., a buffer is too small.

Definition at line 420 of file compositor.cpp.

References EQVERB, EQWARN, eq::PixelViewport::getArea(), and eq::PixelViewport::invalidate().

Here is the call graph for this function:

void eq::Compositor::assembleFrame ( const Frame frame,
Channel channel 
) [static]

void eq::Compositor::assembleImage ( const Image image,
const ImageOp operation 
) [static]

Start assembling an image.

Parameters:
image the input image.
operation an ImageOp struct describing the operation.

Definition at line 830 of file compositor.cpp.

References assembleImage2D(), assembleImageDB(), eq::Frame::BUFFER_COLOR, eq::Frame::BUFFER_DEPTH, eq::Compositor::Compositor::ImageOp::buffers, EQWARN, eq::Image::hasData(), and setupStencilBuffer().

Referenced by assembleFrame(), and assembleFramesCPU().

Here is the call graph for this function:

Here is the caller graph for this function:

void eq::Compositor::setupStencilBuffer ( const Image image,
const ImageOp operation 
) [static]

Setup the stencil buffer for a pixel compound recomposition.

Parameters:
image the image to be assembled.
operation the assembly parameters.

Definition at line 858 of file compositor.cpp.

References eq::ColorMask::blue, eq::Compositor::Compositor::ImageOp::channel, eq::Channel::getDrawBufferMask(), eq::Image::getPixelViewport(), eq::ColorMask::green, eq::PixelViewport::h, eq::Pixel::h, eq::Compositor::Compositor::ImageOp::offset, eq::Compositor::Compositor::ImageOp::pixel, eq::ColorMask::red, eq::PixelViewport::w, eq::Pixel::w, eq::Pixel::x, eq::PixelViewport::x, eq::Pixel::y, and eq::PixelViewport::y.

Referenced by assembleImage().

Here is the call graph for this function:

Here is the caller graph for this function:

void eq::Compositor::assembleImage2D ( const Image image,
const ImageOp op 
) [static]

Start a tile-based assembly of the image color attachment.

Definition at line 939 of file compositor.cpp.

References eq::Frame::BUFFER_COLOR, and eq::Image::hasData().

Referenced by assembleImage().

Here is the call graph for this function:

Here is the caller graph for this function:

void eq::Compositor::assembleImageDB ( const Image image,
const ImageOp op 
) [static]

Start a Z-based assembly of the image color and depth attachment.

Definition at line 1048 of file compositor.cpp.

References assembleImageDB_FF(), assembleImageDB_GLSL(), and eq::Compositor::Compositor::ImageOp::channel.

Referenced by assembleImage().

Here is the call graph for this function:

Here is the caller graph for this function:


The documentation for this class was generated from the following files:
Generated on Mon Aug 10 18:58:42 2009 for Equalizer 0.9 by  doxygen 1.5.8