Using depth in the render API

Are there any future plans to allow the use of the depth buffer in the render API? If not, why? I mean something like this:

int SDL_RenderSetDepth(SDL_Renderer *renderer, Uint8 depth);

Where you’d set the depth for future calls (similar to how you can set the draw color for future calls). Then the rendering backend could make use of the depth buffer.

Of course, we can already achieve this by ensuring that we draw from back to front. For non-trivial cases, this can be annoying and could involve building an array and sorting.

1 Like