Click here to Skip to main content
13,088,439 members (55,730 online)
Rate this:
Please Sign up or sign in to vote.
See more:
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 22-Apr-13 23:44pm

1 solution

Rate this: bad
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:[^]

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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web04 | 2.8.170813.1 | Last Updated 8 Jul 2014
Copyright © CodeProject, 1999-2017
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