Modifications to use application metadata for depth and stencil buffers #553
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
A couple of my tests for the experimental build were working on the Android emulator (
Pixel_3a_API_31_arm64-v8a
, chosen arbitrarily) but not on an actual device (Neffos x9 or so, v7 architecture I believe).The
eglConfigChooser()
call was not requesting depth (or stencil) bits, although it seems some drivers are generous.These modifications let you ask for a depth buffer and it will modify that request accordingly.
At the moment this is a simple "I want it", in which case it gives you a 16-bit depth buffer. (If you request a stencil buffer, which will be 8 bits, it will also throw the 16-bit depth buffer in, since these always seem to go hand-in-hand.)
Perhaps some refinement could follow later, e.g. for 24-bit depth, although it would probably have to query for capabilities or pixel formats.
The options are "wantsDepthBuffer" and "wantsStencilBuffer", which you can provide in
build.settings
like so:This gave me appropriate on-device results with that setting and without it.
I haven't run into the same need on Windows, Mac, iOS, or tvOS in my tests (these last two in their respective emulators), but they'd call for something similar if it should arise.
TODO?
I wasn't sure if I could trip those code paths that pass
false, false
when constructingfView
andfCoronaRuntime
.