Closed SDLBugzilla closed 1 month ago
Running through SDL_Render issues tagged for 3.0 ABI, sorry if you get multiple e-mails for this...
If it helps at all, we've added this to our GPU API at #9312 - it wouldn't help with the GL subsystem but could be helpful for migrating to _gpu and maybe SDL_Render if depth buffers are supported there.
So this is actually not available in OpenGL as requested, which surprised me.
glX doesn't have it, Cocoa doesn't have it, EGL as a whole doesn't have it.
(WGL_EXT_depth_float does offer this on windows, but the GL_ARB_depth_buffer_float spec suggests it's rarely-used.)
The correct way to do this seems to be to create your GL context as usual, maybe with no depth buffer at all, then make a framebuffer object, and attach a texture/renderbuffer in GL_DEPTH_COMPONENT32F format to that FBO, assuming that's supported on your GL implementation, and render to that instead of the window framebuffer. Then before swapping buffers, blit from the FBO to the window framebuffer. As far as I can tell.
But we can't usefully offer this as something you can set when creating the GL context through SDL_GL_SetAttribute.
(If I'm wrong, we can reopen this, though!)
This bug report was migrated from our old Bugzilla tracker.
Reported in version: don't know Reported for operating system, platform: All, All
Comments on the original bug report:
On 2020-04-11 06:35:45 +0000, Andrei Kortunov wrote:
On 2020-06-26 11:54:05 +0000, wrote: