# Members

#### # inner _lastTexture

TMU memory end address per TMU

#### # inner _nextTexture

TMU memory start address/next address per TMU

#### # inner FX_HEIGHT

##### Properties:

Name | Type | Description
--- | --- | ---
`voodoo` | `number` | graphics height

#### # inner FX_WIDTH

##### Properties:

Name | Type | Description
--- | --- | ---
`voodoo` | `number` | graphics width

#### # inner GR_ASPECT

typedef FxI32 GrAspectRatio_t;

##### Properties:

Name | Type | Description
--- | --- | ---
`LOG2_8x1` | `number` |
`LOG2_4x1` | `number` |
`LOG2_2x1` | `number` |
`LOG2_1x1` | `number` |
`LOG2_1x2` | `number` |
`LOG2_1x4` | `number` |
`LOG2_1x8` | `number` |

#### # inner GR_BLEND

typedef FxI32 GrAlphaBlendFnc_t;

##### Properties:

Name | Type | Description
--- | --- | ---
`ZERO` | `number` |
`SRC_ALPHA` | `number` |
`SRC_COLOR` | `number` |
`DST_COLOR` | `number` |
`DST_ALPHA` | `number` |
`ONE` | `number` |
`ONE_MINUS_SRC_ALPHA` | `number` |
`ONE_MINUS_SRC_COLOR` | `number` |
`ONE_MINUS_DST_COLOR` | `number` |
`ONE_MINUS_DST_ALPHA` | `number` |
`RESERVED_8` | `number` |
`RESERVED_9` | `number` |
`RESERVED_A` | `number` |
`RESERVED_B` | `number` |
`RESERVED_C` | `number` |
`RESERVED_D` | `number` |
`RESERVED_E` | `number` |
`ALPHA_SATURATE` | `number` |
`PREFOG_COLOR` | `number` |

#### # inner GR_BUFFER

typedef FxI32 GrBuffer_t;

##### Properties:

Name | Type | Description
--- | --- | ---
`FRONTBUFFER` | `number` |
`BACKBUFFER` | `number` |
`AUXBUFFER` | `number` |
`DEPTHBUFFER` | `number` |
`ALPHABUFFER` | `number` |
`TRIPLEBUFFER` | `number` |

#### # inner GR_CMP

typedef FxI32 GrCmpFnc_t;

##### Properties:

Name | Type | Description
--- | --- | ---
`NEVER` | `number` |
`LESS` | `number` |
`EQUAL` | `number` |
`LEQUAL` | `number` |
`GREATER` | `number` |
`NOTEQUAL` | `number` |
`GEQUAL` | `number` |
`ALWAYS` | `number` |

#### # inner GR_COLORCOMBINE

typedef FxI32 GrColorCombineFnc_t;

##### Properties:

Name | Type | Description
--- | --- | ---
`ZERO` | `number` |
`CCRGB` | `number` |
`ITRGB` | `number` |
`ITRGB_DELTA0` | `number` |
`DECAL_TEXTURE` | `number` |
`TEXTURE_TIMES_CCRGB` | `number` |
`TEXTURE_TIMES_ITRGB` | `number` |
`TEXTURE_TIMES_ITRGB_DELTA0` | `number` |
`TEXTURE_TIMES_ITRGB_ADD_ALPHA` | `number` |
`TEXTURE_TIMES_ALPHA` | `number` |
`TEXTURE_TIMES_ALPHA_ADD_ITRGB` | `number` |
`TEXTURE_ADD_ITRGB` | `number` |
`TEXTURE_SUB_ITRGB` | `number` |
`CCRGB_BLEND_ITRGB_ON_TEXALPHA` | `number` |
`DIFF_SPEC_A` | `number` |
`DIFF_SPEC_B` | `number` |
`ONE` | `number` |

#### # inner GR_COMBINE_FACTOR

typedef FxI32 GrCombineFactor_t;

##### Properties:

Name | Type | Description
--- | --- | ---
`ZERO` | `number` |
`NONE` | `number` |
`LOCAL` | `number` |
`OTHER_ALPHA` | `number` |
`LOCAL_ALPHA` | `number` |
`TEXTURE_ALPHA` | `number` |
`TEXTURE_RGB` | `number` |
`DETAIL_FACTOR` | `number` |
`LOD_FRACTION` | `number` |
`ONE` | `number` |
`ONE_MINUS_LOCAL` | `number` |
`ONE_MINUS_OTHER_ALPHA` | `number` |
`ONE_MINUS_LOCAL_ALPHA` | `number` |
`ONE_MINUS_TEXTURE_ALPHA` | `number` |
`ONE_MINUS_DETAIL_FACTOR` | `number` |
`ONE_MINUS_LOD_FRACTION` | `number` |

#### # inner GR_COMBINE_FUNCTION

typedef FxI32 GrCombineFunction_t;

##### Properties:

Name | Type | Description
--- | --- | ---
`ZERO` | `number` |
`NONE` | `number` |
`LOCAL` | `number` |
`LOCAL_ALPHA` | `number` |
`SCALE_OTHER` | `number` |
`BLEND_OTHER` | `number` |
`SCALE_OTHER_ADD_LOCAL` | `number` |
`SCALE_OTHER_ADD_LOCAL_ALPHA` | `number` |
`SCALE_OTHER_MINUS_LOCAL` | `number` |
`SCALE_OTHER_MINUS_LOCAL_ADD_LOCAL` | `number` |
`BLEND` | `number` |
`SCALE_OTHER_MINUS_LOCAL_ADD_LOCAL_ALPHA` | `number` |
`SCALE_MINUS_LOCAL_ADD_LOCAL` | `number` |
`BLEND_LOCAL` | `number` |
`SCALE_MINUS_LOCAL_ADD_LOCAL_ALPHA` | `number` |

#### # inner GR_COMBINE_LOCAL

typedef FxI32 GrCombineLocal_t;

##### Properties:

Name | Type | Description
--- | --- | ---
`ITERATED` | `number` |
`CONSTANT` | `number` |
`NONE` | `number` |
`DEPTH` | `number` |

#### # inner GR_COMBINE_OTHER

typedef FxI32 GrCombineOther_t;

##### Properties:

Name | Type | Description
--- | --- | ---
`ITERATED` | `number` |
`TEXTURE` | `number` |
`CONSTANT` | `number` |
`NONE` | `number` |

#### # inner GR_CULL

typedef FxI32 GrCullMode_t;

##### Properties:

Name | Type | Description
--- | --- | ---
`DISABLE` | `number` |
`NEGATIVE` | `number` |
`POSITIVE` | `number` |

#### # inner GR_DEPTHBUFFER

typedef FxI32 GrDepthBufferMode_t;

##### Properties:

Name | Type | Description
--- | --- | ---
`DISABLE` | `number` |
`ZBUFFER` | `number` |
`WBUFFER` | `number` |
`ZBUFFER_COMPARE_TO_BIAS` | `number` |
`WBUFFER_COMPARE_TO_BIAS` | `number` |

#### # inner GR_DITHER

typedef FxI32 GrDitherMode_t;

##### Properties:

Name | Type | Description
--- | --- | ---
`DISABLE` | `number` |
`D2x2` | `number` |
`D4x4` | `number` |

#### # inner GR_ENABLE

typedef FxU32 GrEnableMode_t;

##### Properties:

Name | Type | Description
--- | --- | ---
`AA_ORDERED` | `number` |
`ALLOW_MIPMAP_DITHER` | `number` |
`PASSTHRU` | `number` |
`SHAMELESS_PLUG` | `number` |
`VIDEO_SMOOTHING` | `number` |

#### # inner GR_FOG

typedef FxI32 GrFogMode_t;

##### Properties:

Name | Type | Description
--- | --- | ---
`DISABLE` | `number` |
`WITH_TABLE_ON_FOGCOORD_EXT` | `number` |
`WITH_TABLE_ON_Q` | `number` |
`WITH_TABLE_ON_W` | `number` |
`WITH_ITERATED_Z` | `number` |
`MULT2` | `number` |
`ADD2` | `number` |

