Click here to Skip to main content
15,885,941 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
Hi! I found a lot of similar themes. But have not found a solution to the problem for Linux.
C#
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

1 solution

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:
C#
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[^]
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900