SoOffscreenRenderer(3IV)

SoOffscreenRenderer (SoOffRnd) - renders to an off-screen buffer for printing or generating textures

As shipped in IRIX 6.5.30. Added in IRIX 6.5.22.

NAME
     SoOffscreenRenderer (SoOffRnd) - renders to an off-screen buffer for
     printing or generating textures

INHERITS FROM
     SoOffscreenRenderer

SYNOPSIS
     #include <Inventor_c/SoOffscreenRenderer.h>

     typedef SoOffscreenRenderer  SoOffRnd

     enum SoOffscreenRendererComponents {
          SO_OFF_RND_LUMINANCE
          SO_OFF_RND_LUMINANCE_TRANSPARENCY

          SO_OFF_RND_RGB
          SO_OFF_RND_RGB_TRANSPARENCY
     }

          Functions from class SoOffscreenRenderer:

     SoOffscreenRenderer *     SoOffRndCreate(const SbViewportRegion
                                    *viewportRegion)
     SoOffscreenRenderer *     SoOffRndCreateAct(SoGLRenderAction *ra)
     void                      SoOffRndDelete(SoOffRnd *this)
     float                     SoOffRndGetScrPixPerInch()
     SbVec2s                   SoOffRndGetMaxRes()
     void                      SoOffRndSetComp(SoOffRnd *this, Components
                                    components)
     Components                SoOffRndGetComp(const SoOffRnd *this)
     void                      SoOffRndSetVP(SoOffRnd *this, const
                                    SbViewportRegion *region)
     const SbViewportRegion *  SoOffRndGetVP(const SoOffRnd *this)
     void                      SoOffRndSetBkgCol(SoOffRnd *this, const SbColor
                                    *c)
     const SbColor *           SoOffRndGetBkgCol(const SoOffRnd *this)
     void                      SoOffRndSetAct(SoOffRnd *this, const
                                    SoGLRenderAction *ra)
     SoGLRenderAction *        SoOffRndGetAct(const SoOffRnd *this)
     SbBool                    SoOffRndRnd(SoOffRnd *this, SoNode *scene)
     SbBool                    SoOffRndRndPath(SoOffRnd *this, SoPath *scene)
     unsigned char *           SoOffRndGetBuff(const SoOffRnd *this)
     SbBool                    SoOffRndToRGB(const SoOffRnd *this, FILE *fp)
     SbBool                    SoOffRndToPS(const SoOffRnd *this, FILE *fp)
     SbBool                    SoOffRndToPSSize(const SoOffRnd *this, FILE
                                    *fp, const SbVec2f *printSize)


DESCRIPTION
     This class is used to render into an off-screen buffer to create a
     printable image or to generate a texture image. It uses X Pixmaps for
     rendering. Methods are provided to write the buffer to a file, either as
     an RGB image or an encapsulated PostScript description.

FUNCTIONS
     SoOffscreenRenderer *     SoOffRndCreate(const SbViewportRegion
                                    *viewportRegion)
     SoOffscreenRenderer *     SoOffRndCreateAct(SoGLRenderAction *ra)
     void                      SoOffRndDelete(SoOffRnd *this)
          Constructors and destructor. If a render action is passed to the
          contructor, that action will be used in all subsequent offscreen
          renderings. Otherwise, an internal instance of an SoGLRenderAction
          will be maintained with a viewport region set to the on passed in by
          the constructor.

     float                     SoOffRndGetScrPixPerInch()
          Returns the number of pixels per inch (in the horizontal direction)
          of the current X device screen.

     SbVec2s                   SoOffRndGetMaxRes()
          Get the maximum supported resolution of the viewport.

     void                      SoOffRndSetComp(SoOffRnd *this, Components
                                    components)
     Components                SoOffRndGetComp(const SoOffRnd *this)
          Sets or returns the components to be rendered.

     void                      SoOffRndSetVP(SoOffRnd *this, const
                                    SbViewportRegion *region)
     const SbViewportRegion *  SoOffRndGetVP(const SoOffRnd *this)
          Sets or returns the viewport region used for rendering. This will
          NOT be applied to the viewport region of any render action passed
          in.

     void                      SoOffRndSetBkgCol(SoOffRnd *this, const SbColor
                                    *c)
     const SbColor *           SoOffRndGetBkgCol(const SoOffRnd *this)
          Sets or returns the background color for rendering.

     void                      SoOffRndSetAct(SoOffRnd *this, const
                                    SoGLRenderAction *ra)
     SoGLRenderAction *        SoOffRndGetAct(const SoOffRnd *this)
          Set and get the render action to use for rendering. This will return
          any render action passed in by the caller.

     SbBool                    SoOffRndRnd(SoOffRnd *this, SoNode *scene)
     SbBool                    SoOffRndRndPath(SoOffRnd *this, SoPath *scene)
          Renders the given scene, specified as a node or a path, into an
          off-screen buffer.

     unsigned char *           SoOffRndGetBuff(const SoOffRnd *this)
          Returns the buffer containing the rendered image. The buffer is an
          array of unsigned characters. Each pixel is stored sequentially by
          scanline, starting with the lower left corner. The data stored for
          each pixel is determined by the Components set before rendering.
          Pixels are stored in RGBA order and are packed without any padding
          between pixels or scanlines. The buffer is allocated by the
          offscreen renderer class and the space is deleted when the instance
          is destructed.

     SbBool                    SoOffRndToRGB(const SoOffRnd *this, FILE *fp)
          Writes the buffer as a .rgb file to the given file pointer.

     SbBool                    SoOffRndToPS(const SoOffRnd *this, FILE *fp)
     SbBool                    SoOffRndToPSSize(const SoOffRnd *this, FILE
                                    *fp, const SbVec2f *printSize)
          Writes the buffer as encapsulated PostScript. If a print size is not
          given, the size of the image in the buffer is adjusted so it is the
          same as the apparent size of the viewport region on the current
          device.