#### # inner GR_LOD

typedef FxI32 GrLOD_t;

##### Properties:

Name | Type | Description
--- | --- | ---
`LOG2_256` | `number` |
`LOG2_128` | `number` |
`LOG2_64` | `number` |
`LOG2_32` | `number` |
`LOG2_16` | `number` |
`LOG2_8` | `number` |
`LOG2_4` | `number` |
`LOG2_2` | `number` |
`LOG2_1` | `number` |

#### # inner GR_MIPMAP

typedef FxI32 GrMipMapMode_t;

##### Properties:

Name | Type | Description
--- | --- | ---
`DISABLE` | `number` |
`NEAREST` | `number` |
`NEAREST_DITHER` | `number` |

#### # inner GR_MIPMAPLEVELMASK

GR_MIPMAPLEVELMASK

##### Properties:

Name | Type | Description
--- | --- | ---
`EVEN` | `number` |
`ODD` | `number` |
`BOTH` | `number` |

#### # inner GR_ORIGIN

typedef FxI32 GrOriginLocation_t;

##### Properties:

Name | Type | Description
--- | --- | ---
`UPPER_LEFT` | `number` |
`LOWER_LEFT` | `number` |
`ANY` | `number` |

#### # inner GR_PARAM

Parameters for vertex definition.

##### Properties:

Name | Type | Description
--- | --- | ---
`XY` | `number` |
`ZW` | `number` |
`Q` | `number` |
`EXT` | `number` |
`A` | `number` |
`RGB` | `number` |
`PARG` | `number` |
`ST0` | `number` |
`ST1` | `number` |
`ST2` | `number` |
`Q0` | `number` |
`Q1` | `number` |
`Q2` | `number` |

#### # inner GR_TEXFMT

typedef FxI32 GrTextureFormat_t;

##### Properties:

Name | Type | Description
--- | --- | ---
`BIT8` | `number` |
`RGB_332` | `number` |
`YIQ_422` | `number` |
`ALPHA_8` | `number` |
`INTENSITY_8` | `number` |
`ALPHA_INTENSITY_44` | `number` |
`P_8` | `number` |
`RSVD0` | `number` |
`P_8_6666` | `number` |
`P_8_6666_EXT` | `number` |
`RSVD1` | `number` |
`BIT16` | `number` |
`ARGB_8332` | `number` |
`AYIQ_8422` | `number` |
`RGB_565` | `number` |
`ARGB_1555` | `number` |
`ARGB_4444` | `number` |
`ALPHA_INTENSITY_88` | `number` |
`AP_88` | `number` |
`RSVD2` | `number` |
`RSVD4` | `number` |

#### # inner GR_TEXTABLE

typedef FxU32 GrTexTable_t;

##### Properties:

Name | Type | Description
--- | --- | ---
`NCC0` | `number` |
`NCC1` | `number` |
`PALETTE` | `number` |
`PALETTE_6666_EXT` | `number` |

#### # inner GR_TEXTURECLAMP

typedef FxI32 GrTextureClampMode_t;

##### Properties:

Name | Type | Description
--- | --- | ---
`WRAP` | `number` |
`CLAMP` | `number` |
`MIRROR_EXT` | `number` |

#### # inner GR_TEXTUREFILTER

typedef FxI32 GrTextureFilterMode_t;

##### Properties:

Name | Type | Description
--- | --- | ---
`POINT_SAMPLED` | `number` |
`BILINEAR` | `number` |

#### # inner GR_TMU

typedef FxI32 GrChipID_t;

##### Properties:

Name | Type | Description
--- | --- | ---
`TMU0` | `number` |
`TMU1` | `number` |
`TMU2` | `number` |

#### # inner GR_VERTEX

grDrawVertexArray/grDrawVertexArrayContiguous primitive type

##### Properties:

Name | Type | Description
--- | --- | ---
`POINTS` | `number` |
`LINE_STRIP` | `number` |
`LINES` | `number` |
`POLYGON` | `number` |
`TRIANGLE_STRIP` | `number` |
`TRIANGLE_FAN` | `number` |
`TRIANGLES` | `number` |
`TRIANGLE_STRIP_CONTINUE` | `number` |
`TRIANGLE_FAN_CONTINUE` | `number` |

#### # inner TEXMEM_2MB_EDGE

hard edge when assigning texture memory at 2MiB

# Methods

#### # inner fxAADrawTriangle(a, b, c, b1, b2, b3)

draw an anti-aliased triangle

##### Parameters:

Name | Type | Description
--- | --- | ---
`a` | `Array.<number>` | a vertex
`b` | `Array.<number>` | a vertex
`c` | `Array.<number>` | a vertex
`b1` | `boolean` | anti alias AB edge
`b2` | `boolean` | anti alias BC edge
`b3` | `boolean` | anti alias CA edge

#### # inner fxAlphaBlendFunction(rgb_sf, rgb_df, alpha_sf, alpha_df)

specify the alpha blending function

##### Parameters:

Name | Type | Description
--- | --- | ---
`rgb_sf` | `GR_BLEND` | rgb source blending factor
`rgb_df` | `GR_BLEND` | rgb destination blending factor
`alpha_sf` | `GR_BLEND` | alpha source blending factor
`alpha_df` | `GR_BLEND` | alpha destination blending factor

#### # inner fxAlphaCombine(func, factor, local, other, invert)

configure the alpha combine unit.

##### Parameters:

Name | Type | Description
--- | --- | ---
`func` | `GR_COMBINE_FUNCTION` | function
`factor` | `GR_COMBINE_FACTOR` | scaling factor
`local` | `GR_COMBINE_LOCAL` | local alpha
`other` | `GR_COMBINE_OTHER` | other alpha
`invert` | `boolean` | invert generated alpha.

#### # inner fxAlphaControlsITRGBLighting(enable)

enables/disables alpha controlled lighting

##### Parameters:

Name | Type | Description
--- | --- | ---
`enable` | `boolean` | enable/disable

#### # inner fxAlphaTestFunction(func)

specify the alpha test function

##### Parameters:

Name | Type | Description
--- | --- | ---
`func` | `GR_CMP` | the function

#### # inner fxAlphaTestReferenceValue(value)

specify the alpha test reference value

##### Parameters:

Name | Type | Description
--- | --- | ---
`value` | `number` | The new alpha test reference value.

#### # inner FXBIT(i) → {number}

set a bit.

##### Parameters:

Name | Type | Description
--- | --- | ---
`i` | `number` | bit to set.

Returns:

number with given bit set.

Type: `number`

#### # inner fxBufferClear(color, alpha, depth)

clear the buffers to the specified values

##### Parameters:

Name | Type | Description
--- | --- | ---
`color` | `number` | The color value used for clearing the draw buffer.
`alpha` | `number` | The alpha value used for clearing the alpha buffer
`depth` | `number` | An unsigned value used for clearing the depth buffer

#### # inner fxBufferSwap(interval)

exchange front and back buffers

##### Parameters:

Name | Type | Description
--- | --- | ---
`interval` | `number` | The number of vertical retraces to wait before swapping the front and back buffers.

#### # inner fxChromakeyMode(mode)

enable/disable hardware chroma-keying

##### Parameters:

Name | Type | Description
--- | --- | ---
`mode` | `boolean` | enable/disable

#### # inner fxChromakeyValue(val)

set the global chroma-key reference value

##### Parameters:

Name | Type | Description
--- | --- | ---
`val` | `number` | The new chroma-key reference value.

#### # inner fxClipWindow(minx, miny, maxx, maxy)

set the size and location of the hardware clipping window

##### Parameters:

Name | Type | Description
--- | --- | ---
`minx` | `number` | The lower x screen coordinate of the clipping window.
`miny` | `number` | The lower y screen coordinate of the clipping window.
`maxx` | `number` | The upper x screen coordinate of the clipping window.
`maxy` | `number` | The upper y screen coordinate of the clipping window.

