Using MonoGameSample from Mishu linked off this topic:
and built it. I’m running it on VS 2013 Community, and running in Emulator 8.1 WVGA 4 inch 512MB.
Despite the phone being in Portrait, the sample comes up in Landscape. Digging in to the graphics class in the draw loop I find:
GraphicsDevice->Adapator->CurrentDisplayMode says 800x600, which is clearly wrong.
Viewport says 800x480, which is the right dimensions for Landscape.
PresentationParameters says BackBuffer is 800x480 and DisplayOrientation is Portrait. For Portrait I’d expect it to say 480x800. The display output of the sample (the beehive and framerate text) is also displaying landscape, so sideways.
This sample has an object in App.xaml, which is the same thing I get when I do a Empty Windows Phone Blank Page template in VS. So I’m not sure about where to put the SupportedDisplayMode info that goes into the objects in other templates.
Next I tried following the directions in the readme of the nuget Monogames 3.2.3-alpha package. I did an empty C# Windows Phone Blank Page template, then installed the Monogames package. This gave me an app with a rotating cube sample object in my draw loop. It’s using direct3D and drawing a spinning cube rotating about the Y axis. But in this case too when I look at all the values in graphics I get BackBuffer and Viewport both reporting Landscape values.
My spritebatch.DrawString, however, which I put after all the 3D drawing, displays correctly across that top of the screen. So that’s an improvement, I am getting portrait display. But what values am I supposed to believe?
Two days of beating my head on this is long enough, so I’m appealing to the experts. What’s the right thing to do? I just want to make a simple 2D sprite animated mobile game.
Thanks,
Rick Saada