MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / rend_SetZBufferState

Function rend_SetZBufferState

renderer/HardwareOpenGL.cpp:1731–1748  ·  view source on GitHub ↗

Sets the state of z-buffering to on or off

Source from the content-addressed store, hash-verified

1729
1730// Sets the state of z-buffering to on or off
1731void rend_SetZBufferState(int8_t state) {
1732 if (state == gpu_state.cur_zbuffer_state)
1733 return; // No redundant state setting
1734
1735 OpenGL_sets_this_frame[5]++;
1736 gpu_state.cur_zbuffer_state = state;
1737
1738 // mprintf(0,"OPENGL: Setting zbuffer state to %d.\n",state);
1739
1740 if (state) {
1741 dglEnable(GL_DEPTH_TEST);
1742 dglDepthFunc(GL_LEQUAL);
1743 } else {
1744 dglDisable(GL_DEPTH_TEST);
1745 }
1746
1747 CHECK_ERROR(14)
1748}
1749
1750// Clears the display to a specified color
1751void rend_ClearScreen(ddgr_color color) {

Callers 15

rend_DrawChunkedBitmapFunction · 0.70
opengl_SetDefaultsFunction · 0.70
ui_DoCursorFunction · 0.50
ui_DrawRectFunction · 0.50
ui_DrawBitmapFunction · 0.50
RenderCockpitFunction · 0.50
GameRenderWorldFunction · 0.50
GameRenderFrameFunction · 0.50
OnDrawMethod · 0.50
DrawBorderMethod · 0.50
RenderHUDFrameFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected