Main Page   Modules   Alphabetical List   Data Structures   Data Fields  

RpMipmapKL
[Mipmapping]


Modules

PlayStation 2

Defines

#define  RpMipmapKLPluginAttach()   (TRUE)

Functions

RwReal  RpMipmapKLTextureSetDefaultK (RwReal val)
RwUInt32  RpMipmapKLTextureSetDefaultL (RwUInt32 val)
RwReal  RpMipmapKLTextureGetDefaultK (void)
RwUInt32  RpMipmapKLTextureGetDefaultL (void)
RwTexture RpMipmapKLTextureSetK (RwTexture *tex, RwReal val)
RwTexture RpMipmapKLTextureSetL (RwTexture *tex, RwUInt32 val)
RwReal  RpMipmapKLTextureGetK (RwTexture *tex)
RwUInt32  RpMipmapKLTextureGetL (RwTexture *tex)

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.
Note:
When developing on the PlayStation 2, the driver functions should be used instead to directly access the "K" and "L" values. This plugin should not be attached or used with SKY or NULLSKY libs.

In order to alter the "K" and "L" values on the SKY and NULLSKY libs, call:


Define Documentation

#define RpMipmapKLPluginAttach void       (TRUE)
 

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
Note:
When developing on the PlayStation 2, the driver functions should be used instead to directly access the "K" and "L" values. This plugin should not be attached or used with SKY or NULLSKY libs.

In order to alter the "K" and "L" values on the SKY and NULLSKY libs, call:


Function Documentation

RwReal RpMipmapKLTextureGetDefaultK void   
 

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

Returns:
"K" value currently used by default
Note:
When developing on the PlayStation 2, the driver functions should be used instead to directly access the "K" and "L" values. This plugin should not be attached or used with SKY or NULLSKY libs.

In order to alter the "K" and "L" values on the SKY and NULLSKY libs, call:

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
Note:
When developing on the PlayStation 2, the driver functions should be used instead to directly access the "K" and "L" values. This plugin should not be attached or used with SKY or NULLSKY libs.

In order to alter the "K" and "L" values on the SKY and NULLSKY libs, call:

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
Note:
When developing on the PlayStation 2, the driver functions should be used instead to directly access the "K" and "L" values. This plugin should not be attached or used with SKY or NULLSKY libs.

In order to alter the "K" and "L" values on the SKY and NULLSKY libs, call:

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
Note:
When developing on the PlayStation 2, the driver functions should be used instead to directly access the "K" and "L" values. This plugin should not be attached or used with SKY or NULLSKY libs.

In order to alter the "K" and "L" values on the SKY and NULLSKY libs, call:

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.

Note:
When developing on the PlayStation 2, the driver functions should be used instead to directly access the "K" and "L" values. This plugin should not be attached or used with SKY or NULLSKY libs.

In order to alter the "K" and "L" values on the SKY and NULLSKY libs, call:

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)
Note:
When developing on the PlayStation 2, the driver functions should be used instead to directly access the "K" and "L" values. This plugin should not be attached or used with SKY or NULLSKY libs.

In order to alter the "K" and "L" values on the SKY and NULLSKY libs, call:

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
Note:
When developing on the PlayStation 2, the driver functions should be used instead to directly access the "K" and "L" values. This plugin should not be attached or used with SKY or NULLSKY libs.

In order to alter the "K" and "L" values on the SKY and NULLSKY libs, call:

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
Note:
When developing on the PlayStation 2, the driver functions should be used instead to directly access the "K" and "L" values. This plugin should not be attached or used with SKY or NULLSKY libs.

In order to alter the "K" and "L" values on the SKY and NULLSKY libs, call:

See also:
RpMipmapKLTextureSetDefaultL , RpMipmapKLTextureGetDefaultL , RpMipmapKLTextureSetK , RpMipmapKLTextureGetL

Criterion Software © 1993-2003 Criterion Software Limited. All rights reserved. Built Tue Apr 22 12:46:26 2003. Send Feedback
Converted from CHM to HTML with chm2web Pro 2.85 (unicode)