RenderWare V2.1

Previous Page Index Next Page

RwTexture *

RwReadNamedTexture(char *name);

Description

Reads a texture with the specified name and stores it into the current texture dictionary.

Arguments

name Name of a texture.

Return Value

A pointer to a newly created texture if successful, and NULL otherwise.

Comments

This function uses the environment variable RWSHAPEPATH as it’s search path. The texture read from disk will replace any texture with the specified name that is already in the current texture dictionary.

The string supplied as the texture name must form the leaf part (i.e., without path or extension) of the pathname for the texture file. Furthermore, for the sake of portability of script files across the different platforms supported by RenderWare, it is best to choose texture file names that are a maximum of eight characters long and which are acceptable to MS-DOS as file names.

An example of a valid texture name is "marble", which will match with file names "marble", "marble.tex", "marble.ras", "marble.env", "marble.bmp" and "marble.env".

See Also

RwCreateTexture()

RwDestroyTexture()

RwFindNamedTexture()

RwGetNamedTexture()

RwGetShapePath()

RwReadTexture()

RwSetShapePath()