Main Page   Modules   Alphabetical List   Data Structures   Data Fields  

RpAnisot
[Mipmapping]


Functions

RwInt8 RpAnisotGetMaxSupportedMaxAnisotropy (void)
RwTextureRpAnisotTextureSetMaxAnisotropy (RwTexture *tex, RwInt8 val)
RwInt8 RpAnisotTextureGetMaxAnisotropy (RwTexture *tex)
RwBool RpAnisotPluginAttach (void)

Detailed Description

Anisotropic Texture Sampling Plugin for RenderWare Graphics.

RpAnisot Plugin Overview

Requirements

Overview

The RpAnisot plugin is used to extend an RwTexture with a maximum anisotropy value that will be used when a particular texture is drawn. When textured polygons are viewed nearly edge on, for example when looking dowm a road or a football pitch, distant pixels are not sampled very well by trilinear mipmapping and the texture looks smeary. Anisotropic sampling takes additional samples, resulting in sharper looking textures. Higher numbers of samples will produce better quality results but run slower, so should be used in moderation.


Function Documentation

RwInt8 RpAnisotGetMaxSupportedMaxAnisotropy void   
 

RpAnisotGetMaxSupportedMaxAnisotropy is used to determine the maximum anisotropy available on the hardware.

Returns:
RwInt8 containing the maximum anisotropy supported, or 0 if it is not supported.
See also:
RpAnisotTextureSetMaxAnisotropy , RpAnisotTextureGetMaxAnisotropy

RwBool RpAnisotPluginAttach void   
 

RpAnisotPluginAttach is used to attach the anisot plugin to the RenderWare Graphics system to enable anisotropic texturing values to be stored with textures.

These texturing values are set as the D3DTSS_MAXANISOTROPY texture stage state.

The plugin must be attached between initializing the system with RwEngineInit and opening it with RwEngineOpen.

Note that the include file rpanisot.h is required and must be included by an application wishing to use this facility. The anisot library is contained in the file rpanisot.lib.

Returns:
RwBool, TRUE if successful, or FALSE if there is an error

RwInt8 RpAnisotTextureGetMaxAnisotropy RwTexture   tex
 

RpAnisotTextureGetMaxAnisotropy is used to get the maximum anisotropy value that will be used when a particular texture is drawn.

See RpAnisotTextureSetMaxAnisotropy for further information.

Parameters:
tex  Pointer to RwTexture being queried.
Returns:
RwInt8 containing the texture's maximum anisotropy value.
See also:
RpAnisotTextureSetMaxAnisotropy , RpAnisotGetMaxSupportedMaxAnisotropy

RwTexture* RpAnisotTextureSetMaxAnisotropy RwTexture   tex,
RwInt8    val
 

RpAnisotTextureSetMaxAnisotropy is used to set the maximum anisotropy value that will be used when a particular texture is drawn. Higher numbers will produce better quality but slower texture sampling when polygons are viewed edge on, so it should be used in moderation.

In D3D9 this is done with the D3DTSS_MAXANISOTROPY texture stage state. If the value is > 1, filter modes with magnification and minification filters of type D3DTEXF_ANISOTROPIC are chosen with the same mip mapping filter D3DTSS_MIPFILTER determined by the filter mode of the texture. See also RwTextureFilterMode and RwTextureGetFilterMode.

Parameters:
tex  Pointer to RwTexture to update.
val  RwInt8 containing the max anisotropy value that must be less than the maximum reported by RpAnisotGetMaxSupportedMaxAnisotropy.
Returns:
Pointer to an RwTexture that is the texture passed in as an argument, or NULL on failure.
See also:
RpAnisotTextureGetMaxAnisotropy , RpAnisotGetMaxSupportedMaxAnisotropy


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