I am using C++ glew/glfw to make a game, and I currently have different areas of the map and different entity classes using their own VBO's. So far this decision has been informed from a large part of the map being static, lots of the entity's being dynamic, and being calculated independently. The problem is trying to render textures that are largely transparent with some opaque features, in any given VBO correctly.
In this current arrangement, I cannot easily depth sort every transparent face in the C++ realm, because they are being computed individually and being sent in different VBO's.
I have tried changing glDepthFunc
to always and greater, but this results in the opaque features of some of the transparent faces being rendered ontop of things closer, which is incorrect.
I have tried disabling glDepthMask
, which seems to render them in the order they are sorted in, which aforementioned is an issue, and results in some far opaque features being rendered ontop of where they should be, seemily as a result of how far back in the vertex array they were.
Any ways of solving this is appreciated. Thank you.