EnvironmentHandler FileRequester Classes Table of Contents


Availability  LightWave® 9.6
Component  Layout
Header  lwextrend.h

External renderer handlers replace the LightWave® renderer. The external renderer obtains information about the scene through the LWSDK, and can do some limited manipulation through the command interface. When an external renderer is called, LightWave® will be in a rendering state. External renderers are supported in both Layout and ScreamerNet.

Handler Activation Function

   XCALL_( int ) MyExtRenderer( int version, GlobalFunc *global,
      LWExtRendererHandler *local, void *serverData );

The local argument to an extern renderer handler's activation function is an LWExtRendererHandler.

   typedef struct st_LWExtRendererHandler {
      LWInstanceFuncs *inst;
      LWItemFuncs     *item;
      int            (*options)(LWInstance);
      int            (*render) (LWInstance, int, int, int, EXTRENDERERIMAGE *, int);
   } LWExtRendererHandler;

The first two members of this structure are standard handler functions. The context argument to the inst->create function is currently undefined.

In addition to the standard handler functions, an external renderer handler provides an options function and the all-important render function.

success = options( instance )
Callback used by LightWave® intended to present the user with any options for the renderer. Returns 0 on failure, 1 for success.

success = render( instance, first_frame, last_frame, frame_step,
                  render_image, render_mode )
The function that does the actual rendering. The render mode is one of LWRENDERINGMODE in lwrender.h. When the external renderer finishes rendering a frame, it can use the supplied render_image function to have the frame displayed and/or written to disk. The LWPixmap the external renderer provides will be destroyed by this. Returns 0 on failure, 1 when the render was successful.