Skip to content

Commit af922f9

Browse files
bderodnfield
authored andcommitted
Ignore the stencil in the imgui pipeline (flutter#120)
1 parent 685ae23 commit af922f9

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

impeller/playground/imgui/imgui_impl_impeller.cc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,13 @@ bool ImGui_ImplImpeller_Init(std::shared_ptr<impeller::Context> context) {
8989
impeller::ImguiRasterFragmentShader>::
9090
MakeDefaultPipelineDescriptor(*context);
9191
desc->SetSampleCount(impeller::SampleCount::kCount4);
92+
auto stencil = desc->GetFrontStencilAttachmentDescriptor();
93+
if (stencil.has_value()) {
94+
stencil->stencil_compare = impeller::CompareFunction::kAlways;
95+
stencil->depth_stencil_pass = impeller::StencilOperation::kKeep;
96+
desc->SetStencilAttachmentDescriptors(stencil.value());
97+
}
98+
9299
bd->pipeline =
93100
context->GetPipelineLibrary()->GetRenderPipeline(std::move(desc)).get();
94101
IM_ASSERT(bd->pipeline != nullptr && "Could not create ImGui pipeline.");

0 commit comments

Comments
 (0)