|
|
@ -3,7 +3,7 @@ using System; |
|
|
|
|
|
|
|
namespace SemiColinGames { |
|
|
|
|
|
|
|
public class OpenGLDisplay : IDisplay { |
|
|
|
public class DesktopGLDisplay : IDisplay { |
|
|
|
private GameWindow window; |
|
|
|
private GraphicsDeviceManager graphics; |
|
|
|
|
|
|
@ -15,7 +15,7 @@ namespace SemiColinGames { |
|
|
|
|
|
|
|
public void SetFullScreen(bool fullScreen) { |
|
|
|
if (fullScreen) { |
|
|
|
// In OpenGL, we misappropriate "fullscreen" to be "the settings good for recording
|
|
|
|
// In DesktopGL, we misappropriate "fullscreen" to be "the settings good for recording
|
|
|
|
// gameplay GIFs".
|
|
|
|
window.IsBorderless = true; |
|
|
|
// graphics.PreferredBackBufferWidth = 720;
|
|
|
@ -35,11 +35,11 @@ namespace SemiColinGames { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
public static class OpenGLProgram { |
|
|
|
public static class DesktopGLProgram { |
|
|
|
[STAThread] |
|
|
|
static void Main() { |
|
|
|
using (var game = new SneakGame()) { |
|
|
|
game.Services.AddService(typeof(IDisplay), new OpenGLDisplay()); |
|
|
|
game.Services.AddService(typeof(IDisplay), new DesktopGLDisplay()); |
|
|
|
game.Run(); |
|
|
|
} |
|
|
|
} |