#### # inner fxColorCombine(func, factor, local, other, invert)

configure the color combine unit.

##### Parameters:

Name | Type | Description
--- | --- | ---
`func` | `GR_COMBINE_FUNCTION` | function
`factor` | `GR_COMBINE_FACTOR` | scaling factor
`local` | `GR_COMBINE_LOCAL` | local alpha
`other` | `GR_COMBINE_OTHER` | other alpha
`invert` | `boolean` | invert generated alpha.

#### # inner fxColorMask(rgb, alpha)

enable/disable writing into the color and alpha buffers

##### Parameters:

Name | Type | Description
--- | --- | ---
`rgb` | `number` | color mask
`alpha` | `number` | alpha mask

#### # inner fxConstantColorValue(color)

set the global constant color

##### Parameters:

Name | Type | Description
--- | --- | ---
`color` | `number` | The new constant color.

#### # inner fxCullMode(mode)

set the cull mode.

##### Parameters:

Name | Type | Description
--- | --- | ---
`mode` | `GR_CULL` | the noew mode.

#### # inner fxDepthBiasLevel(level)

set the depth bias level

##### Parameters:

Name | Type | Description
--- | --- | ---
`level` | `number` | th new level.

#### # inner fxDepthBufferFunction(func)

specify the depth buffer comparison function

##### Parameters:

Name | Type | Description
--- | --- | ---
`func` | `GR_CMP` | the new function

#### # inner fxDepthBufferMode(mode)

set the depth buffering mode

##### Parameters:

Name | Type | Description
--- | --- | ---
`mode` | `GR_DEPTHBUFFER` | the mode

#### # inner fxDepthMask(enable)

enable/disable writing into the depth buffer

##### Parameters:

Name | Type | Description
--- | --- | ---
`enable` | `boolean` | enable/disable

#### # inner fxDepthRange(near, far)

specify viewport depth range

##### Parameters:

Name | Type | Description
--- | --- | ---
`near` | `number` | min range
`far` | `number` | max range

#### # inner fxDisable(val)

enable Glide operating modes

##### Parameters:

Name | Type | Description
--- | --- | ---
`val` | `GR_ENABLE` | one of GR_ENABLE.

#### # inner fxDisableAllEffects()

disable all special effects in the graphics subsystem

#### # inner fxDitherMode(mode)

set dither mode.

##### Parameters:

Name | Type | Description
--- | --- | ---
`mode` | `GR_DITHER` | the new dither mode.

#### # inner fxDrawLine(v1, v2)

draw a one-pixel-wide arbitrarily oriented line

##### Parameters:

Name | Type | Description
--- | --- | ---
`v1` | `Array.<number>` | a vertex.
`v2` | `Array.<number>` | a vertex.

#### # inner fxDrawPoint(v1)

draw a point

##### Parameters:

Name | Type | Description
--- | --- | ---
`v1` | `Array.<number>` | a vertex.

#### # inner fxDrawTriangle(v1, v2, v3)

draw a triangle

##### Parameters:

Name | Type | Description
--- | --- | ---
`v1` | `Array.<number>` | a vertex.
`v2` | `Array.<number>` | a vertex.
`v3` | `Array.<number>` | a vertex.

#### # inner fxDrawVertexArray(mode, vertices)

draw a list of by-vertex vertices

##### Parameters:

Name | Type | Description
--- | --- | ---
`mode` | `GR_VERTEX` | vertex type
`vertices` | `Array.<Array.<number>>` | array of vertices.

#### # inner FxEmptyVertex() → {Array.<number>}

create empty vertex.

Returns:

an empty vertex.

Type: `Array.<number>`

#### # inner fxEnable(val)

enable Glide operating modes

##### Parameters:

Name | Type | Description
--- | --- | ---
`val` | `GR_ENABLE` | one of GR_ENABLE.

#### # inner fxFinish()

force completion of all outstanding graphics commands.

#### # inner fxFlush()

flush the graphics FIFO

#### # inner fxFogColorValue(color)

set the global fog color

##### Parameters:

Name | Type | Description
--- | --- | ---
`color` | `number` | the new fog color

#### # inner fxFogGenerateExp(density) → {Array.<number>}

generate an exponential fog table

##### Parameters:

Name | Type | Description
--- | --- | ---
`density` | `number` | The fog density, typically between 0.0 and 1.0.

Returns:

a fog table.

Type: `Array.<number>`

#### # inner fxFogGenerateExp2(density) → {Array.<number>}

generate an exponential squared fog table

##### Parameters:

Name | Type | Description
--- | --- | ---
`density` | `*` | The fog density, typically between 0.0 and 1.0.

Returns:

a fog table.

Type: `Array.<number>`

#### # inner fxFogGenerateLinear(near, far) → {Array.<number>}

generate a linear fog table

##### Parameters:

Name | Type | Description
--- | --- | ---
`near` | `number` | The eye-space w coordinate where minimum fog exists.
`far` | `number` | The eye-space w coordinate where maximum fog exists.

Returns:

a fog table.

Type: `Array.<number>`

#### # inner fxFogMode(mode)

enable/disable per-pixel fog blending operations

##### Parameters:

Name | Type | Description
--- | --- | ---
`mode` | `GR_FOG` | the new fog mode.

#### # inner fxFogTable(table)

download a fog table

##### Parameters:

Name | Type | Description
--- | --- | ---
`table` | `Array.<number>` | a new table with at least fxGetFogTableEntries() entries

#### # inner fxFogTableIndexToW(i)

convert a fog table index to a floating point eye-space w value

##### Parameters:

Name | Type | Description
--- | --- | ---
`i` | `number` | The fog table index, between 0 and GR_FOG_TABLE_SIZE.

#### # inner fxGammaCorrectionRGB(r, g, b)

set up gamma correction tables

##### Parameters:

Name | Type | Description
--- | --- | ---
`r` | `number` |
`g` | `*` |
`b` | `*` |

#### # inner fxGetBitsDepth() → {number}

Returns:

The number of bits of depth (z or w) in the frame buffer.

Type: `number`

#### # inner fxGetFogTableEntries() → {number}

Returns:

The number of entries in the hardware fog table.

Type: `number`

#### # inner fxGetGammaTableEntries() → {number}

Returns:

The number of entries in the hardware gamma table. Returns FXFALSE if it is not possible to manipulate gamma (e.g. on a Macronix card, or in windowed mode).

Type: `number`

#### # inner fxGetMaxTextureAspectRatio() → {number}

Returns:

The logarithm base 2 of the maximum aspect ratio supported for power-of-two, mipmap-able textures (e.g. Voodoo Graphics returns 3).

Type: `number`

#### # inner fxGetMaxTextureSize() → {number}

Returns:

The width of the largest texture supported on this configuration (e.g. Voodoo Graphics returns 256).

Type: `number`

#### # inner fxGetMemoryFb() → {number}

Returns:

The total number of bytes per Pixelfx chip if a non-UMA configuration is used, else 0. In non-UMA configurations, the total FB memory is GR_MEMORY_FB * GR_NUM_FB.

Type: `number`

#### # inner fxGetMemoryTmu() → {number}

Returns:

The total number of bytes per Texelfx chip if a non-UMA configuration is used, else FXFALSE. In non-UMA configurations, the total usable texture memory is GR_MEMORY_TMU * GR_NUM_TMU.

Type: `number`

#### # inner fxGetMemoryUma() → {number}

Returns:

The total number of bytes if a UMA configuration, else 0.

Type: `number`

#### # inner fxGetNumBoards() → {number}

Returns:

The number of installed boards supported by Glide.

Type: `number`

#### # inner fxGetNumFb() → {number}

Returns:

The number of Pixelfx chips present. This number will always be 1 except for SLI configurations.

Type: `number`

#### # inner fxGetNumPendingBufferSwaps() → {number}

Returns:

The number of buffer swaps pending.

Type: `number`

