Closed danielchasehooper closed 4 months ago
@floooh any thoughts on this? we've had to work around it by setting _sg.gl.cur_context->default_framebuffer
before the first pass
My plan was to implement https://github.com/floooh/sokol/issues/904 as a "proper" but breaking fix (it's most likely the next "big thing" after catching up with a couple smaller PRs, but I can't promise an ETA).
I guess it might make sense to implement your solution in the meantime.
Can you provide a PR (or point me to an existing one)?
It's unclear how to best fix in a general way. Could we just not call glBindFramebuffer
at the end of the pass?
otherwise we would need to call sg_desc.context.gl.default_framebuffer_cb at the end of every pass
Could we just not call glBindFramebuffer at the end of the pass?
I'll need to do some git archeology whether there's a specific reason for that glBindFramebuffer, but that might work, yeah.
I think this is fixed now with the new render-pass API.
in an application with multiple gl windows consider this situation:
_sg_gl_end_pass
,glBindFramebuffer(GL_FRAMEBUFFER, _sg.gl.cur_context->default_framebuffer)
is called with a framebuffer that is now invalid. (sg_desc.context.gl.default_framebuffer_cb isn't called at the start of an offscreen pass)-> crash in _SG_GL_CHECK_ERROR()