The RenderToImage() graphics system function calls the rendering engine with the RapidRT specific settings contained in an AcDbRapidRTRenderSettings object, and returns the rendered image. The functionality of the AcDbRenderGlobal settings must be implemented by you when calling RenderToImage().
This function can be implemented to override the default behavior of the rendering functions (RENDER and RENDERCROP). Implementing the progress monitor interface provides an interactive rendering process and the possibility to cache the geometry, lighting, and material information. When caching is enabled, consecutive calls to this function will only translate the new camera position and render the cached data. This is useful when rendering the same drawing, or a region of a drawing, using different cameras.
You do not have to use an existing view or viewport to call this function. In some cases it may be necessary to create your own AcGsView on an off-screen AcGsDevice before calling this function.
The rendered output is an Atil::Image in Red Green Blue Alpha (RGBA) bottom-up format. You are responsible for initializing this image to the correct size, format, and depth before passing it to the function. When using this output image, be sure to convert it to the format that is required by the destination. AutoCAD uses a Blue Green Red Alpha (BGRA) top-down format for its display.