RenderWare V2.1

Previous Page Index Next Page

Data Types


The RenderWare library exports a small number of data types and associated functions which operate there on.

All RenderWare API functions and data types are prefixed with "Rw". For example:


RwRenderScene()
RwClump *

All RenderWare enumerated type values are prefixed with "rw". For example:


rwWIREFRAME

From the programmer’s perspective, there are two major categories of data types within the RenderWare library: public types and opaque types.

Public types may be created and manipulated by the standard C language mechanisms. For example, a field in an object of the public structure type RwV3d can be set directly:


RwV3d point;
point.x = 1.0;

Unlike instances of the public types, opaque objects, such as matrices, cameras, clumps and lights, can only be created and accessed by RenderWare API functions which identify those objects by opaque object pointers. The implementation of opaque types is hidden from the application programmer in much the same manner as the C language standard library FILE structure. For example, a field in an object of the opaque type RwClump can only be set with the appropriate RenderWare API function:


RwClump *clump;

clump = RwCreateClump(10, 10);

RwSetClumpTag(clump, 23);