#### # inner fxGetNumTmu() → {number}

Returns:

The number of Texelfx chips per Pixelfx chip. For integrated chips, the number of TMUs will be returned.

Type: `number`

#### # inner fxGetRevisionFb() → {number}

Returns:

The revision of the Pixelfx chip(s).

Type: `number`

#### # inner fxGetRevisionTmu() → {number}

Returns:

The revision of the Texelfx chip(s).

Type: `number`

#### # inner fxGetVertexSize() → {number}

Returns:

the size of the currently active vertex layout in 'number of entries'.

Type: `number`

#### # inner fxGetWDepthMinMax() → {Array.<number>}

Returns:

The minimum and maximum allowable w buffer values.

Type: `Array.<number>`

#### # inner fxGetZDepthMinMax() → {Array.<number>}

Returns:

The minimum and maximum allowable z buffer values.

Type: `Array.<number>`

#### # inner fxInit()

init 3dfx glide. the following parameters are used: GR_RESOLUTION_640x480, GR_REFRESH_60Hz, GR_COLORFORMAT_ARGB, GR_ORIGIN_UPPER_LEFT, GR_WINDOW_COORDS

#### # inner fxIsBusy() → {number}

Returns:

Returns FXFALSE if idle, FXTRUE if busy.

Type: `number`

#### # inner fxLfbConstantAlpha(val)

Alpha value to use for direct framebuffer access.

##### Parameters:

Name | Type | Description
--- | --- | ---
`val` | `number` | the constant alpha value.

#### # inner fxLfbConstantDepth(val)

Depth value to use for direct framebuffer access.

##### Parameters:

Name | Type | Description
--- | --- | ---
`val` | `number` | the constant depth value.

#### # inner fxOrigin(origin)

establishes a y origin

##### Parameters:

Name | Type | Description
--- | --- | ---
`origin` | `GR_ORIGIN` | set y origin.

#### # inner fxRenderBuffer(buffer)

selects the current color buffer for drawing and clearing

##### Parameters:

Name | Type | Description
--- | --- | ---
`buffer` | `GR_BUFFER` | Selects the current color buffer. Valid values are GR_BUFFER_FRONTBUFFER and GR_BUFFER_BACKBUFFER.

#### # inner fxResetVertexLayout()

Reset grVertexLayout parameter offset to zero, and all parameter modes to GR_PARAM_DISABLE.

#### # inner FxRGB2Vertex(v, idx, rgb)

split up RGB value and store in vertex.

##### Parameters:

Name | Type | Description
--- | --- | ---
`v` | `Array.<number>` | the vertex to store in.
`idx` | `number` | start index of RGB values.
`rgb` | `number` | the RGB value.

#### # inner fxShutdown()

shut down the Glide library

#### # inner fxTexCalcMemRequired(smallLod, largeLod, aspect, format) → {number}

return the texture memory consumed by a texture.

##### Parameters:

Name | Type | Description
--- | --- | ---
`smallLod` | `GR_LOD` | smallest level of detail
`largeLod` | `GR_LOD` | larges level of detail
`aspect` | `GR_ASPECT` | texture aspect ratio
`format` | `GR_TEXFMT` | texture format

Returns:

number of bytes required

Type: `number`

#### # inner fxTexClampMode(tmu, sMode, tMode)

set the texture map clamping/wrapping mode

##### Parameters:

Name | Type | Description
--- | --- | ---
`tmu` | `GR_TMU` | the TMU.
`sMode` | `GR_TEXTURECLAMP` | The new mode for the s direction
`tMode` | `GR_TEXTURECLAMP` | The new mode for the t direction

#### # inner fxTexCombine(tmu, rgb_func, rgb_factor, alpha_func, alpha_factor, rgb_invert, alpha_invert)

configure a texture combine unit

##### Parameters:

Name | Type | Description
--- | --- | ---
`tmu` | `GR_TMU` | the TMU.
`rgb_func` | `GR_COMBINE_FUNCTION` | Specifies the function used in texture color generation
`rgb_factor` | `GR_COMBINE_FACTOR` | Specifies the scaling factor f used in texture color generation
`alpha_func` | `GR_COMBINE_FUNCTION` | Specifies the function used in texture alpha generation
`alpha_factor` | `GR_COMBINE_FACTOR` | Specifies the scaling factor f used in texture alpha generation
`rgb_invert` | `boolean` | Specifies whether the generated texture color should be bitwise inverted as a final step.
`alpha_invert` | `boolean` | Specifies whether the generated texture alpha should be bitwise inverted as a final step.

#### # inner fxTexDetailControl(tmu, lodBias, detailScale, detailMax)

set the detail texturing controls

##### Parameters:

Name | Type | Description
--- | --- | ---
`tmu` | `GR_TMU` | the TMU.
`lodBias` | `number` | Controls where the blending between the two textures begins. This value is an LOD bias value in the range [–32.. +31].
`detailScale` | `number` | Controls the steepness of the blend. Values are in the range [0..7] are valid. The scale is computed as 2^detailScale.
`detailMax` | `number` | Controls the maximum blending that occurs. Values in the range [0.0..1.0] are valid.

#### # inner fxTexFilterMode(tmu, minFilter, magFilter)

specify the texture minification and magnification filters

##### Parameters:

Name | Type | Description
--- | --- | ---
`tmu` | `GR_TMU` | the TMU.
`minFilter` | `GR_TEXTUREFILTER` | The minification filter
`magFilter` | `GR_TEXTUREFILTER` | The magnification filter

#### # inner fxTexLodBiasValue(tmu, bias)

set the LOD bias value

##### Parameters:

Name | Type | Description
--- | --- | ---
`tmu` | `GR_TMU` | the TMU.
`bias` | `number` | The new LOD bias value, a signed floating point value in the range [-8..7.75].

#### # inner fxTexMaxAddress(tmu)

return the highest start address for texture downloads

##### Parameters:

Name | Type | Description
--- | --- | ---
`tmu` | `GR_TMU` | the TMU.

#### # inner FxTexMemGetStartAddress(tmu, info) → {number}

try to find the next available memory for texture.

##### Parameters:

Name | Type | Description
--- | --- | ---
`tmu` | `GR_TMU` | the TMU where this texture shall be used.
`info` | `TexInfo` | the texture.

Returns:

a start address or null.

Type: `number`

#### # inner FxTexMemInit(tmu)

(re)initialize simple texture memory management for given TMU.

##### Parameters:

Name | Type | Description
--- | --- | ---
`tmu` | `GR_TMU` | the tmu to initialize.

#### # inner fxTexMinAddress(tmu)

return the lowest start address for texture downloads

##### Parameters:

Name | Type | Description
--- | --- | ---
`tmu` | `GR_TMU` | the TMU.

#### # inner fxTexMipMapMode(tmu, mode, lodBlend)

set the mipmapping mode

##### Parameters:

Name | Type | Description
--- | --- | ---
`tmu` | `GR_TMU` | the TMU.
`mode` | `GR_MIPMAP` | The new mipmapping mode
`lodBlend` | `boolean` | enables/disables LOD blending

#### # inner fxTexNCCTable(table)

select an NCC table

##### Parameters:

Name | Type | Description
--- | --- | ---
`table` | `GR_TEXTABLE` | NCC table to use for decompressing compressed textures. Valid values are GR_TEXTABLE_NCC0 and GR_TEXTABLE_NCC1.

#### # inner fxVertexLayout(layout)

specify the format of by-vertex arrays

##### Parameters:

Name | Type | Description
--- | --- | ---
`layout` | `Array.<GR_PARAM>` | list of layout parameters.

#### # inner fxViewport(x, y, width, height)

define a viewport

##### Parameters:

Name | Type | Description
--- | --- | ---
`x` | `number` | The origin of the viewport, relative to the screen origin
`y` | `number` | The origin of the viewport, relative to the screen origin
`width` | `number` | The width and height of the viewport.
`height` | `number` | The width and height of the viewport.

