We have a game that has already been launched for a while, and that currently runs normally on Windows and Linux:
store.steampowered.com/app/389170/Songs_for_a_Hero__A_Lenda_do_Heri/
But when running on MacOS, it only displays a black screen, despite textures loading successfully, audio playing in the background and it responding to input.
The game renders using the DESKTOPGL graphics pipeline of monogame. While trying to figure out why this is happening, we saved the contents of the render target to an image to see if it was being drawn correctly. It shows the image of the game perfectly, but still, it seems it never ends up on the screen. Calling GraphicsDevice.Clear(Color.red)
still yields a black screen too.
For context, this is our draw loop:
protected override void Draw(GameTime gameTime)
{
//This is responsable to fill the render textures, and it does it without any problems
SceneManager.Draw(SpriteBatch);
GraphicsDevice.SetRenderTarget(null);
GraphicsDevice.Clear(Color.Red);
SpriteBatch.Begin(SpriteSortMode.Deferred, null, SamplerState.PointClamp, null, null, null, Resolution.GetTransformationMatrix());
Resolution.BeginDraw();
SpriteBatch.Draw(FinalRenderTarget, Vector2.Zero, Color.White);
SpriteBatch.Draw(HudRenderTarget, Vector2.Zero, Color.White);
SpriteBatch.End();
base.Draw(gameTime);
}
We tried updating the libs and dependencies that monogame and desktopgl need for MacOS, but to no avail. We also tried compiling the latest version of SDL to MacOS, since it seemed the black screen issue was reported in some boards as a problem with SDL.
This started happening sometime after we upgraded from monogame 3.5 to 3.7.1. Previously, the game displayed correctly on Mac and Linux.
At this moment, we are running out of ideas of why it is not showing up on screen, so we’re looking for help from someone more experienced or that has run into this issue.