Export (0) Print
Expand All
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

depthFunc method

Sets a function to use to compare incoming pixel depth to the current depth buffer value.

IE11

 

Syntax

WebGLRenderingContext.depthFunc(func);

Parameters

func [in]

Type: Number

Sets conditions for pixels to be drawn. Use one of the following comparison values:

ValueMeaning
gl.NEVER

Incoming value never passes.

gl.LESS

Pass if the incoming value is less than the depth buffer value.

gl.EQUAL

Pass if the incoming value is equal to the depth buffer value.

gl.LEQUAL

Pass if the incoming value is less than or equal to the depth buffer value.

gl.GREATER

Pass if the incoming value is greater than the depth buffer value.

gl.NOTEQUAL

Pass if the incoming value isn't equal to the depth buffer value.

gl.GEQUAL

Pass if the incoming value is greater than or equal to the depth buffer value.

gl.ALWAYS

Always pass, regardless of value.

 

Return value

This method does not return a value.

Remarks

WebGL errorDescription
gl.INVALID_ENUMIf func is not from the listed values.

 

See also

WebGLRenderingContext

 

 

Show:
© 2015 Microsoft