RenderWare V2.1

Previous Page Index Next Page

RwTexture *

RwSetTextureRaster(RwTexture *texture, RwRaster *raster);

Description

Sets the raster of the specified texture to raster.

Arguments

texture Pointer to the texture.

raster Pointer to the raster.

Return Value

The argument texture if successful, and NULL otherwise.

Comments

The raster selected into a texture provides the actual pixel values of the texture map. RwSetTextureRaster() is used to dynamically generate textures from platform specific bitmaps (via RwBitmapRaster()).

Rasters cannot be shared between textures. It is an error to specify a raster already selected into a texture.

The texture’s existing raster will be destroyed by this function.

raster must be of the correct size - 128 by 128 pixels (or 128 by n*128 pixels for a multi-frame texture). It is an error to call RwSetTextureRaster() with a raster that is not of this size.

See Also

RwBitmapRaster()

RwCreateRaster()

RwCreateTexture()

RwDestroyRaster()

RwDuplicateRaster()

RwReadRaster()

RwSetTextureRaster()