RenderWare V2.1

Previous Page Index Next Page

RwClump *

RwCreateSprite(RwTexture *texture);

Description

Creates a sprite. A sprite is a specialized form of clump which is used to display unlit textures constrained to be coplanar with the viewplane of a camera.

Arguments

texture Pointer to the texture.

Return Value

A pointer to the newly created sprite if successful, and NULL otherwise.

Comments

This function is a simplification function which creates a clump with a single, rectangular polygon, one unit in width and one unit in height, centered about the origin and lying in the X-Y plane. The given texture is made the current texture of the polygon’s material and the material’s texture mode is set to 0, i.e., the sprite is unlit, not foreshortened and unfiltered. The clump’s axis alignment parameter is set to rwALIGNAXISXYZ.

The resulting clump may be manipulated in exactly the same way and using exactly the same API calls as clumps created by RwReadShape(), RwClumpBegin()RwClumpEnd(), and RwCreateClump(). In particular, RwDestroyClump() should be used to destroy the clump created by RwCreateSprite() when it is no longer required.

See Also

RwAddPolygonToClump()

RwAddVertexToClump()

RwClumpBegin()

RwClumpEnd()

RwCreateClump()

RwDestroyClump()

RwFindNamedTexture()

RwGetNamedTexture()

RwReadNamedTexture()

RwReadShape()

RwReadTexture()

RwSetClumpAxisAlignment()

RwSetPolygonTexture()

RwSetPolygonTextureModes()