next up previous contents
Next: Display lists Up: KGL API Previous: KGL DC-specific APIs   Contents

Subsections

Per Fragment Operations

void glBlendFunc(GLenum sfactor, GLenum dfactor)

Only applies when the transparent/punchthru polygon list is active.

Constant sfactor dfactor Computed Blend Factor
GL_ZERO X X (0, 0, 0, 0)
GL_ONE X X (1, 1, 1, 1)
GL_DST_COLOR X   (R\( _{d} \), G\( _{d} \), B\( _{d} \), A\( _{d} \))
GL_SRC_COLOR   X (R\( _{s} \), G\( _{s} \), B\( _{s} \), A\( _{s} \))
GL_ONE_MINUS_DST_COLOR X   (1, 1, 1, 1) - (R\( _{d} \), G\( _{d} \), B\( _{d} \), A\( _{d} \))
GL_ONE_MINUS_SRC_COLOR   X (1, 1, 1, 1) - (R\( _{s} \), G\( _{s} \), B\( _{s} \), A\( _{s} \))
GL_SRC_ALPHA X X (A\( _{s} \), A\( _{s} \), A\( _{s} \), A\( _{s} \))
GL_ONE_MINUS_SRC_ALPHA X X (1, 1, 1, 1) - (A\( _{s} \), A\( _{s} \), A\( _{s} \), A\( _{s} \))
GL_DST_ALPHA X X (A\( _{d} \), A\( _{d} \), A\( _{d} \), A\( _{d} \))
GL_ONE_MINUS_DST_ALPHA X X (1, 1, 1, 1) - (A\( _{d} \), A\( _{d} \), A\( _{d} \), A\( _{d} \))
GL_SRC_ALPHA_SATURATE     not available
GL_CONSTANT_COLOR     not available
GL_ONE_MINUS_CONSTANT_COLOR     not available
GL_CONSTANT_ALPHA     not available
GL_ONE_MINUS_CONSTANT_ALPHA     not available

void glClearDepth(GLclampd depth)

NOP: non-functional. To ease porting.

void glDepthFunc(GLenum func)

The DC supports a number of depth functions.

Supported Depth Functions
GL_NEVER
GL_LESS (default)
GL_EQUAL
GL_LEQUAL
GL_GREATER
GL_NOTEQUAL
GL_GEQUAL
GL_ALWAYS

void glDepthMask(GLboolean flag)

Valid state is GL_TRUE or GL_FALSE. Default state is GL_TRUE. Controls blending of opaque and transparent objects.

glScissor(GLint x, GLint y, GLsizei width, GLsizei height)

The DC uses the PVR USER_CLIP functionality and does not allow fine-grain per-pixel control over the scissor box width, height and placement on the screen. The minimum clip rectangle is a 32x32 area which corresponds with the size of tiles used by the tile accelerator. The PVR swithes off rendering to tiles outside or inside the defined rectangle dependant upon the 'clipmode' bits in the polygon header.

The specified scissor box will always have a size that is some multiple of 32. glScissor(0, 0, 32, 32) allows only the 'tile' in the lower left hand corner of the screen to be modified and glScissor(0, 0, 0, 0) disallows modification to all 'tiles' on the screen. Enabling GL_SCISSOR_TEST or GL_KOS_USERCLIP_OUTSIDE will cause rendered objects to be clipped to the inside or outside of the scissor box respectively.


next up previous contents
Next: Display lists Up: KGL API Previous: KGL DC-specific APIs   Contents
Dan Potter 2002-07-29