OpenGL replaces a variety of IRIS GL clear functions (such as zclear, aclear, sclear, and so on) with a single function, glClear. Specify exactly what you want to clear by passing masks to glClear.
Keep the following points in mind when porting screen and buffer commands:
glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT )
The following table lists the various IRIS GL clear functions with their equivalent OpenGL functions.
IRIS GL Call | OpenGL Call | Meaning |
---|---|---|
acbuf(AC_CLEAR) | glClear(GL_ACCUM_BUFFER_BIT) | Clear the accumulation buffer. |
— | glClearColor | Set the RGBA clear color. |
— | glClearIndex | Set the clear-color index. |
clear | glClear(GL_COLOR_BUFFER_BIT) | Clear the color buffer. |
— | glClearDepth | Specify the clear value for the depth buffer. |
zclear | glClear(GL_DEPTH_BUFFER_BIT) | Clear the depth buffer. |
czclear | glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT) |
Clear the color buffer and the depth buffer. |
— | glClearAccum | Specify clear values for the accumulation buffer. |
— | glClearStencil | Specify the clear value for the stencil buffer. |
sclear | glClear(GL_STENCIL_BUFFER_BIT) | Clear the stencil buffer. |
When your IRIS GL code uses both gclear and sclear, you can combine them into a single glClear call—this can improve your program's performance.