elm-explorations / webgl

Functional rendering with WebGL in Elm
https://package.elm-lang.org/packages/elm-explorations/webgl/latest/
BSD 3-Clause "New" or "Revised" License
117 stars 17 forks source link

Allow efficiently clearing depth and stencil buffers #18

Open ianmackenzie opened 5 years ago

ianmackenzie commented 5 years ago

Right now to clear the stencil or depth buffer it is necessary to do a hack like drawing a full-screen quad. It would be useful (and presumably more efficient) to have something like some special Entity values WebGL.clearDepthBuffer and WebGL.clearStencilBuffer that would end up simply calling gl.clearDepth() or gl.clearStencil() when drawn.