moonworks ABI update
parent
f7be55f6c6
commit
d8708818cb
|
@ -1 +1 @@
|
||||||
Subproject commit e5213da686fd4700d16a0c627d5f1ab4fce0ee12
|
Subproject commit 9028a8b1a02d1f73be3d8006f72a8a68acccacdf
|
|
@ -1,5 +1,4 @@
|
||||||
using MoonWorks.Graphics;
|
using MoonWorks.Graphics;
|
||||||
using MoonWorks.Window;
|
|
||||||
using MoonWorks;
|
using MoonWorks;
|
||||||
using MoonWorksMultiWindow.Graphics;
|
using MoonWorksMultiWindow.Graphics;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
@ -10,10 +9,7 @@ namespace MoonWorksMultiWindow
|
||||||
{
|
{
|
||||||
private GraphicsObjects GraphicsObjects { get; }
|
private GraphicsObjects GraphicsObjects { get; }
|
||||||
|
|
||||||
private int RenderWidth { get; }
|
private Window ExtraWindow { get; }
|
||||||
private int RenderHeight { get; }
|
|
||||||
|
|
||||||
private OSWindow ExtraWindow { get; }
|
|
||||||
|
|
||||||
public MoonWorksMultiWindowGame(
|
public MoonWorksMultiWindowGame(
|
||||||
WindowCreateInfo windowCreateInfo,
|
WindowCreateInfo windowCreateInfo,
|
||||||
|
@ -27,8 +23,6 @@ namespace MoonWorksMultiWindow
|
||||||
windowCreateInfo.WindowWidth,
|
windowCreateInfo.WindowWidth,
|
||||||
windowCreateInfo.WindowHeight
|
windowCreateInfo.WindowHeight
|
||||||
);
|
);
|
||||||
RenderWidth = (int)windowCreateInfo.WindowWidth;
|
|
||||||
RenderHeight = (int)windowCreateInfo.WindowHeight;
|
|
||||||
|
|
||||||
var extraWindowCreateInfo = new WindowCreateInfo
|
var extraWindowCreateInfo = new WindowCreateInfo
|
||||||
{
|
{
|
||||||
|
@ -38,7 +32,7 @@ namespace MoonWorksMultiWindow
|
||||||
ScreenMode = ScreenMode.Windowed
|
ScreenMode = ScreenMode.Windowed
|
||||||
};
|
};
|
||||||
|
|
||||||
ExtraWindow = new OSWindow(extraWindowCreateInfo);
|
ExtraWindow = new Window(extraWindowCreateInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void Update(System.TimeSpan dt)
|
protected override void Update(System.TimeSpan dt)
|
||||||
|
@ -62,10 +56,10 @@ namespace MoonWorksMultiWindow
|
||||||
commandBuffer.BeginRenderPass(
|
commandBuffer.BeginRenderPass(
|
||||||
new ColorAttachmentInfo
|
new ColorAttachmentInfo
|
||||||
{
|
{
|
||||||
renderTarget = GraphicsObjects.RenderTargets.ExampleRenderTarget,
|
RenderTarget = GraphicsObjects.RenderTargets.ExampleRenderTarget,
|
||||||
clearColor = Color.CornflowerBlue,
|
ClearColor = Color.CornflowerBlue,
|
||||||
loadOp = LoadOp.Clear,
|
LoadOp = LoadOp.Clear,
|
||||||
storeOp = StoreOp.DontCare
|
StoreOp = StoreOp.DontCare
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -87,10 +81,10 @@ namespace MoonWorksMultiWindow
|
||||||
commandBuffer.BeginRenderPass(
|
commandBuffer.BeginRenderPass(
|
||||||
new ColorAttachmentInfo
|
new ColorAttachmentInfo
|
||||||
{
|
{
|
||||||
renderTarget = GraphicsObjects.RenderTargets.ExtraWindowRenderTarget,
|
RenderTarget = GraphicsObjects.RenderTargets.ExtraWindowRenderTarget,
|
||||||
clearColor = Color.OrangeRed,
|
ClearColor = Color.OrangeRed,
|
||||||
loadOp = LoadOp.Clear,
|
LoadOp = LoadOp.Clear,
|
||||||
storeOp = StoreOp.DontCare
|
StoreOp = StoreOp.DontCare
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -2,34 +2,33 @@ using System;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
using MoonWorks;
|
using MoonWorks;
|
||||||
using MoonWorks.Window;
|
|
||||||
|
|
||||||
namespace MoonWorksMultiWindow
|
namespace MoonWorksMultiWindow
|
||||||
{
|
{
|
||||||
class Program
|
class Program
|
||||||
{
|
{
|
||||||
[DllImport("kernel32.dll", CharSet = CharSet.Unicode, SetLastError = true)]
|
[DllImport("kernel32.dll", CharSet = CharSet.Unicode, SetLastError = true)]
|
||||||
[return: MarshalAs(UnmanagedType.Bool)]
|
[return: MarshalAs(UnmanagedType.Bool)]
|
||||||
static extern bool SetDllDirectory(string lpPathName);
|
static extern bool SetDllDirectory(string lpPathName);
|
||||||
|
|
||||||
|
|
||||||
static void Main(string[] args)
|
static void Main(string[] args)
|
||||||
{
|
{
|
||||||
WindowCreateInfo windowCreateInfo = new WindowCreateInfo
|
WindowCreateInfo windowCreateInfo = new WindowCreateInfo
|
||||||
{
|
{
|
||||||
WindowWidth = 1280,
|
WindowWidth = 1280,
|
||||||
WindowHeight = 720,
|
WindowHeight = 720,
|
||||||
WindowTitle = "MoonWorksMultiWindow",
|
WindowTitle = "MoonWorksMultiWindow",
|
||||||
ScreenMode = ScreenMode.Windowed
|
ScreenMode = ScreenMode.Windowed
|
||||||
};
|
};
|
||||||
|
|
||||||
MoonWorksMultiWindowGame game = new MoonWorksMultiWindowGame(
|
MoonWorksMultiWindowGame game = new MoonWorksMultiWindowGame(
|
||||||
windowCreateInfo,
|
windowCreateInfo,
|
||||||
MoonWorks.Graphics.PresentMode.FIFORelaxed,
|
MoonWorks.Graphics.PresentMode.FIFORelaxed,
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
|
|
||||||
game.Run();
|
game.Run();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue