Export (0) Print
Expand All
Expand Minimize

glClearDepth function

Applies to: desktop apps only

The glClearDepth function specifies the clear value for the depth buffer.

Syntax

void WINAPI glClearDepth(
  GLclampd depth
);

Parameters

depth

The depth value used when the depth buffer is cleared.

Return value

This function does not return a value.

Error codes

The following error code can be retrieved by the glGetError function.

NameMeaning
GL_INVALID_OPERATION

The function was called between a call to glBegin and the corresponding call to glEnd.

Remarks

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

The following function retrieves information related to the glClearDepth function:

glGet with argument GL_DEPTH_CLEAR_VALUE

Requirements

Minimum supported client

Windows 2000 Professional

Minimum supported server

Windows 2000 Server

Header

Gl.h

Library

Opengl32.lib

DLL

Opengl32.dll

See also

glBegin
glClear
glEnd
glGet

 

 

Send comments about this topic to Microsoft

Build date: 3/6/2012

Community Additions

ADD
Show:
© 2014 Microsoft