RenderWare V2.1

Previous Page Index Next Page

RwClump *

RwSetClumpImmediateCallBack(RwClump *clump,
RwClumpCallBack callback);

Description

Sets up a function which is called before a clump is rendered.

Arguments

clump Clump which when a rendering is requested causes a call to the function callback. Note that this call happens before any rendering of the clump has occurred.

callback Function which is called. NULL will stop callbacks when clump is to be rendered.

Return Value

The clump passed.

Comments

When a clump is to be rendered (from RwRenderClump() or RwRenderScene() for example) a call to the callback function is made if it is not NULL. If the callback function is NULL then the clump is rendered in the normal way.

Within the callback the clump can be rendered as normal with RwRenderImmediateClump(). Also in this clump there is an implicit RwImmediateBegin() and RwImmediateEnd() which occur just before the entering of the callback and just after leaving the callback respectively.

If RenderWare 'believes' Z buffering should occur on this clump it will have set up a Z buffer with size at least as large as the pixel space area of the clumps bounding box. This means that Z buffering can be performed within the callback (if the clump it thought to require Z buffering because of its type or because it intersects other clumps) any immediate mode Z buffered rendering MUST occur within the pixel space projection of the bounding box of the clump, otherwise the Z buffer will not be correctly initialized.

The damage area for the clump will also be setup, it will again be as large as the pixel space projection of the clumps bounding box.

Note that this means that if 3d vertices are used in immediate mode they only need to be within the bounding boxes volume to appear within the pixel space projection of the bounding box.

See Also

RwSetupImmediateLine()

RwSetupImmediateTriangle()

RwImmediateBegin()

RwImmediateEnd()

RwRenderImmediateTriangle()

RwRenderImmediateLine()

RwRenderImmediateClump()

RwGetClumpImmVertex()

RwImmVertexPixelSpace()

RwImmZBufferDepth()

RwSetImmediateZRange()