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)

posted @ 2022-10-11 17:22  koala999  阅读(78)  评论(0编辑  收藏  举报