remove Window namespace

main
cosmonaut 2022-02-25 13:23:31 -08:00
parent edd21ec573
commit 9028a8b1a0
5 changed files with 12 additions and 14 deletions

View File

@ -3,7 +3,6 @@ using SDL2;
using MoonWorks.Audio; using MoonWorks.Audio;
using MoonWorks.Graphics; using MoonWorks.Graphics;
using MoonWorks.Input; using MoonWorks.Input;
using MoonWorks.Window;
using System.Text; using System.Text;
using System; using System;
using System.Diagnostics; using System.Diagnostics;
@ -28,7 +27,7 @@ namespace MoonWorks
private int sleepTimeIndex = 0; private int sleepTimeIndex = 0;
private TimeSpan worstCaseSleepPrecision = TimeSpan.FromMilliseconds(1); private TimeSpan worstCaseSleepPrecision = TimeSpan.FromMilliseconds(1);
public OSWindow Window { get; } public Window Window { get; }
public GraphicsDevice GraphicsDevice { get; } public GraphicsDevice GraphicsDevice { get; }
public AudioDevice AudioDevice { get; } public AudioDevice AudioDevice { get; }
public Inputs Inputs { get; } public Inputs Inputs { get; }
@ -66,7 +65,7 @@ namespace MoonWorks
Inputs = new Inputs(); Inputs = new Inputs();
Window = new OSWindow(windowCreateInfo); Window = new Window(windowCreateInfo);
GraphicsDevice = new GraphicsDevice( GraphicsDevice = new GraphicsDevice(
Window.Handle, Window.Handle,

View File

@ -1,7 +1,6 @@
using System; using System;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using MoonWorks.Math; using MoonWorks.Math;
using MoonWorks.Window;
using RefreshCS; using RefreshCS;
namespace MoonWorks.Graphics namespace MoonWorks.Graphics
@ -659,7 +658,7 @@ namespace MoonWorks.Graphics
public void QueuePresent( public void QueuePresent(
Texture texture, Texture texture,
Filter filter, Filter filter,
OSWindow window Window window
) )
{ {
var refreshTextureSlice = new Refresh.TextureSlice var refreshTextureSlice = new Refresh.TextureSlice
@ -696,7 +695,7 @@ namespace MoonWorks.Graphics
public void QueuePresent( public void QueuePresent(
in TextureSlice textureSlice, in TextureSlice textureSlice,
Filter filter, Filter filter,
OSWindow window Window window
) )
{ {
Refresh.Refresh_QueuePresent( Refresh.Refresh_QueuePresent(
@ -719,7 +718,7 @@ namespace MoonWorks.Graphics
in Texture texture, in Texture texture,
in Rect destinationRectangle, in Rect destinationRectangle,
Filter filter, Filter filter,
OSWindow window Window window
) )
{ {
var refreshRect = destinationRectangle.ToRefresh(); var refreshRect = destinationRectangle.ToRefresh();
@ -758,7 +757,7 @@ namespace MoonWorks.Graphics
in TextureSlice textureSlice, in TextureSlice textureSlice,
in Rect destinationRectangle, in Rect destinationRectangle,
Filter filter, Filter filter,
OSWindow window Window window
) )
{ {
var refreshTextureSlice = textureSlice.ToRefreshTextureSlice(); var refreshTextureSlice = textureSlice.ToRefreshTextureSlice();

View File

@ -1,9 +1,9 @@
using System; using System;
using SDL2; using SDL2;
namespace MoonWorks.Window namespace MoonWorks
{ {
public class OSWindow : IDisposable public class Window : IDisposable
{ {
internal IntPtr Handle { get; } internal IntPtr Handle { get; }
public ScreenMode ScreenMode { get; } public ScreenMode ScreenMode { get; }
@ -12,7 +12,7 @@ namespace MoonWorks.Window
private bool IsDisposed; private bool IsDisposed;
public OSWindow(WindowCreateInfo windowCreateInfo) public Window(WindowCreateInfo windowCreateInfo)
{ {
var windowFlags = SDL.SDL_WindowFlags.SDL_WINDOW_VULKAN; var windowFlags = SDL.SDL_WindowFlags.SDL_WINDOW_VULKAN;
@ -82,7 +82,7 @@ namespace MoonWorks.Window
} }
} }
~OSWindow() ~Window()
{ {
// Do not change this code. Put cleanup code in 'Dispose(bool disposing)' method // Do not change this code. Put cleanup code in 'Dispose(bool disposing)' method
Dispose(disposing: false); Dispose(disposing: false);

View File

@ -1,4 +1,4 @@
namespace MoonWorks.Window namespace MoonWorks
{ {
public enum ScreenMode public enum ScreenMode
{ {

View File

@ -1,4 +1,4 @@
namespace MoonWorks.Window namespace MoonWorks
{ {
public struct WindowCreateInfo public struct WindowCreateInfo
{ {