#include <compositor.h>
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 Image * | mergeFramesCPU (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. | |
Definition at line 34 of file compositor.h.
| 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.
| 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().


| 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().
| 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().

| void eq::Compositor::assembleFramesUnsorted | ( | const FrameVector & | frames, | |
| Channel * | channel | |||
| ) | [static] |
Assemble all frames in the order they become available directly on the given channel.
| 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().


| 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.
| 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().


| 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().


| 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.
Definition at line 420 of file compositor.cpp.
References EQVERB, EQWARN, eq::PixelViewport::getArea(), and eq::PixelViewport::invalidate().

Assemble a frame using the default algorithm.
Definition at line 809 of file compositor.cpp.
References assembleImage(), eq::Compositor::Compositor::ImageOp::buffers, eq::Compositor::Compositor::ImageOp::channel, EQINFO, eq::Frame::getBuffers(), eq::Frame::getImages(), eq::Frame::getOffset(), eq::Frame::getPixel(), eq::Frame::getZoom(), eq::Compositor::Compositor::ImageOp::offset, eq::Compositor::Compositor::ImageOp::pixel, and eq::Compositor::Compositor::ImageOp::zoom.
Referenced by assembleFramesSorted(), and assembleFramesUnsorted().


Start assembling an image.
| 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().


Setup the stencil buffer for a pixel compound recomposition.
| 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().


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().


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().


0.9 by
1.5.8