SoOffscreenRenderAreaRenderToBuffer Method (SoBufferObject, SoOffscreenRenderAreaOutputFormats) |
Render the given scene graph and save the result in the given buffer.
Namespace: OIV.Inventor
public bool RenderToBuffer( SoBufferObject buffer, SoOffscreenRenderAreaOutputFormats outputFormat )
stores the result of the rendering.
defines which components to write to the output. If set to OIV.Inventor.SoOffscreenRenderArea.OutputFormats.RGBA, the alpha component of the rendering is also written to the buffer.
The buffer is resized if its current size is not equal to the the necessary size to store the rendering result.
If your application needs more control over creation of an output file, the OIV.Inventor.Devices.SoBufferObject can be converted into an OIV.Inventor.Image.SbRasterImage using the appropriate constructor. Once instantiated, the OIV.Inventor.Image.SbRasterImage can be passed as a parameter to the write function of any class inheriting from OIV.Inventor.Image.SoRasterImageRW (OIV.Inventor.Image.SoJPEGImageRW for example to generate a JPEG file).