Skip to content

Commit

Permalink
Ignore the stencil in the imgui pipeline (flutter#120)
Browse files Browse the repository at this point in the history
  • Loading branch information
bdero authored and dnfield committed Apr 27, 2022
1 parent 685ae23 commit af922f9
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions impeller/playground/imgui/imgui_impl_impeller.cc
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,13 @@ bool ImGui_ImplImpeller_Init(std::shared_ptr<impeller::Context> context) {
impeller::ImguiRasterFragmentShader>::
MakeDefaultPipelineDescriptor(*context);
desc->SetSampleCount(impeller::SampleCount::kCount4);
auto stencil = desc->GetFrontStencilAttachmentDescriptor();
if (stencil.has_value()) {
stencil->stencil_compare = impeller::CompareFunction::kAlways;
stencil->depth_stencil_pass = impeller::StencilOperation::kKeep;
desc->SetStencilAttachmentDescriptors(stencil.value());
}

bd->pipeline =
context->GetPipelineLibrary()->GetRenderPipeline(std::move(desc)).get();
IM_ASSERT(bd->pipeline != nullptr && "Could not create ImGui pipeline.");
Expand Down

0 comments on commit af922f9

Please sign in to comment.