When creating a GL render target texture with mipmaps, GL_TEXTURE_MAX_LEVEL must be initialized, otherwise trying to render into mipmap levels other then 0 results in an incomplete framebuffer.
(apparently calling glTexImage2D() with a null data ptr doesn't actually reserve storage for that mip level)
Just putting part of https://github.com/floooh/sokol/issues/912 into a new ticket:
When creating a GL render target texture with mipmaps, GL_TEXTURE_MAX_LEVEL must be initialized, otherwise trying to render into mipmap levels other then 0 results in an incomplete framebuffer.
(apparently calling glTexImage2D() with a null data ptr doesn't actually reserve storage for that mip level)