Color definition.

# Members

#### # inner _lastTexture

TMU memory end address per TMU

#### # inner _nextTexture

TMU memory start address/next address per TMU

#### # inner FX_HEIGHT

##### Properties:

Name | Type | Description
--- | --- | ---
`voodoo` | `number` | graphics height

#### # inner FX_WIDTH

##### Properties:

Name | Type | Description
--- | --- | ---
`voodoo` | `number` | graphics width

#### # inner GR_ASPECT

typedef FxI32 GrAspectRatio_t;

##### Properties:

Name | Type | Description
--- | --- | ---
`LOG2_8x1` | `number` |
`LOG2_4x1` | `number` |
`LOG2_2x1` | `number` |
`LOG2_1x1` | `number` |
`LOG2_1x2` | `number` |
`LOG2_1x4` | `number` |
`LOG2_1x8` | `number` |

#### # inner GR_BLEND

typedef FxI32 GrAlphaBlendFnc_t;

##### Properties:

Name | Type | Description
--- | --- | ---
`ZERO` | `number` |
`SRC_ALPHA` | `number` |
`SRC_COLOR` | `number` |
`DST_COLOR` | `number` |
`DST_ALPHA` | `number` |
`ONE` | `number` |
`ONE_MINUS_SRC_ALPHA` | `number` |
`ONE_MINUS_SRC_COLOR` | `number` |
`ONE_MINUS_DST_COLOR` | `number` |
`ONE_MINUS_DST_ALPHA` | `number` |
`RESERVED_8` | `number` |
`RESERVED_9` | `number` |
`RESERVED_A` | `number` |
`RESERVED_B` | `number` |
`RESERVED_C` | `number` |
`RESERVED_D` | `number` |
`RESERVED_E` | `number` |
`ALPHA_SATURATE` | `number` |
`PREFOG_COLOR` | `number` |

#### # inner GR_BUFFER

typedef FxI32 GrBuffer_t;

##### Properties:

Name | Type | Description
--- | --- | ---
`FRONTBUFFER` | `number` |
`BACKBUFFER` | `number` |
`AUXBUFFER` | `number` |
`DEPTHBUFFER` | `number` |
`ALPHABUFFER` | `number` |
`TRIPLEBUFFER` | `number` |

#### # inner GR_CMP

typedef FxI32 GrCmpFnc_t;

##### Properties:

Name | Type | Description
--- | --- | ---
`NEVER` | `number` |
`LESS` | `number` |
`EQUAL` | `number` |
`LEQUAL` | `number` |
`GREATER` | `number` |
`NOTEQUAL` | `number` |
`GEQUAL` | `number` |
`ALWAYS` | `number` |

#### # inner GR_COLORCOMBINE

typedef FxI32 GrColorCombineFnc_t;

##### Properties:

Name | Type | Description
--- | --- | ---
`ZERO` | `number` |
`CCRGB` | `number` |
`ITRGB` | `number` |
`ITRGB_DELTA0` | `number` |
`DECAL_TEXTURE` | `number` |
`TEXTURE_TIMES_CCRGB` | `number` |
`TEXTURE_TIMES_ITRGB` | `number` |
`TEXTURE_TIMES_ITRGB_DELTA0` | `number` |
`TEXTURE_TIMES_ITRGB_ADD_ALPHA` | `number` |
`TEXTURE_TIMES_ALPHA` | `number` |
`TEXTURE_TIMES_ALPHA_ADD_ITRGB` | `number` |
`TEXTURE_ADD_ITRGB` | `number` |
`TEXTURE_SUB_ITRGB` | `number` |
`CCRGB_BLEND_ITRGB_ON_TEXALPHA` | `number` |
`DIFF_SPEC_A` | `number` |
`DIFF_SPEC_B` | `number` |
`ONE` | `number` |

#### # inner GR_COMBINE_FACTOR

typedef FxI32 GrCombineFactor_t;

##### Properties:

Name | Type | Description
--- | --- | ---
`ZERO` | `number` |
`NONE` | `number` |
`LOCAL` | `number` |
`OTHER_ALPHA` | `number` |
`LOCAL_ALPHA` | `number` |
`TEXTURE_ALPHA` | `number` |
`TEXTURE_RGB` | `number` |
`DETAIL_FACTOR` | `number` |
`LOD_FRACTION` | `number` |
`ONE` | `number` |
`ONE_MINUS_LOCAL` | `number` |
`ONE_MINUS_OTHER_ALPHA` | `number` |
`ONE_MINUS_LOCAL_ALPHA` | `number` |
`ONE_MINUS_TEXTURE_ALPHA` | `number` |
`ONE_MINUS_DETAIL_FACTOR` | `number` |
`ONE_MINUS_LOD_FRACTION` | `number` |

#### # inner GR_COMBINE_FUNCTION

typedef FxI32 GrCombineFunction_t;

##### Properties:

Name | Type | Description
--- | --- | ---
`ZERO` | `number` |
`NONE` | `number` |
`LOCAL` | `number` |
`LOCAL_ALPHA` | `number` |
`SCALE_OTHER` | `number` |
`BLEND_OTHER` | `number` |
`SCALE_OTHER_ADD_LOCAL` | `number` |
`SCALE_OTHER_ADD_LOCAL_ALPHA` | `number` |
`SCALE_OTHER_MINUS_LOCAL` | `number` |
`SCALE_OTHER_MINUS_LOCAL_ADD_LOCAL` | `number` |
`BLEND` | `number` |
`SCALE_OTHER_MINUS_LOCAL_ADD_LOCAL_ALPHA` | `number` |
`SCALE_MINUS_LOCAL_ADD_LOCAL` | `number` |
`BLEND_LOCAL` | `number` |
`SCALE_MINUS_LOCAL_ADD_LOCAL_ALPHA` | `number` |

#### # inner GR_COMBINE_LOCAL

typedef FxI32 GrCombineLocal_t;

##### Properties:

Name | Type | Description
--- | --- | ---
`ITERATED` | `number` |
`CONSTANT` | `number` |
`NONE` | `number` |
`DEPTH` | `number` |

#### # inner GR_COMBINE_OTHER

typedef FxI32 GrCombineOther_t;

##### Properties:

Name | Type | Description
--- | --- | ---
`ITERATED` | `number` |
`TEXTURE` | `number` |
`CONSTANT` | `number` |
`NONE` | `number` |

#### # inner GR_CULL

typedef FxI32 GrCullMode_t;

##### Properties:

Name | Type | Description
--- | --- | ---
`DISABLE` | `number` |
`NEGATIVE` | `number` |
`POSITIVE` | `number` |

#### # inner GR_DEPTHBUFFER

typedef FxI32 GrDepthBufferMode_t;

##### Properties:

Name | Type | Description
--- | --- | ---
`DISABLE` | `number` |
`ZBUFFER` | `number` |
`WBUFFER` | `number` |
`ZBUFFER_COMPARE_TO_BIAS` | `number` |
`WBUFFER_COMPARE_TO_BIAS` | `number` |

#### # inner GR_DITHER

typedef FxI32 GrDitherMode_t;

##### Properties:

Name | Type | Description
--- | --- | ---
`DISABLE` | `number` |
`D2x2` | `number` |
`D4x4` | `number` |

#### # inner GR_ENABLE

typedef FxU32 GrEnableMode_t;

##### Properties:

Name | Type | Description
--- | --- | ---
`AA_ORDERED` | `number` |
`ALLOW_MIPMAP_DITHER` | `number` |
`PASSTHRU` | `number` |
`SHAMELESS_PLUG` | `number` |
`VIDEO_SMOOTHING` | `number` |

#### # inner GR_FOG

typedef FxI32 GrFogMode_t;

##### Properties:

Name | Type | Description
--- | --- | ---
`DISABLE` | `number` |
`WITH_TABLE_ON_FOGCOORD_EXT` | `number` |
`WITH_TABLE_ON_Q` | `number` |
`WITH_TABLE_ON_W` | `number` |
`WITH_ITERATED_Z` | `number` |
`MULT2` | `number` |
`ADD2` | `number` |

#### # inner GR_LOD

typedef FxI32 GrLOD_t;

##### Properties:

Name | Type | Description
--- | --- | ---
`LOG2_256` | `number` |
`LOG2_128` | `number` |
`LOG2_64` | `number` |
`LOG2_32` | `number` |
`LOG2_16` | `number` |
`LOG2_8` | `number` |
`LOG2_4` | `number` |
`LOG2_2` | `number` |
`LOG2_1` | `number` |

#### # inner GR_MIPMAP

typedef FxI32 GrMipMapMode_t;

##### Properties:

Name | Type | Description
--- | --- | ---
`DISABLE` | `number` |
`NEAREST` | `number` |
`NEAREST_DITHER` | `number` |

#### # inner GR_MIPMAPLEVELMASK

GR_MIPMAPLEVELMASK

##### Properties:

Name | Type | Description
--- | --- | ---
`EVEN` | `number` |
`ODD` | `number` |
`BOTH` | `number` |

#### # inner GR_ORIGIN

typedef FxI32 GrOriginLocation_t;

##### Properties:

Name | Type | Description
--- | --- | ---
`UPPER_LEFT` | `number` |
`LOWER_LEFT` | `number` |
`ANY` | `number` |

#### # inner GR_PARAM

Parameters for vertex definition.

##### Properties:

Name | Type | Description
--- | --- | ---
`XY` | `number` |
`ZW` | `number` |
`Q` | `number` |
`EXT` | `number` |
`A` | `number` |
`RGB` | `number` |
`PARG` | `number` |
`ST0` | `number` |
`ST1` | `number` |
`ST2` | `number` |
`Q0` | `number` |
`Q1` | `number` |
`Q2` | `number` |

#### # inner GR_TEXFMT

typedef FxI32 GrTextureFormat_t;

##### Properties:

Name | Type | Description
--- | --- | ---
`BIT8` | `number` |
`RGB_332` | `number` |
`YIQ_422` | `number` |
`ALPHA_8` | `number` |
`INTENSITY_8` | `number` |
`ALPHA_INTENSITY_44` | `number` |
`P_8` | `number` |
`RSVD0` | `number` |
`P_8_6666` | `number` |
`P_8_6666_EXT` | `number` |
`RSVD1` | `number` |
`BIT16` | `number` |
`ARGB_8332` | `number` |
`AYIQ_8422` | `number` |
`RGB_565` | `number` |
`ARGB_1555` | `number` |
`ARGB_4444` | `number` |
`ALPHA_INTENSITY_88` | `number` |
`AP_88` | `number` |
`RSVD2` | `number` |
`RSVD4` | `number` |

#### # inner GR_TEXTABLE

typedef FxU32 GrTexTable_t;

##### Properties:

Name | Type | Description
--- | --- | ---
`NCC0` | `number` |
`NCC1` | `number` |
`PALETTE` | `number` |
`PALETTE_6666_EXT` | `number` |

#### # inner GR_TEXTURECLAMP

typedef FxI32 GrTextureClampMode_t;

##### Properties:

Name | Type | Description
--- | --- | ---
`WRAP` | `number` |
`CLAMP` | `number` |
`MIRROR_EXT` | `number` |

#### # inner GR_TEXTUREFILTER

typedef FxI32 GrTextureFilterMode_t;

##### Properties:

Name | Type | Description
--- | --- | ---
`POINT_SAMPLED` | `number` |
`BILINEAR` | `number` |

#### # inner GR_TMU

typedef FxI32 GrChipID_t;

##### Properties:

Name | Type | Description
--- | --- | ---
`TMU0` | `number` |
`TMU1` | `number` |
`TMU2` | `number` |

#### # inner GR_VERTEX

grDrawVertexArray/grDrawVertexArrayContiguous primitive type

##### Properties:

Name | Type | Description
--- | --- | ---
`POINTS` | `number` |
`LINE_STRIP` | `number` |
`LINES` | `number` |
`POLYGON` | `number` |
`TRIANGLE_STRIP` | `number` |
`TRIANGLE_FAN` | `number` |
`TRIANGLES` | `number` |
`TRIANGLE_STRIP_CONTINUE` | `number` |
`TRIANGLE_FAN_CONTINUE` | `number` |

#### # inner TEXMEM_2MB_EDGE

hard edge when assigning texture memory at 2MiB

# Methods

#### # inner fxAADrawTriangle(a, b, c, b1, b2, b3)

draw an anti-aliased triangle

##### Parameters:

Name | Type | Description
--- | --- | ---
`a` | `Array.<number>` | a vertex
`b` | `Array.<number>` | a vertex
`c` | `Array.<number>` | a vertex
`b1` | `boolean` | anti alias AB edge
`b2` | `boolean` | anti alias BC edge
`b3` | `boolean` | anti alias CA edge

#### # inner fxAlphaBlendFunction(rgb_sf, rgb_df, alpha_sf, alpha_df)

specify the alpha blending function

##### Parameters:

Name | Type | Description
--- | --- | ---
`rgb_sf` | `GR_BLEND` | rgb source blending factor
`rgb_df` | `GR_BLEND` | rgb destination blending factor
`alpha_sf` | `GR_BLEND` | alpha source blending factor
`alpha_df` | `GR_BLEND` | alpha destination blending factor

#### # inner fxAlphaCombine(func, factor, local, other, invert)

configure the alpha combine unit.

##### Parameters:

Name | Type | Description
--- | --- | ---
`func` | `GR_COMBINE_FUNCTION` | function
`factor` | `GR_COMBINE_FACTOR` | scaling factor
`local` | `GR_COMBINE_LOCAL` | local alpha
`other` | `GR_COMBINE_OTHER` | other alpha
`invert` | `boolean` | invert generated alpha.

#### # inner fxAlphaControlsITRGBLighting(enable)

enables/disables alpha controlled lighting

##### Parameters:

Name | Type | Description
--- | --- | ---
`enable` | `boolean` | enable/disable

#### # inner fxAlphaTestFunction(func)

specify the alpha test function

##### Parameters:

Name | Type | Description
--- | --- | ---
`func` | `GR_CMP` | the function

#### # inner fxAlphaTestReferenceValue(value)

specify the alpha test reference value

##### Parameters:

Name | Type | Description
--- | --- | ---
`value` | `number` | The new alpha test reference value.

#### # inner FXBIT(i) → {number}

set a bit.

##### Parameters:

Name | Type | Description
--- | --- | ---
`i` | `number` | bit to set.

Returns:

number with given bit set.

Type: `number`

#### # inner fxBufferClear(color, alpha, depth)

clear the buffers to the specified values

##### Parameters:

Name | Type | Description
--- | --- | ---
`color` | `number` | The color value used for clearing the draw buffer.
`alpha` | `number` | The alpha value used for clearing the alpha buffer
`depth` | `number` | An unsigned value used for clearing the depth buffer

#### # inner fxBufferSwap(interval)

exchange front and back buffers

##### Parameters:

Name | Type | Description
--- | --- | ---
`interval` | `number` | The number of vertical retraces to wait before swapping the front and back buffers.

#### # inner fxChromakeyMode(mode)

enable/disable hardware chroma-keying

##### Parameters:

Name | Type | Description
--- | --- | ---
`mode` | `boolean` | enable/disable

#### # inner fxChromakeyValue(val)

set the global chroma-key reference value

##### Parameters:

Name | Type | Description
--- | --- | ---
`val` | `number` | The new chroma-key reference value.

#### # inner fxClipWindow(minx, miny, maxx, maxy)

set the size and location of the hardware clipping window

##### Parameters:

Name | Type | Description
--- | --- | ---
`minx` | `number` | The lower x screen coordinate of the clipping window.
`miny` | `number` | The lower y screen coordinate of the clipping window.
`maxx` | `number` | The upper x screen coordinate of the clipping window.
`maxy` | `number` | The upper y screen coordinate of the clipping window.

