Upgrade to 3.6, nothing renders

HI all,

I’ve got a game that I’ve been working on for a while (since some version of XNA :stuck_out_tongue:).
I was having a problem with my Xbox One controller not working on a new computer and decided to upgrade from 3.5 to 3.6.
While this has seemed to fix the controller problem, it has completely broken all rendering.

The game isn’t too complex graphically; it’s a 2D game, 99.99% sprite based. I use one 3D model (literally just a multi faceted quad) and one shader.
But after the upgrade nothing renders.
I’ve cut down the main draw function to just do a clear and render one sprite in the top right corner. The screen clears to the color specified, but no sprite does.

I’ve re-built all the assets, so that shouldn’t be a problem.
And I’m loading all the textures though content.Load<Texture2D>("dir/asset") calls.

Any thoughts?


in your main game file, at the beginning make sure you have

        graphics.GraphicsProfile = GraphicsProfile.HiDef;


That may help, it did for several others with custom shaders.

Thanks for that.
I came across that somewhere and implemented it .

I just tried turning it off and disabling loading all the shaders, it still doesn’t render anything.

well it’s hard to diagnose this problem, since I don’t think it is a common one.

If you create a new project, does it render stuff? A simple sprite?

That’s the next step.

Edit: Just did it. Works perfectly. Looks like I do something stupid somewhere in my code.
Will do some more debugging after work and update.

Turns out he problem was setting GraphicsDeviceManager.PreferMultiSampling to true.

Uncomment that and it all works!

well, but that is not desirable, you would want to have that turned on in some cases.

Are you using DirectX?

I’d say so.
Honestly, the project I’m working out of might have been made in 3.3 or earlier :stuck_out_tongue:

There are some aliased lines in the game.
So I might have to look into OGL at some point for desktop.
Or wait for it to be fixed (and then forget to re-enable it ;))

well i was asking because i only work with directx and i have no problems whatsoever with Multisampling, so that’s strange. Hmm.

@Jjagg any idea? Sounds like the resolve may have a problem, right?

Yeah, that’s a pretty bad bug that made it into 3.6. There’s some other posts about it too. @kosmonautgames if you didn’t run into this issue it’s likely because your GPU supports a multi sample count of 32. I imagine you have a pretty decent GPU :stuck_out_tongue:

The problem was MonoGame didn’t know the limit of supported ms count when creating the first device, so it went with 32 as an upper limit. That didn’t get clamped before actually setting the ms count, but d3d crashes when you give it a ms count that’s too high. A PR that fixes the issue is up (I don’t think it’s been merged yet), some stuff had to be moved around so MG knows what’s supported in time.
DesktopGL is even worse because of how OpenGL works. We need to know ms count when creating the window and we need to recreate the window when it changes. Same for depth. I have an idea of how to fix it though. It’s not that easy to keep the design nice with these different requirements for different platforms.

Sorry for ranting :stuck_out_tongue:

1 Like

edit: nvm, funny bug though, a bit ludicrous to assume 32 :stuck_out_tongue: