@MasterQuestMaster wrote:
So, I have my Windows Monogame Direct X project with not much going on.
I'm just drawing some sprites and I have implemented some UI elements with the nice Empty Keys library.Everytime I minimize the game window and re-open it, the screen becomes the default cornflowe blue color and it doesn't change back.
This is the code in my Draw method:
GraphicsDevice.Clear(Color.CornflowerBlue); //Empty Keys stuff this.root.Draw(gameTime.ElapsedGameTime.TotalMilliseconds); this.spriteBatch.Begin(); Vector2 cardPosition = new Vector2(400, 50); this.spriteBatch.Draw(texture: this.testCard, position: cardPosition, scale: new Vector2(0.5f)); //Rectangles Vector2 stageLayoutOrigin = this.stageLayout.Bounds.Center.ToVector2(); Vector2 playAreaOrigin = this.playArea.Center.ToVector2(); this.spriteBatch.Draw(texture: this.stageLayout, position: playAreaOrigin , origin: stageLayoutOrigin, color: Color.White); this.spriteBatch.End(); base.Draw(gameTime);
I'm using a Nividia GeForce graphics card and Monogame 3.5.
I have confirmed that this does not happen if I create a new blank MonoGame Windows project and draw a picture there.
Edit:
I also use the PreparingDeviceSettings event for settings:private void Graphics_PreparingDeviceSettings(object sender, PreparingDeviceSettingsEventArgs e) { this.graphics.PreferMultiSampling = true; this.graphics.GraphicsProfile = GraphicsProfile.HiDef; this.graphics.SynchronizeWithVerticalRetrace = true; this.graphics.PreferredDepthStencilFormat = DepthFormat.Depth24Stencil8; e.GraphicsDeviceInformation.PresentationParameters.MultiSampleCount = 16; }
Posts: 8
Participants: 3