Table of Contents Glide Programming Guide


Appendix B. Glide State Constants



Download 6.22 Mb.
Page101/106
Date03.02.2023
Size6.22 Mb.
#60547
1   ...   98   99   100   101   102   103   104   105   106
GLIDEPGM

Appendix B. Glide State Constants


This following table shows the Glide constants that define values for modes, functions, and other Glide state variables.

If the Glide type is

and the argument name is something like

then these constants are valid values for the argument

and these are the consequences of choosing that value.

FxU32

evenOdd
oddEvenMask

GR_MIPMAPLEVELMASK_EVEN
GR_MIPMAPLEVELMASK_ODD
GR_MIPMAPLEVELMASK_BOTH

Selects mipmaps for loading. Even LODs are GR_LOD_256, GR_LOD_64, GR_LOD_16, GR_LOD_4, and GR_LOD_1.
Odd LODs are GR_LOD_128, GR_LOD_32, GR_LOD_8, and GR_LOD_2.

GrAlphaBlendFnc_t

rgbSrcFactor
rgbDestFactor
alphaSrcFactor
alphaDestFactor

GR_BLEND_ZERO
GR_BLEND_SRC_ALPHA
GR_BLEND_SRC_COLOR
GR_BLEND_DST_COLOR
GR_BLEND_DST_ALPHA
GR_BLEND_ONE
GR_BLEND_ONE_MINUS_SRC_ALPHA
GR_BLEND_ONE_MINUS_SRC_COLOR
GR_BLEND_ONE_MINUS_DST_COLOR
GR_BLEND_ONE_MINUS_DST_ALPHA
GR_BLEND_RESERVED_8
GR_BLEND_RESERVED_9
GR_BLEND_RESERVED_A
GR_BLEND_RESERVED_B
GR_BLEND_RESERVED_C
GR_BLEND_RESERVED_D
GR_BLEND_RESERVED_E
GR_BLEND_ALPHA_SATURATE
GR_BLEND_PREFOG_COLOR

Sets alpha blending factors.

GrAspectRatio_t

aspectRatio

GR_ASPECT_8x1
GR_ASPECT_4x1
GR_ASPECT_2x1
GR_ASPECT_1x1
GR_ASPECT_1x2
GR_ASPECT_1x4
GR_ASPECT_1x8

Sets the aspect ratio of the textures in a mipmap.

GrBuffer_t



buffer

GR_BUFFER_FRONTBUFFER
GR_BUFFER_BACKBUFFER
GR_BUFFER_AUXBUFFER
GR_BUFFER_DEPTHBUFFER
GR_BUFFER_ALPHABUFFER
GR_BUFFER_TRIPLEBUFFER




GrChipID_t

tmu

GR_TMU0
GR_TMU1
GR_TMU2

Selects the target TMU. The constant names it.

GrChromakeyMode_t

mode

GR_CHROMAKEY_DISABLE
GR_CHROMAKEY_ENABLE




GrCmpFnc_t

func

GR_CMP_NEVER
GR_CMP_LESS
GR_CMP_EQUAL
GR_CMP_LEQUAL
GR_CMP_GREATER
GR_CMP_NOTEQUAL
GR_CMP_GEQUAL
GR_CMP_ALWAYS




GrColorFormat_t

cFormat

GR_COLORFORMAT_ARGB
GR_COLORFORMAT_ABGR
GR_COLORFORMAT_RGBA
GR_COLORFORMAT_BGRA







If the Glide type is

and the argument name is something like

then these constants are valid values for the argument

and these are the consequences of choosing that value.

GrCombineFactor_t



factor
rgbFactor
alphaFactor

GR_COMBINE_FACTOR_ZERO
GR_COMBINE_FACTOR_NONE
GR_COMBINE_FACTOR_LOCAL
GR_COMBINE_FACTOR_OTHER_ALPHA
GR_COMBINE_FACTOR_LOCAL_ALPHA
GR_COMBINE_FACTOR_TEXTURE_ALPHA
GR_COMBINE_FACTOR_DETAIL_FACTOR
GR_COMBINE_FACTOR_LOD_FRACTION
GR_COMBINE_FACTOR_ONE
GR_COMBINE_FACTOR_ONE_MINUS_LOCAL
GR_COMBINE_FACTOR_ONE_MINUS_OTHER_ALPHA
GR_COMBINE_FACTOR_ONE_MINUS_LOCAL_ALPHA
GR_COMBINE_FACTOR_ONE_MINUS_TEXTURE_ALPHA
GR_COMBINE_FACTOR_ONE_MINUS_DETAIL_FACTOR
GR_COMBINE_FACTOR_ONE_MINUS_LOD_FRACTION

