Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: Mono C# XNA
Hi! I found a lot of similar themes. But have not found a solution to the problem for Linux.
public Game1 ()
{
	graphics = new GraphicsDeviceManager (this);
	graphics.PreferredBackBufferHeight = 600;
	graphics.PreferredBackBufferWidth = 800;
	Content.RootDirectory = "Content";
}
Size does not change. Sometimes changing the camera position, and pictures goes to the side. Can I change the screen resolution the library OpenTK?
Posted 23-Apr-13 0:44am

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

This is a long standing bug that involves (as far as I can tell) OpenTk and MonoGame. Probably the best solution, for the time being, is to set the Window.AllowUserResizing property like so:
public Game1()
{
    graphics = new GraphicsDeviceManager(this);
    Content.RootDirectory = "Content";	            
    
    graphics.PreferredBackBufferWidth = 800;
    graphics.PreferredBackBufferHeight = 800;
    this.Window.AllowUserResizing = true;
}
 
See this GitHub thread for a related discussion:
https://github.com/mono/MonoGame/issues/628[^]
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



Advertise | Privacy | Mobile
Web03 | 2.8.1411022.1 | Last Updated 8 Jul 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100