cohaereo/egui_glfw_gl

Add depth buffer option

Opened this issue · 4 comments

Right now in the example you are only rendering a triangle so there's no need for a depth buffer, but as soon you try to integrate this in application that is depth testing the ui will not draw correctly.

Closed this on accident, sorry for that.

I thought that EGUI wouldn't need a depth buffer? I'm guessing they're not doing Z-sorting yet? I personally haven't had any problems with it, so if you could give an example of the lack of depth testing causing graphical issues, that would be great!

No worries!
Here's the example included of just adding depth test and clearing both the color and depth buffer:
image

Did some testing myself, was able to reproduce that exact same issue.
I saw you already fixed this on your fork, if you can PR your changes I'll update the crate

I need to do some more testing, but I'll try and do a PR if it's working as intended.