Click or drag to resize
SoOffscreenRenderAreaRenderToBuffer Method (SoBufferObject, SoOffscreenRenderAreaOutputFormats)

Render the given scene graph and save the result in the given buffer.

Namespace: OIV.Inventor
Assembly: OIV.Inventor (in OIV.Inventor.dll) Version: 2024.1.1.0 (2024.1.1)
Syntax
public bool RenderToBuffer(
	SoBufferObject buffer,
	SoOffscreenRenderAreaOutputFormats outputFormat
)

Parameters

buffer
Type: OIV.Inventor.DevicesSoBufferObject

stores the result of the rendering.

outputFormat
Type: OIV.InventorSoOffscreenRenderAreaOutputFormats

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.

Return Value

Type: Boolean
Remarks

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

See Also