remove Window namespace

pull/16/head
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.Graphics;
using MoonWorks.Input;
using MoonWorks.Window;
using System.Text;
using System;
using System.Diagnostics;
@ -28,7 +27,7 @@ namespace MoonWorks
private int sleepTimeIndex = 0;
private TimeSpan worstCaseSleepPrecision = TimeSpan.FromMilliseconds(1);
public OSWindow Window { get; }
public Window Window { get; }
public GraphicsDevice GraphicsDevice { get; }
public AudioDevice AudioDevice { get; }
public Inputs Inputs { get; }
@ -66,7 +65,7 @@ namespace MoonWorks
Inputs = new Inputs();
Window = new OSWindow(windowCreateInfo);
Window = new Window(windowCreateInfo);
GraphicsDevice = new GraphicsDevice(
Window.Handle,

View File

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

View File

@ -1,9 +1,9 @@
using System;
using SDL2;
namespace MoonWorks.Window
namespace MoonWorks
{
public class OSWindow : IDisposable
public class Window : IDisposable
{
internal IntPtr Handle { get; }
public ScreenMode ScreenMode { get; }
@ -12,7 +12,7 @@ namespace MoonWorks.Window
private bool IsDisposed;
public OSWindow(WindowCreateInfo windowCreateInfo)
public Window(WindowCreateInfo windowCreateInfo)
{
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
Dispose(disposing: false);

View File

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

View File

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