forked from MoonsideGames/MoonWorks
add PresentMode to WindowCreateInfo
parent
b66e077376
commit
dfddc24d0e
|
@ -1,4 +1,4 @@
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using SDL2;
|
using SDL2;
|
||||||
using MoonWorks.Audio;
|
using MoonWorks.Audio;
|
||||||
using MoonWorks.Graphics;
|
using MoonWorks.Graphics;
|
||||||
|
@ -37,7 +37,6 @@ namespace MoonWorks
|
||||||
|
|
||||||
public Game(
|
public Game(
|
||||||
WindowCreateInfo windowCreateInfo,
|
WindowCreateInfo windowCreateInfo,
|
||||||
PresentMode presentMode,
|
|
||||||
FrameLimiterSettings frameLimiterSettings,
|
FrameLimiterSettings frameLimiterSettings,
|
||||||
int targetTimestep = 60,
|
int targetTimestep = 60,
|
||||||
bool debugMode = false
|
bool debugMode = false
|
||||||
|
@ -70,7 +69,7 @@ namespace MoonWorks
|
||||||
|
|
||||||
MainWindow = new Window(windowCreateInfo, GraphicsDevice.WindowFlags);
|
MainWindow = new Window(windowCreateInfo, GraphicsDevice.WindowFlags);
|
||||||
|
|
||||||
if (!GraphicsDevice.ClaimWindow(MainWindow, presentMode))
|
if (!GraphicsDevice.ClaimWindow(MainWindow, windowCreateInfo.PresentMode))
|
||||||
{
|
{
|
||||||
throw new System.SystemException("Could not claim window!");
|
throw new System.SystemException("Could not claim window!");
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,6 @@
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
/* Recreate all the enums in here so we don't need to explicitly
|
namespace MoonWorks
|
||||||
* reference the RefreshCS namespace when using MoonWorks.Graphics
|
|
||||||
*/
|
|
||||||
namespace MoonWorks.Graphics
|
|
||||||
{
|
{
|
||||||
public enum PresentMode
|
public enum PresentMode
|
||||||
{
|
{
|
||||||
|
@ -12,7 +9,13 @@ namespace MoonWorks.Graphics
|
||||||
FIFO,
|
FIFO,
|
||||||
FIFORelaxed
|
FIFORelaxed
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Recreate all the enums in here so we don't need to explicitly
|
||||||
|
* reference the RefreshCS namespace when using MoonWorks.Graphics
|
||||||
|
*/
|
||||||
|
namespace MoonWorks.Graphics
|
||||||
|
{
|
||||||
public enum PrimitiveType
|
public enum PrimitiveType
|
||||||
{
|
{
|
||||||
PointList,
|
PointList,
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using SDL2;
|
using SDL2;
|
||||||
|
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
public uint WindowWidth;
|
public uint WindowWidth;
|
||||||
public uint WindowHeight;
|
public uint WindowHeight;
|
||||||
public ScreenMode ScreenMode;
|
public ScreenMode ScreenMode;
|
||||||
|
public PresentMode PresentMode;
|
||||||
public bool SystemResizable;
|
public bool SystemResizable;
|
||||||
public bool StartMaximized;
|
public bool StartMaximized;
|
||||||
|
|
||||||
|
@ -14,6 +15,7 @@
|
||||||
uint windowWidth,
|
uint windowWidth,
|
||||||
uint windowHeight,
|
uint windowHeight,
|
||||||
ScreenMode screenMode,
|
ScreenMode screenMode,
|
||||||
|
PresentMode presentMode,
|
||||||
bool systemResizable = false,
|
bool systemResizable = false,
|
||||||
bool startMaximized = false
|
bool startMaximized = false
|
||||||
) {
|
) {
|
||||||
|
@ -21,6 +23,7 @@
|
||||||
WindowWidth = windowWidth;
|
WindowWidth = windowWidth;
|
||||||
WindowHeight = windowHeight;
|
WindowHeight = windowHeight;
|
||||||
ScreenMode = screenMode;
|
ScreenMode = screenMode;
|
||||||
|
PresentMode = presentMode;
|
||||||
SystemResizable = systemResizable;
|
SystemResizable = systemResizable;
|
||||||
StartMaximized = startMaximized;
|
StartMaximized = startMaximized;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue