Click or drag to resize
XDL

XGraphicsglAlphaFunc Method

The glAlphaFunc function enables your application to set the alpha test function.

Namespace:  Pixoneer.NXDL.NGR
Assembly:  NXDLgr (in NXDLgr.dll) Version: 1.2.817.72
Syntax
C#
public void glAlphaFunc(
	int func,
	float arg_ref
)

Parameters

func
Type: SystemInt32
The alpha comparison function. The following are the accepted symbolic constants and their meanings.
arg_ref
Type: SystemSingle
The reference value to which incoming alpha values are compared. This value is clamped to the range 0 through 1, where 0 represents the lowest possible alpha value and 1 the highest possible value. The default reference is 0.

Return Value

Type: 
This function does not return a value.
Remarks
The alpha test discards fragments depending on the outcome of a comparison between the incoming fragments' alpha values and a constant reference value. The glAlphaFunc function specifies the reference and comparison function. The comparison is performed only if alpha testing is enabled. (For more information on GL_ALPHA_TEST, see glEnable.) The func and ref parameters specify the conditions under which the pixel is drawn. The incoming alpha value is compared to ref using the function specified by func. If the comparison passes, the incoming fragment is drawn, conditional on subsequent stencil and depth-buffer tests. If the comparison fails, no change is made to the framebuffer at that pixel location. The glAlphaFunc function operates on all pixel writes, including those resulting from the scan conversion of points, lines, polygons, and bitmaps, and from pixel draw and copy operations. The glAlphaFunc function does not affect screen clear operations. Alpha testing is done only in RGBA mode.
See Also