Main Page   Modules   Alphabetical List   Data Structures   Data Fields  

RpMipmapKL
[Mipmapping]


Functions

RwReal RpMipmapKLTextureSetDefaultK (RwReal val)
RwUInt32 RpMipmapKLTextureSetDefaultL (RwUInt32 val)
RwReal RpMipmapKLTextureGetDefaultK (void)
RwUInt32 RpMipmapKLTextureGetDefaultL (void)
RwTextureRpMipmapKLTextureSetK (RwTexture *tex, RwReal val)
RwTextureRpMipmapKLTextureSetL (RwTexture *tex, RwUInt32 val)
RwReal RpMipmapKLTextureGetK (RwTexture *tex)
RwUInt32 RpMipmapKLTextureGetL (RwTexture *tex)
RwBool RpMipmapKLPluginAttach (void)

Detailed Description

PlayStation 2 / MipMap KL Value Plugin for RenderWare Graphics.

RpMipmapKL Plugin Overview

Requirements

Overview

The RpMipmapKL plugin extends the RwTexture to contain "K" and "L" values. The RpMipmapKL plugin is provided on all platforms. This allows the generation of art assets for the PlayStation 2.

The "K" and "L" values control the way mipmap levels are selected by the GS. Except in the unusual situation where all textures have been sized to get an even texture density across the scene, it is better to set each texture's "K" and "L" values directly using RpMipmapKLTextureSetK and RpMipmapKLTextureSetL.

Essentially they allow you to work out the pixel:texel ratio when rendering a single pixel, if you know it's distance from the camera. For example, the GS can get the mipmap level purely from the value in Z. Further information is available in the GS User's Manual.

The toolkit RtMipmapK is provided to help calculate suitable "K" values.

The following functions are provided to access the default "K" and "L" values:

The following functions are provided to directly alter the "K" and "L" values for an individual texture:
Note:
The RtMipmapK toolkit is required to calculate the "K" and "L" values. These calculations need to be performed as a pre-process.

Function Documentation

RwBool RpMipmapKLPluginAttach void   
 

RpMipmapKLPluginAttach is used to attach the MipmapKL plugin to the RenderWare system to enable PlayStation 2 Mipmap "K" & "L" to be stored with textures. The plugin must be attached between initializing the system with RwEngineInit and opening it with RwEngineOpen.

Note:
The include file rpmipkl.h is required and must be included by an application wishing to use this facility. The MipmapKL library is contained in the file rpmipkl.lib.
Returns:
Returns TRUE if successful or FALSE if there is an error

RwReal RpMipmapKLTextureGetDefaultK void   
 

RpMipmapKLTextureGetDefaultK is used to get the current default "K" value used at texture creation.

Returns:
"K" value currently used by default
See also:
RpMipmapKLTextureSetDefaultK , RpMipmapKLTextureSetDefaultL , RpMipmapKLTextureGetDefaultL

RwUInt32 RpMipmapKLTextureGetDefaultL void   
 

RpMipmapKLTextureGetDefaultL is used to get the current default "K" value used at texture creation.

Returns:
"K" value currently used by default
See also:
RpMipmapKLTextureSetDefaultK , RpMipmapKLTextureSetDefaultL , RpMipmapKLTextureGetDefaultK

RwReal RpMipmapKLTextureGetK RwTexture   tex
 

RpMipmapKLTextureGetK is used to get the "K" value that will be used when a particular texture is drawn.

Parameters:
tex  texture being queried
Returns:
The texture's "K" value
See also:
RpMipmapKLTextureSetK , RpMipmapKLTextureGetL

RwUInt32 RpMipmapKLTextureGetL RwTexture   tex
 

RpMipmapKLTextureGetL is used to get the "L" value that will be used when a particular texture is drawn.

Parameters:
tex  texture being queried
Returns:
The texture's "L" value
See also:
RpMipmapKLTextureSetL , RpMipmapKLTextureGetK

RwReal RpMipmapKLTextureSetDefaultK RwReal    val
 

RpMipmapKLTextureSetDefaultK is used to set the default "K" value that will be used when textures are created. It will almost always be better to set this, per texture, using RpMipmapKLTextureSetK.

Parameters:
val  floating point "K" value.
Returns:
"K" value actually asigned (Limited precision is available)
See also:
RpMipmapKLTextureSetDefaultL , RpMipmapKLTextureGetDefaultK , RpMipmapKLTextureGetDefaultL , RpMipmapKLTextureSetK

RwUInt32 RpMipmapKLTextureSetDefaultL RwUInt32    val
 

RpMipmapKLTextureSetDefaultL is used to set the default "L" value that will be used when textures are created. It will almost always be better to set this, per texture, using RpMipmapKLTextureSetL.

Parameters:
val  "L" value.
Returns:
"L" value actually asigned (Limited range is available)
See also:
RpMipmapKLTextureSetDefaultK , RpMipmapKLTextureGetDefaultK , RpMipmapKLTextureGetDefaultL , RpMipmapKLTextureSetL

RwTexture* RpMipmapKLTextureSetK RwTexture   tex,
RwReal    val
 

RpMipmapKLTextureSetK is used to set the "K" value that will be used when a particular texture is drawn.

Parameters:
tex  texture to update.
val  floating point "K" value.
Returns:
The texture, otherwise NULL on failure
See also:
RpMipmapKLTextureSetDefaultK , RpMipmapKLTextureGetDefaultK , RpMipmapKLTextureSetL , RpMipmapKLTextureGetK

RwTexture* RpMipmapKLTextureSetL RwTexture   tex,
RwUInt32    val
 

RpMipmapKLTextureSetL is used to set the "L" value that will be used when a particular texture is drawn.

Parameters:
tex  texture to update.
val  "L" value.
Returns:
The texture, otherwise NULL on failure
See also:
RpMipmapKLTextureSetDefaultL , RpMipmapKLTextureGetDefaultL , RpMipmapKLTextureSetK , RpMipmapKLTextureGetL


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