All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HdxCompositor Class Reference

This class is a utility for rendering deep raytracer or aov output (color/depth) to the GL framebuffer. More...

Public Member Functions

HDX_API HdxCompositor ()
 Create a new compositor object. More...
 
HDX_API ~HdxCompositor ()
 Destroy the compositor object, releasing GL resources. More...
 
HDX_API void UpdateColor (int width, int height, HdFormat format, void *data)
 Upload a new color texture for compositing. More...
 
HDX_API void UpdateDepth (int width, int height, uint8_t *data)
 Upload a new depth texture for compositing. More...
 
HDX_API void Draw ()
 Draw the internal color/depth buffers to the bound framebuffer. More...
 
HDX_API void Draw (GLuint colorId, GLuint depthId)
 Draw the provided color/depth buffers to the bound framebuffer. More...
 

Detailed Description

This class is a utility for rendering deep raytracer or aov output (color/depth) to the GL framebuffer.

This lets callers composite results into existing scenes.

Definition at line 47 of file compositor.h.

Constructor & Destructor Documentation

HDX_API HdxCompositor ( )

Create a new compositor object.

Creation of GL resources is deferred until UpdateColor/UpdateDepth/Draw.

HDX_API ~HdxCompositor ( )

Destroy the compositor object, releasing GL resources.

Member Function Documentation

HDX_API void Draw ( )

Draw the internal color/depth buffers to the bound framebuffer.

This will load the GLSL compositing program on-demand.

HDX_API void Draw ( GLuint  colorId,
GLuint  depthId 
)

Draw the provided color/depth buffers to the bound framebuffer.

This will load the GLSL compositing program on-demand.

HDX_API void UpdateColor ( int  width,
int  height,
HdFormat  format,
void *  data 
)

Upload a new color texture for compositing.

The data is expected to be GL_RGBA/GL_UNSIGNED_BYTE.

Parameters
widthThe width of the image.
heightThe height of the image.
formatThe data format in GL_UNSIGNED_BYTE, GL_HALF_FLOAT, or GL_FLOAT.
dataThe color data to use while compositing, in GL_RGBA.
HDX_API void UpdateDepth ( int  width,
int  height,
uint8_t *  data 
)

Upload a new depth texture for compositing.

The data is expected to be GL_R32F.

Parameters
widthThe width of the image.
heightThe height of the image.
dataThe depth data to use while compositing, in GL_R32F.

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