#### # inner fxColorCombine(func, factor, local, other, invert)

configure the color combine unit.

##### Parameters:

Name | Type | Description
--- | --- | ---
`func` | `GR_COMBINE_FUNCTION` | function
`factor` | `GR_COMBINE_FACTOR` | scaling factor
`local` | `GR_COMBINE_LOCAL` | local alpha
`other` | `GR_COMBINE_OTHER` | other alpha
`invert` | `boolean` | invert generated alpha.

#### # inner fxColorMask(rgb, alpha)

enable/disable writing into the color and alpha buffers

##### Parameters:

Name | Type | Description
--- | --- | ---
`rgb` | `number` | color mask
`alpha` | `number` | alpha mask

#### # inner fxConstantColorValue(color)

set the global constant color

##### Parameters:

Name | Type | Description
--- | --- | ---
`color` | `number` | The new constant color.

#### # inner fxCullMode(mode)

set the cull mode.

##### Parameters:

Name | Type | Description
--- | --- | ---
`mode` | `GR_CULL` | the noew mode.

#### # inner fxDepthBiasLevel(level)

set the depth bias level

##### Parameters:

Name | Type | Description
--- | --- | ---
`level` | `number` | th new level.

#### # inner fxDepthBufferFunction(func)

specify the depth buffer comparison function

##### Parameters:

Name | Type | Description
--- | --- | ---
`func` | `GR_CMP` | the new function

#### # inner fxDepthBufferMode(mode)

set the depth buffering mode

##### Parameters:

Name | Type | Description
--- | --- | ---
`mode` | `GR_DEPTHBUFFER` | the mode

#### # inner fxDepthMask(enable)

enable/disable writing into the depth buffer

##### Parameters:

Name | Type | Description
--- | --- | ---
`enable` | `boolean` | enable/disable

#### # inner fxDepthRange(near, far)

specify viewport depth range

##### Parameters:

Name | Type | Description
--- | --- | ---
`near` | `number` | min range
`far` | `number` | max range

#### # inner fxDisable(val)

enable Glide operating modes

##### Parameters:

Name | Type | Description
--- | --- | ---
`val` | `GR_ENABLE` | one of GR_ENABLE.

#### # inner fxDisableAllEffects()

disable all special effects in the graphics subsystem

#### # inner fxDitherMode(mode)

set dither mode.

##### Parameters:

Name | Type | Description
--- | --- | ---
`mode` | `GR_DITHER` | the new dither mode.

#### # inner fxDrawLine(v1, v2)

draw a one-pixel-wide arbitrarily oriented line

##### Parameters:

Name | Type | Description
--- | --- | ---
`v1` | `Array.<number>` | a vertex.
`v2` | `Array.<number>` | a vertex.

#### # inner fxDrawPoint(v1)

draw a point

##### Parameters:

Name | Type | Description
--- | --- | ---
`v1` | `Array.<number>` | a vertex.

#### # inner fxDrawTriangle(v1, v2, v3)

draw a triangle

##### Parameters:

Name | Type | Description
--- | --- | ---
`v1` | `Array.<number>` | a vertex.
`v2` | `Array.<number>` | a vertex.
`v3` | `Array.<number>` | a vertex.

#### # inner fxDrawVertexArray(mode, vertices)

draw a list of by-vertex vertices

##### Parameters:

Name | Type | Description
--- | --- | ---
`mode` | `GR_VERTEX` | vertex type
`vertices` | `Array.<Array.<number>>` | array of vertices.

#### # inner FxEmptyVertex() → {Array.<number>}

create empty vertex.

Returns:

an empty vertex.

Type: `Array.<number>`

#### # inner fxEnable(val)

enable Glide operating modes

##### Parameters:

Name | Type | Description
--- | --- | ---
`val` | `GR_ENABLE` | one of GR_ENABLE.

#### # inner fxFinish()

force completion of all outstanding graphics commands.

#### # inner fxFlush()

flush the graphics FIFO

#### # inner fxFogColorValue(color)

set the global fog color

##### Parameters:

Name | Type | Description
--- | --- | ---
`color` | `number` | the new fog color

#### # inner fxFogGenerateExp(density) → {Array.<number>}

generate an exponential fog table

##### Parameters:

Name | Type | Description
--- | --- | ---
`density` | `number` | The fog density, typically between 0.0 and 1.0.

Returns:

a fog table.

Type: `Array.<number>`

#### # inner fxFogGenerateExp2(density) → {Array.<number>}

generate an exponential squared fog table

##### Parameters:

Name | Type | Description
--- | --- | ---
`density` | `*` | The fog density, typically between 0.0 and 1.0.

Returns:

a fog table.

Type: `Array.<number>`

#### # inner fxFogGenerateLinear(near, far) → {Array.<number>}

generate a linear fog table

##### Parameters:

Name | Type | Description
--- | --- | ---
`near` | `number` | The eye-space w coordinate where minimum fog exists.
`far` | `number` | The eye-space w coordinate where maximum fog exists.

Returns:

a fog table.

Type: `Array.<number>`

#### # inner fxFogMode(mode)

enable/disable per-pixel fog blending operations

##### Parameters:

Name | Type | Description
--- | --- | ---
`mode` | `GR_FOG` | the new fog mode.

#### # inner fxFogTable(table)

download a fog table

##### Parameters:

Name | Type | Description
--- | --- | ---
`table` | `Array.<number>` | a new table with at least fxGetFogTableEntries() entries

#### # inner fxFogTableIndexToW(i)

convert a fog table index to a floating point eye-space w value

##### Parameters:

Name | Type | Description
--- | --- | ---
`i` | `number` | The fog table index, between 0 and GR_FOG_TABLE_SIZE.

#### # inner fxGammaCorrectionRGB(r, g, b)

set up gamma correction tables

##### Parameters:

Name | Type | Description
--- | --- | ---
`r` | `number` |
`g` | `*` |
`b` | `*` |

#### # inner fxGetBitsDepth() → {number}

Returns:

The number of bits of depth (z or w) in the frame buffer.

Type: `number`

#### # inner fxGetFogTableEntries() → {number}

Returns:

The number of entries in the hardware fog table.

Type: `number`

#### # inner fxGetGammaTableEntries() → {number}

Returns:

The number of entries in the hardware gamma table. Returns FXFALSE if it is not possible to manipulate gamma (e.g. on a Macronix card, or in windowed mode).

Type: `number`

#### # inner fxGetMaxTextureAspectRatio() → {number}

Returns:

The logarithm base 2 of the maximum aspect ratio supported for power-of-two, mipmap-able textures (e.g. Voodoo Graphics returns 3).

Type: `number`

#### # inner fxGetMaxTextureSize() → {number}

Returns:

The width of the largest texture supported on this configuration (e.g. Voodoo Graphics returns 256).

Type: `number`

#### # inner fxGetMemoryFb() → {number}

Returns:

The total number of bytes per Pixelfx chip if a non-UMA configuration is used, else 0. In non-UMA configurations, the total FB memory is GR_MEMORY_FB * GR_NUM_FB.

Type: `number`

#### # inner fxGetMemoryTmu() → {number}

Returns:

The total number of bytes per Texelfx chip if a non-UMA configuration is used, else FXFALSE. In non-UMA configurations, the total usable texture memory is GR_MEMORY_TMU * GR_NUM_TMU.

Type: `number`

#### # inner fxGetMemoryUma() → {number}

Returns:

The total number of bytes if a UMA configuration, else 0.

Type: `number`

#### # inner fxGetNumBoards() → {number}

Returns:

The number of installed boards supported by Glide.

Type: `number`

#### # inner fxGetNumFb() → {number}

Returns:

The number of Pixelfx chips present. This number will always be 1 except for SLI configurations.

Type: `number`

#### # inner fxGetNumPendingBufferSwaps() → {number}

Returns:

The number of buffer swaps pending.

Type: `number`

