|
MaterialX 1.38.2
|
Wrapper for an OpenGL framebuffer. More...
#include <GLFramebuffer.h>
Public Member Functions | |
| virtual | ~GLFramebuffer () |
| Destructor. | |
| void | resize (unsigned int width, unsigned int height) |
| Resize the framebuffer. | |
| void | setEncodeSrgb (bool encode) |
| Set the encode sRGB flag, which controls whether values written to the framebuffer are encoded to the sRGB color space. | |
| bool | getEncodeSrgb () |
| Return the encode sRGB flag. | |
| void | bind () |
| Bind the framebuffer for rendering. | |
| void | unbind () |
| Unbind the frame buffer after rendering. | |
| unsigned int | getColorTexture () const |
| Return our color texture handle. | |
| unsigned int | getDepthTexture () const |
| Return our depth texture handle. | |
| ImagePtr | getColorImage (ImagePtr image=nullptr) |
| Return the color data of this framebuffer as an image. More... | |
| void | blit () |
| Blit our color texture to the back buffer. | |
Static Public Member Functions | |
| static GLFrameBufferPtr | create (unsigned int width, unsigned int height, unsigned int channelCount, Image::BaseType baseType) |
| Create a new framebuffer. | |
Protected Member Functions | |
| GLFramebuffer (unsigned int width, unsigned int height, unsigned int channelCount, Image::BaseType baseType) | |
Wrapper for an OpenGL framebuffer.
Return the color data of this framebuffer as an image.
If an input image is provided, it will be used to store the color data; otherwise a new image of the required format will be created.