17#ifndef AGXOSG_RENDERTOIMAGE_H
18#define AGXOSG_RENDERTOIMAGE_H
76 osg::ref_ptr<osg::Image> m_renderImage;
#define AGX_DECLARE_POINTER_TYPES(type)
#define AGX_DECLARE_VECTOR_TYPES(type)
Render target is used for rendering camera content to a buffer, either a DEPTH or COLOR target.
TextureFormat
Specifies target texture format.
BufferComponent
Specifies which type of buffer to render.
This class will transfer the camera buffer to the CPU for local storage/processing.
unsigned char * getImageData()
bool extractImageData(unsigned char *img, int size)
Will try to extract the image data as a raw data array of length size.
RenderToImage(agx::UInt width, agx::UInt height, BufferComponent bufferComponent=COLOR_BUFFER, agx::UInt multiSamples=8, RenderTarget::TextureFormat textureFormat=RenderTarget::RGBA)
Constructor of a RenderTarget that can render the camera buffer to an image.
bool saveImage(const agx::String &filename)
Save the current image to disk given a filename Note: Only works for COLOR_BUFFER not DEPTH_BUFFER.
The agxOSG namespace provides functionality for visualizing AGX simulations with OpenSceneGraph.