private GetBooleanv ( |
||
pname | ||
@params | [ | |
return | void |
public unsafe void ClearDepthStencil() { bool depthWrite = true; GL.GetBooleanv(GL.DEPTH_WRITEMASK, &depthWrite); if (depthWrite != true) { GL.DepthMask(true); } GL.Clear(GL.DEPTH_BUFFER_BIT | GL.STENCIL_BUFFER_BIT); if (depthWrite != true) { GL.DepthMask(false); } }
public unsafe void ClearColorDepth(float r, float g, float b, float a) { bool depthWrite = true; GL.GetBooleanv(GL.DEPTH_WRITEMASK, &depthWrite); if (depthWrite != true) { GL.DepthMask(true); } GL.ClearColor(r, g, b, a); GL.Clear(GL.COLOR_BUFFER_BIT | GL.DEPTH_BUFFER_BIT); if (depthWrite != true) { GL.DepthMask(false); } }