MCPcopy Create free account
hub / github.com/crossuo/crossuo / RenderState_SetDepthEnabled

Function RenderState_SetDepthEnabled

src/Renderer/RenderState.cpp:210–226  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

208}
209
210bool RenderState_SetDepthEnabled(RenderState *state, bool enabled, bool forced)
211{
212 if (forced || state->depth.enabled != enabled)
213 {
214 if (enabled)
215 {
216 glEnable(GL_DEPTH_TEST);
217 }
218 else
219 {
220 glDisable(GL_DEPTH_TEST);
221 }
222 return true;
223 }
224
225 return false;
226}
227
228bool RenderState_SetStencilEnabled(RenderState *state, bool enabled, bool forced)
229{

Callers 2

Calls

no outgoing calls

Tested by

no test coverage detected