Light Map Functions

mi_lightmap_edit
    miImg_image *mi_lightmap_edit(
        void               **handle,
        miTag              tag)

This function is used by lightmap shader to begin writing to the writable texture tag. It must have been defined in the scene with the writable keyword and was probably passed to the lightmap shader using a texture parameter. This function clears the texture, and returns an image pointer that can be used to write pixels with functions like mi_img_put_color. The handle is returned as an opaque pointer that should be passed to mi_lightmap_edit_end.

mi_lightmap_edit_end
    void mi_lightmap_edit_end(
        void               *handle)

Completes writing to the writable texture handle, which must have been previously created with mi_lightmap_edit. The texture is written to disk.

mi_state_set_pri
    void mi_state_set_pri(
        miState          *state,
        const struct miRc_intersection *pri,
        miUint           pri_idx)

3.6Auxiliary function to set the current primitive and triangle index in the state. See the example lightmap shader for its use. In previous versions, lightmap shaders had direct access to corresponding fields in the state structure, like state→pri_idx. This was changed to support assemblies.

Copyright © 1986-2009 by mental images GmbH