set_write_enabled


Description:

public void set_write_enabled (Bool enable)

Enables or disables depth buffer writing according to the value of enable.

Normally when depth testing is enabled and the comparison between a fragment's depth value and the corresponding depth buffer value passes then the fragment's depth is written to the depth buffer unless writing is disabled here.

By default depth writing is enabled

NB: this won't directly affect the state of the GPU. You have to then set the state on a Pipeline using set_depth_state

Parameters:

this

A DepthState struct

enable

The enable state you want