Chooses a combine factor for the color combine, alpha combine, or texture combine units.

GrCombineFunction_t

factor
rgbFunction
alphaFunction

GR_COMBINE_FUNCTION_ZERO
GR_COMBINE_FUNCTION_NONE
GR_COMBINE_FUNCTION_LOCAL
GR_COMBINE_FUNCTION_LOCAL_ALPHA
GR_COMBINE_FUNCTION_SCALE_OTHER
GR_COMBINE_FUNCTION_BLEND_OTHER
GR_COMBINE_FUNCTION_SCALE_OTHER_ADD_LOCAL
GR_COMBINE_FUNCTION_SCALE_OTHER_ADD_LOCAL_ALPHA
GR_COMBINE_FUNCTION_SCALE_OTHER_MINUS_LOCAL
GR_COMBINE_FUNCTION_SCALE_OTHER_MINUS_LOCAL_ADD_LOCAL
GR_COMBINE_FUNCTION_BLEND
GR_COMBINE_FUNCTION_SCALE_OTHER_MINUS_LOCAL_ADD_LOCAL_ALPHA
GR_COMBINE_FUNCTION_SCALE_MINUS_LOCAL_ADD_LOCAL
GR_COMBINE_FUNCTION_BLEND_LOCAL
GR_COMBINE_FUNCTION_SCALE_MINUS_LOCAL_ADD_LOCAL_ALPHA

Chooses a combining function for the color combine, alpha combine, or texture combine units.

GrCombineLocal_t

local

GR_COMBINE_LOCAL_ITERATED
GR_COMBINE_LOCAL_CONSTANT
GR_COMBINE_LOCAL_NONE
GR_COMBINE_LOCAL_DEPTH

Chooses a local alpha or RGB source for color, alpha, or texture combine units.

GrCombineOther_t

other

GR_COMBINE_OTHER_ITERATED
GR_COMBINE_OTHER_TEXTURE
GR_COMBINE_OTHER_CONSTANT
GR_COMBINE_OTHER_NONE

Chooses an alpha or RGB source for the “other” value in the color, alpha, or texture combine units.

GrCullMode_t

mode

GR_CULL_DISABLE
GR_CULL_NEGATIVE
GR_CULL_POSITIVE

Do back-facing polygons have negative or positive area?

GrDepthBufferMode_t

mode

GR_DEPTHBUFFER_DISABLE
GR_DEPTHBUFFER_ZBUFFER
GR_DEPTHBUFFER_WBUFFER
GR_DEPTHBUFFER_ZBUFFER_COMPARE_TO_BIAS
GR_DEPTHBUFFER_WBUFFER_COMPARE_TO_BIAS

Chooses a depth buffering algorithm.

GrDitherMode_t

mode

GR_DITHER_DISABLE
GR_DITHER_2x2
GR_DITHER_4x4

Wanna dither?

GrFogMode_t

mode

GR_FOG_DISABLE
GR_FOG_WITH_ITERATED_ALPHA
GR_FOG_WITH_TABLE
GR_FOG_MULT2
GR_FOG_ADD2

Enables and characterizes fogging.

GrLfbWriteMode_t

mode

GR_LFBWRITEMODE_565
GR_LFBWRITEMODE_555
GR_LFBWRITEMODE_1555
GR_LFBWRITEMODE_888
GR_LFBWRITEMODE_8888
GR_LFBWRITEMODE_565_DEPTH
GR_LFBWRITEMODE_555_DEPTH
GR_LFBWRITEMODE_1555_DEPTH
GR_LFBWRITEMODE_DEPTH_DEPTH
GR_LFBWRITEMODE_ALPHA_ALPHA




GrLOD_t

smallLOD
largeLOD
thisLOD

GR_LOD_256
GR_LOD_128
GR_LOD_64
GR_LOD_32
GR_LOD_16
GR_LOD_8
GR_LOD_4
GR_LOD_2
GR_LOD_1

Specifies the largest dimension of the texture. The aspect ratio determines the smaller dimension.

GrMipMapMode_t

mipmapMode
mode

GR_MIPMAP_DISABLE
GR_MIPMAP_NEAREST
GR_MIPMAP_NEAREST_DITHER

Specifies the kind of mipmapping to perform.

GrNCCTable_t

table

GR_NCCTABLE_NCC0
GR_NCCTABLE_NCC1

Chooses an NCC table for use in decompressing texels.




If the Glide type is

and the argument name is something like

then these constants are valid values for the argument

and these are the consequences of choosing that value.

GrOriginLocation_t

locateOrigin
origin

