Closed TheSpydog closed 4 years ago
For Metal+D3D11, should we match the GL style here?
https://github.com/FNA-XNA/MojoShader/blob/fna/mojoshader_opengl.c#L2936
What specifically are you referring to? D3D11/Metal are a bit different in that the context functions don't return or receive anything. There's just one global context, so the little ctx / _ctx switcheroo GL does probably isn't necessary here.
We should probably match GL here - it should take a ctx parameter, where it'll automatically set it to current as it's tearing the context down, but at the same time it should either pop the current ctx back (if there was another one set) or set ctx to NULL. Metal/D3D11 currently delete the active context only. (Also, I think Metal is missing MakeContextCurrent?)
This fixes a bug where FNA games that recreate their GraphicsDevice could trigger the assertion on line 345.