MCPcopy Create free account
hub / github.com/SFML/SFML / clearStencil

Method clearStencil

src/SFML/Graphics/RenderTarget.cpp:219–233  ·  view source on GitHub ↗

///////////////////////////////////////////////////////

Source from the content-addressed store, hash-verified

217
218////////////////////////////////////////////////////////////
219void RenderTarget::clearStencil(StencilValue stencilValue)
220{
221 if (RenderTargetImpl::isActive(m_id) || setActive(true))
222 {
223 // Unbind texture to fix RenderTexture preventing clear
224 applyTexture(nullptr);
225
226 // Apply the view (scissor testing can affect clearing)
227 if (!m_cache.enable || m_cache.viewChanged)
228 applyCurrentView();
229
230 glCheck(glClearStencil(static_cast<int>(stencilValue.value)));
231 glCheck(glClear(GL_STENCIL_BUFFER_BIT));
232 }
233}
234
235
236////////////////////////////////////////////////////////////

Callers

nothing calls this directly

Calls 1

isActiveFunction · 0.85

Tested by

no test coverage detected