ImGui引入深度测试的方法
You can use AddCallback() on a given ImDrawList:: to register functions to be run during rendering and use callbacks to alter your render state (e.g. enable depth testing + enable a custom shader with uniform to write a specific Z value into the framebuffer). This will be dependent on your rendering backend so you'll need to be familiar with your graphics stack to do it, and will require a bit of plumbing.
详见Depth test with imgui primitives · Issue #4022 · ocornut/imgui (github.com)
本文来自博客园,作者:koala999,转载请注明原文链接:https://www.cnblogs.com/koala999/p/16779932.html