Main Page   Modules   Alphabetical List   Data Structures   Data Fields  

D3D9
[RwRaster]


Modules

Raster Types
Raster Functions
Raster 2D Functions

Functions

RwRasterRwD3D9RasterStreamReadDDS (RwStream *stream)
RwBool RwD3D9RasterIsCompressed (const RwRaster *raster)
RwRasterRwD3D9RasterCreate (RwUInt32 width, RwUInt32 height, RwUInt32 d3dFormat, RwUInt32 flags)

Detailed Description

Platform specific

Function Documentation

RwRaster* RwD3D9RasterCreate RwUInt32    width,
RwUInt32    height,
RwUInt32    d3dFormat,
RwUInt32    flags
 

RwD3D9RasterCreate is used to create a new raster of the specified type with the given width, height and a D3D9 pixel format. The width and height are specified in pixels, and the flags indicate the type of the raster to create.

Note:
This function may fail if the specified pixel format is not supported by the video card.
Parameters:
width  An RwUInt32 value equal to the width of the raster.
height  An RwUInt32 value equal to the height of the raster.
d3dFormat  A D3DFORMAT value describing the pixel format required. See the D3D9 API documentation from Microsoft for more details.
flags  An RwUInt32 value specifying the type of raster to create, combined using a bit-wise OR. The following flags are supported:
  • rwRASTERTYPENORMAL - Device default raster.
  • rwRASTERTYPETEXTURE - Texture raster.
  • rwRASTERTYPECAMERATEXTURE - Camera texture raster.
  • rwRASTERFORMATAUTOMIPMAP - RenderWare Graphics generates the mip levels.
  • rwRASTERFORMATMIPMAP - Mip mapping on.
Returns:
Returns a pointer to the new raster if successful or NULL if there is an error.

RwBool RwD3D9RasterIsCompressed const RwRaster   raster
 

RwD3D9RasterIsCompressed is used to check if a raster is compressed or not.

Parameters:
raster  Const pointer to the raster that is to be checked.
Returns:
Returns TRUE if the raster is compressed, FALSE otherwise.
See also:
RwD3D9DDSTextureRead

RwRaster* RwD3D9RasterStreamReadDDS RwStream   stream
 

RwD3D9RasterStreamReadDDS creates an RwRaster from a DDS stored in the open stream argument. This function currently supports all different flavors of DDS files, including DXT compressed textures, cube textures and mipmaps.

If you try to load a raster with a format not supported by the video card drivers, RWD3D9 will automatically convert the texture to the most suitable raster format.

For more information on DDS files, DXT compressed textures and cube textures, see the D3D9 SDK documentation.

Parameters:
stream  RwStream where the DDS file is stored.
Returns:
The RwRaster on success or a NULL pointer on error.
See also:
RwD3D9DDSTextureRead , RwTextureRead


Criterion Software © 1993-2004 Criterion Software Limited. All rights reserved. Built Thu Feb 12 13:46:57 2004. Send Feedback