Fixed Merge
This commit is contained in:
commit
bb030f588b
65 changed files with 917 additions and 1427 deletions
|
|
@ -1,11 +1,13 @@
|
|||
using OpenTK;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using OpenTK;
|
||||
using OpenTK.Graphics;
|
||||
using OpenTK.Input;
|
||||
using SM.Base;
|
||||
using SM.Base.Window;
|
||||
using SM.Game.Controls;
|
||||
using SM2D;
|
||||
using SM2D.Drawing;
|
||||
using SM2D.Pipelines;
|
||||
using SM2D.Scene;
|
||||
using Font = SM.Base.Drawing.Text.Font;
|
||||
using Vector2 = OpenTK.Vector2;
|
||||
|
|
@ -19,48 +21,29 @@ namespace SM_TEST
|
|||
private static GLWindow window;
|
||||
static void Main(string[] args)
|
||||
{
|
||||
font = new Font(@"C:\Windows\Fonts\Arial.ttf")
|
||||
{
|
||||
FontSize = 32
|
||||
};
|
||||
|
||||
Log.SetLogFile(compressionFolder:"logs");
|
||||
|
||||
window = new GLWindow {VSync = VSyncMode.Off};
|
||||
window.ApplySetup(new Window2DSetup() {WorldScale = new Vector2(0,1000)});
|
||||
window.SetRenderPipeline(new TestRenderPipeline());
|
||||
window = new GLWindow();
|
||||
window.ApplySetup(new Window2DSetup());
|
||||
window.SetScene(scene = new Scene());
|
||||
window.RunFixedUpdate(60);
|
||||
window.Load += WindowOnLoad;
|
||||
window.RenderFrame += WindowOnUpdateFrame;
|
||||
scene.Objects.Add(new DrawObject2D());
|
||||
window.UpdateFrame += WindowOnUpdateFrame;
|
||||
window.Run();
|
||||
|
||||
Debug.WriteLine("Window Closed");
|
||||
}
|
||||
|
||||
private static DrawParticles particles;
|
||||
private static void WindowOnUpdateFrame(object sender, FrameEventArgs e)
|
||||
{
|
||||
if (Keyboard.GetState()[Key.R])
|
||||
particles.Trigger();
|
||||
//particles.Paused = Keyboard.GetState()[Key.P];
|
||||
if (SM.Base.Controls.Keyboard.IsDown(Key.F, true))
|
||||
{
|
||||
window.WindowFlags = WindowFlags.ExclusiveFullscreen;
|
||||
window.ChangeFullscreenResolution(DisplayDevice.Default.SelectResolution(1280,720, DisplayDevice.Default.BitsPerPixel, DisplayDevice.Default.RefreshRate));
|
||||
}
|
||||
if (SM.Base.Controls.Keyboard.IsDown(Key.W, true)) window.WindowFlags = WindowFlags.Window;
|
||||
if (SM.Base.Controls.Keyboard.IsDown(Key.B, true)) window.WindowFlags = WindowFlags.BorderlessWindow;
|
||||
|
||||
GameControllerState s1 = new GameController(0).GetState();
|
||||
GameControllerState s2 = new GameController(1).GetState();
|
||||
}
|
||||
|
||||
private static void WindowOnLoad(IGenericWindow window)
|
||||
{
|
||||
scene.ShowAxisHelper = true;
|
||||
//scene.Background.Color = Color4.White;
|
||||
|
||||
DrawObject2D box = new DrawObject2D();
|
||||
scene.Objects.Add(box);
|
||||
|
||||
DrawText text = new DrawText(font, "Test Text");
|
||||
text.Transform.Position.Set(50, 0);
|
||||
text.Transform.Size.Set(2);
|
||||
scene.HUD.Add(text);
|
||||
|
||||
//particles.Trigger();
|
||||
}
|
||||
{ }
|
||||
}
|
||||
}
|
||||
|
|
@ -36,12 +36,6 @@
|
|||
<Reference Include="OpenTK, Version=3.3.1.0, Culture=neutral, PublicKeyToken=bad199fe84eb3df4, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\OpenTK.3.3.1\lib\net20\OpenTK.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="SharpDX, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b4dcf0f35e5521f1, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\SharpDX.4.2.0\lib\net45\SharpDX.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="SharpDX.XInput, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b4dcf0f35e5521f1, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\SharpDX.XInput.4.2.0\lib\net45\SharpDX.XInput.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Drawing" />
|
||||
|
|
@ -56,6 +50,9 @@
|
|||
<None Include="OpenTK.dll.config" />
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<WCFMetadata Include="Connected Services\" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\SMCode\SM.Base\SM.Base.csproj">
|
||||
<Project>{8e733844-4204-43e7-b3dc-3913cddabb0d}</Project>
|
||||
|
|
@ -69,10 +66,6 @@
|
|||
<Project>{a4565538-625a-42c6-a330-dd4f1abb3986}</Project>
|
||||
<Name>SM2D</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\SMOptionals\SM.Game\SM.Game.csproj">
|
||||
<Project>{079bab31-3dc4-40da-90c7-efaa8517c647}</Project>
|
||||
<Name>SM.Game</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
||||
|
|
@ -18,7 +18,7 @@ namespace SM_TEST
|
|||
|
||||
_postBuffer = CreateWindowFramebuffer(0, false, PixelInformation.RGBA_HDR);
|
||||
Framebuffers.Add(_postBuffer);
|
||||
_bloom = new BloomEffect(MainFramebuffer, hdr: true, .5f)
|
||||
_bloom = new BloomEffect(MainFramebuffer, hdr: true, .75f)
|
||||
{
|
||||
Threshold = .5f,
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue