Invalidate depth and stencil buffers after finishing the rendering
[platform/core/uifw/dali-adaptor.git] / dali / internal / graphics / gles-impl / gles-context.cpp
index 2a6677d..89a6010 100644 (file)
@@ -654,6 +654,14 @@ void Context::ClearBuffer(uint32_t mask, bool forceClear)
   }
 }
 
+void Context::InvalidateDepthStencilBuffers()
+{
+  auto& gl = *mImpl->mController.GetGL();
+
+  GLenum attachments[] = {GL_DEPTH, GL_STENCIL};
+  gl.InvalidateFramebuffer(GL_FRAMEBUFFER, 2, attachments);
+}
+
 void Context::SetScissorTestEnabled(bool scissorEnabled)
 {
   if(mImpl->mGlStateCache.mScissorTestEnabled != scissorEnabled)