Drawable Renderer (#1570), Custom layer (issue #1272)

This commit is contained in:
Stefan Karschti
2023-07-07 21:24:10 +03:00
committed by Bart Louwers
parent 7e7fa37fd0
commit a42b559fbe
35 changed files with 264 additions and 77 deletions

View File

@@ -423,6 +423,17 @@ void Context::reset() {
performCleanup();
}
#if MLN_DRAWABLE_RENDERER
void Context::resetState(gfx::DepthMode depthMode, gfx::ColorMode colorMode) {
// Reset GL state to a known state so the CustomLayer always has a clean slate.
bindVertexArray = value::BindVertexArray::Default;
setDepthMode(depthMode);
setStencilMode(gfx::StencilMode::disabled());
setColorMode(colorMode);
setCullFaceMode(gfx::CullFaceMode::disabled());
}
#endif
void Context::setDirtyState() {
// Note: does not set viewport/scissorTest/bindFramebuffer to dirty
// since they are handled separately in the view object.