GR_ORIGIN_UPPER_LEFT
GR_ORIGIN_LOWER_LEFT

Sets location of origin.

GrSmoothingMode_t

smoothMode

GR_SMOOTHING_DISABLE
GR_SMOOTHING_ENABLE

Enables/disables 24-smoothing filter.

GrTexBaseRange_t

range

GR_TEXBASE_256
GR_TEXBASE_128
GR_TEXBASE_64
GR_TEXBASE_32_TO_1

Specifies which base register when using more than one. A mipmap can be broken into four fragments. The number in the constant corresponds to the LOD number.

GrTexTable_t

tableType
table

GR_TEX_NCC0
GR_TEX_NCC1
GR_TEX_PALETTE

Each TMU can have two NCC tables and a palette. Load them one at a time with a general purpose routine.

GrTextureClampMode_t

sClampMode
tClampMode

GR_TEXTURECLAMP_WRAP
GR_TEXTURECLAMP_CLAMP

Clamp or wrap at the edges of a texture?

GrTextureFilterMode_t

minFilterMode
magFilterMode

GR_TEXTUREFILTER_POINT_SAMPLED
GR_TEXTUREFILTER_BILINEAR

Chooses minification and magnification filters.

GrTextureFormat_t

format

GR_TEXFMT_RGB_332
GR_TEXFMT_YIQ_422
GR_TEXFMT_ALPHA_8
GR_TEXFMT_INTENSITY_8
GR_TEXFMT_ALPHA_INTENSITY_44
GR_TEXFMT_P_8
GR_TEXFMT_ARGB_8332
GR_TEXFMT_AYIQ_8422
GR_TEXFMT_RGB_565
GR_TEXFMT_ARGB_1555
GR_TEXFMT_ARGB_4444
GR_TEXFMT_ ALPHA_INTENSITY_88
GR_TEXFMT_AP_88

See Table Managing Texture Memory.1 for a description of the texture formats.

The types below are used in three Glide Utilities Library functions that present higher level views of the texture, color, and alpha combine units.



If the Glide type is

and the argument name is something like

then these constants are valid values for the argument

and these are the consequences of choosing that value.

GrAlphaSource_t

mode

GR_ALPHASOURCE_CC_ALPHA
GR_ALPHASOURCE_ITERATED_ALPHA
GR_ALPHASOURCE_TEXTURE_ALPHA
GR_ALPHASOURCE_TEXTURE_ALPHA_TIMES_ITERATED_ALPHA

Chooses an alpha source for alpha and color combing.

GrColorCombineFnc_t

function

GR_COLORCOMBINE_ZERO
GR_COLORCOMBINE_CCRGB
GR_COLORCOMBINE_ITRGB
GR_COLORCOMBINE_ITRGB_DELTA0
GR_COLORCOMBINE_DECAL_TEXTURE
GR_COLORCOMBINE_TEXTURE_TIMES_CCRGB
GR_COLORCOMBINE_TEXTURE_TIMES_ITRGB
GR_COLORCOMBINE_TEXTURE_TIMES_ITRGB_DELTA0
GR_COLORCOMBINE_TEXTURE_TIMES_ITRGB_ADD_ALPHA
GR_COLORCOMBINE_TEXTURE_TIMES_ALPHA
GR_COLORCOMBINE_TEXTURE_TIMES_ALPHA_ADD_ITRGB
GR_COLORCOMBINE_TEXTURE_ADD_ITRGB
GR_COLORCOMBINE_TEXTURE_SUB_ITRGB
GR_COLORCOMBINE_CCRGB_BLEND_ITRGB_ON_TEXALPHA
GR_COLORCOMBINE_DIFF_SPEC_A
GR_COLORCOMBINE_DIFF_SPEC_B
GR_COLORCOMBINE_ONE

Chooses a color combining function.

GrTextureCombineFnc_t

function

GR_TEXTURECOMBINE_ZERO
GR_TEXTURECOMBINE_DECAL
GR_TEXTURECOMBINE_OTHER
GR_TEXTURECOMBINE_ADD
GR_TEXTURECOMBINE_MULTIPLY
GR_TEXTURECOMBINE_SUBTRACT
GR_TEXTURECOMBINE_DETAIL
GR_TEXTURECOMBINE_DETAIL_OTHER
GR_TEXTURECOMBINE_TRILINEAR_ODD
GR_TEXTURECOMBINE_TRILINEAR_EVEN
GR_TEXTURECOMBINE_ONE

Chooses a texture combining function

  1. Download 6.22 Mb.

    Share with your friends:
1   ...   98   99   100   101   102   103   104   105   106




The database is protected by copyright ©ininet.org 2024
send message

    Main page