---
name: "glClearDepth"
section: "3x"
platform: "linux"
package: "xlibmesa-gl-dev"
version: "4.3.0.dfsg.1-14sarge7"
release: "Debian 3.1 (Sarge)"
platforms: ["linux"]
url: "https://new.carta.tech/glClearDepth"
---

# glClearDepth(3x)

specify the clear value for the depth buffer

## NAME

**glClearDepth** - specify the clear value for the depth buffer

## C SPECIFICATION

void **glClearDepth**( GLclampd *depth* )

```

```

## PARAMETERS

- *depth*

  Specifies the depth value used when the depth buffer is cleared. The initial value is 1.

## DESCRIPTION

**glClearDepth** specifies the depth value used by **glClear** to clear the depth buffer. Values specified by **glClearDepth** are clamped to the range \[0, 1\].

## ERRORS

**GL\_INVALID\_OPERATION** is generated if **glClearDepth** is executed between the execution of **glBegin** and the corresponding execution of **glEnd**.

## ASSOCIATED GETS

**glGet** with argument **GL\_DEPTH\_CLEAR\_VALUE**

## SEE ALSO

**glClear(3G)**
