### Method

# Cogl DepthState set_write_enabled

#### Declaration [src]

    void
    cogl_depth_state_set_write_enabled (
      CoglDepthState* state,
      gboolean enable
    )

#### Description [src]

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 `CoglPipeline` using cogl_pipeline_set_depth_state().

#### Parameters

`enable`

  Type: `gboolean`

  The enable state you want.