#### # inner fxGetNumTmu() → {number}

Returns:

The number of Texelfx chips per Pixelfx chip. For integrated chips, the number of TMUs will be returned.

Type: `number`

#### # inner fxGetRevisionFb() → {number}

Returns:

The revision of the Pixelfx chip(s).

Type: `number`

#### # inner fxGetRevisionTmu() → {number}

Returns:

The revision of the Texelfx chip(s).

Type: `number`

#### # inner fxGetVertexSize() → {number}

Returns:

the size of the currently active vertex layout in 'number of entries'.

Type: `number`

#### # inner fxGetWDepthMinMax() → {Array.<number>}

Returns:

The minimum and maximum allowable w buffer values.

Type: `Array.<number>`

#### # inner fxGetZDepthMinMax() → {Array.<number>}

Returns:

The minimum and maximum allowable z buffer values.

Type: `Array.<number>`

#### # inner fxInit()

init 3dfx glide. the following parameters are used: GR_RESOLUTION_640x480, GR_REFRESH_60Hz, GR_COLORFORMAT_ARGB, GR_ORIGIN_UPPER_LEFT, GR_WINDOW_COORDS

#### # inner fxIsBusy() → {number}

Returns:

Returns FXFALSE if idle, FXTRUE if busy.

Type: `number`

#### # inner fxLfbConstantAlpha(val)

Alpha value to use for direct framebuffer access.

##### Parameters:

Name | Type | Description
--- | --- | ---
`val` | `number` | the constant alpha value.

#### # inner fxLfbConstantDepth(val)

Depth value to use for direct framebuffer access.

##### Parameters:

Name | Type | Description
--- | --- | ---
`val` | `number` | the constant depth value.

#### # inner fxOrigin(origin)

establishes a y origin

##### Parameters:

Name | Type | Description
--- | --- | ---
`origin` | `GR_ORIGIN` | set y origin.

#### # inner fxRenderBuffer(buffer)

selects the current color buffer for drawing and clearing

##### Parameters:

Name | Type | Description
--- | --- | ---
`buffer` | `GR_BUFFER` | Selects the current color buffer. Valid values are GR_BUFFER_FRONTBUFFER and GR_BUFFER_BACKBUFFER.

#### # inner fxResetVertexLayout()

Reset grVertexLayout parameter offset to zero, and all parameter modes to GR_PARAM_DISABLE.

#### # inner FxRGB2Vertex(v, idx, rgb)

split up RGB value and store in vertex.

##### Parameters:

Name | Type | Description
--- | --- | ---
`v` | `Array.<number>` | the vertex to store in.
`idx` | `number` | start index of RGB values.
`rgb` | `number` | the RGB value.

#### # inner fxShutdown()

shut down the Glide library

#### # inner fxTexCalcMemRequired(smallLod, largeLod, aspect, format) → {number}

return the texture memory consumed by a texture.

##### Parameters:

Name | Type | Description
--- | --- | ---
`smallLod` | `GR_LOD` | smallest level of detail
`largeLod` | `GR_LOD` | larges level of detail
`aspect` | `GR_ASPECT` | texture aspect ratio
`format` | `GR_TEXFMT` | texture format

Returns:

number of bytes required

Type: `number`

#### # inner fxTexClampMode(tmu, sMode, tMode)

set the texture map clamping/wrapping mode

##### Parameters:

Name | Type | Description
--- | --- | ---
`tmu` | `GR_TMU` | the TMU.
`sMode` | `GR_TEXTURECLAMP` | The new mode for the s direction
`tMode` | `GR_TEXTURECLAMP` | The new mode for the t direction

#### # inner fxTexCombine(tmu, rgb_func, rgb_factor, alpha_func, alpha_factor, rgb_invert, alpha_invert)

configure a texture combine unit

##### Parameters:

Name | Type | Description
--- | --- | ---
`tmu` | `GR_TMU` | the TMU.
`rgb_func` | `GR_COMBINE_FUNCTION` | Specifies the function used in texture color generation
`rgb_factor` | `GR_COMBINE_FACTOR` | Specifies the scaling factor f used in texture color generation
`alpha_func` | `GR_COMBINE_FUNCTION` | Specifies the function used in texture alpha generation
`alpha_factor` | `GR_COMBINE_FACTOR` | Specifies the scaling factor f used in texture alpha generation
`rgb_invert` | `boolean` | Specifies whether the generated texture color should be bitwise inverted as a final step.
`alpha_invert` | `boolean` | Specifies whether the generated texture alpha should be bitwise inverted as a final step.

#### # inner fxTexDetailControl(tmu, lodBias, detailScale, detailMax)

set the detail texturing controls

##### Parameters:

Name | Type | Description
--- | --- | ---
`tmu` | `GR_TMU` | the TMU.
`lodBias` | `number` | Controls where the blending between the two textures begins. This value is an LOD bias value in the range [–32.. +31].
`detailScale` | `number` | Controls the steepness of the blend. Values are in the range [0..7] are valid. The scale is computed as 2^detailScale.
`detailMax` | `number` | Controls the maximum blending that occurs. Values in the range [0.0..1.0] are valid.

#### # inner fxTexFilterMode(tmu, minFilter, magFilter)

specify the texture minification and magnification filters

##### Parameters:

Name | Type | Description
--- | --- | ---
`tmu` | `GR_TMU` | the TMU.
`minFilter` | `GR_TEXTUREFILTER` | The minification filter
`magFilter` | `GR_TEXTUREFILTER` | The magnification filter

#### # inner fxTexLodBiasValue(tmu, bias)

set the LOD bias value

##### Parameters:

Name | Type | Description
--- | --- | ---
`tmu` | `GR_TMU` | the TMU.
`bias` | `number` | The new LOD bias value, a signed floating point value in the range [-8..7.75].

#### # inner fxTexMaxAddress(tmu)

return the highest start address for texture downloads

##### Parameters:

Name | Type | Description
--- | --- | ---
`tmu` | `GR_TMU` | the TMU.

#### # inner FxTexMemGetStartAddress(tmu, info) → {number}

try to find the next available memory for texture.

##### Parameters:

Name | Type | Description
--- | --- | ---
`tmu` | `GR_TMU` | the TMU where this texture shall be used.
`info` | `TexInfo` | the texture.

Returns:

a start address or null.

Type: `number`

#### # inner FxTexMemInit(tmu)

(re)initialize simple texture memory management for given TMU.

##### Parameters:

Name | Type | Description
--- | --- | ---
`tmu` | `GR_TMU` | the tmu to initialize.

#### # inner fxTexMinAddress(tmu)

return the lowest start address for texture downloads

##### Parameters:

Name | Type | Description
--- | --- | ---
`tmu` | `GR_TMU` | the TMU.

#### # inner fxTexMipMapMode(tmu, mode, lodBlend)

set the mipmapping mode

##### Parameters:

Name | Type | Description
--- | --- | ---
`tmu` | `GR_TMU` | the TMU.
`mode` | `GR_MIPMAP` | The new mipmapping mode
`lodBlend` | `boolean` | enables/disables LOD blending

#### # inner fxTexNCCTable(table)

select an NCC table

##### Parameters:

Name | Type | Description
--- | --- | ---
`table` | `GR_TEXTABLE` | NCC table to use for decompressing compressed textures. Valid values are GR_TEXTABLE_NCC0 and GR_TEXTABLE_NCC1.

#### # inner fxVertexLayout(layout)

specify the format of by-vertex arrays

##### Parameters:

Name | Type | Description
--- | --- | ---
`layout` | `Array.<GR_PARAM>` | list of layout parameters.

#### # inner fxViewport(x, y, width, height)

define a viewport

##### Parameters:

Name | Type | Description
--- | --- | ---
`x` | `number` | The origin of the viewport, relative to the screen origin
`y` | `number` | The origin of the viewport, relative to the screen origin
`width` | `number` | The width and height of the viewport.
`height` | `number` | The width and height of the viewport.