Improve backbuffer depth buffer.

- Setting the depth buffer for the backbuffer is now done as a boolean instead of a bit depth integer, in love.conf or love.window.setMode.
- Error if depth writes are enabled when the active canvas setup or backbuffer does not have a depth buffer (now it matches stencil behaviour).
- Don't allocate a backbuffer depth-stencil buffer if they're not requested. Metal also determines the format for that buffer based on which combination of depth and stencil is requested. OpenGL still has to allocate the depth-stencil buffer for the backbuffer all the time, because changing it requires the context to be recreated.
This commit is contained in:
Sasha Szpakowski
2024-01-06 15:21:06 -04:00
parent 621a7547d2
commit aaab9791d5
11 changed files with 183 additions and 110 deletions
+1 -1
View File
@@ -262,7 +262,7 @@ struct WindowSettings
int vsync = 1;
int msaa = 0;
bool stencil = true;
int depth = 0;
bool depth = false;
bool resizable = false;
int minwidth = 1;
int minheight = 1;