-
-
Notifications
You must be signed in to change notification settings - Fork 378
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* AOT Support? * Renames * Register Windowing platforms with input platforms * Remove the need to disable first-party loading * Move WindowOptions defaults to static ctor * Cleanup * Style * Rollback Version changes * Multi-Target Silk.NET.Core to .Net Core 3.0 * Remove NET5_0 were unneeded * SdlInput.RegisterWindow -> SdlInput.RegisterPlatform * Refactor Window options to guarantee valid defaults * netcoreapp3.0 -> netcoreapp3.1 * Add extra restore to SilkTouch * Fix SilkTouch targetting issue * Fix Typo * Complete netcoreapp3.0 -> netcoreapp3.1 * ass -> asm * Fix SilkTouch NuGet * EnableSourceLink -> SilkEnableSourceLink
- Loading branch information
1 parent
9d5bfc0
commit cde61b6
Showing
51 changed files
with
962 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// This file is part of Silk.NET. | ||
// | ||
// You may modify and distribute Silk.NET under the terms | ||
// of the MIT license. See the LICENSE file for details. | ||
|
||
using Silk.NET.Windowing; | ||
using Silk.NET.Windowing.Glfw; | ||
|
||
namespace Silk.NET.Input.Glfw | ||
{ | ||
public static class GlfwInput | ||
{ | ||
public static void RegisterPlatform() | ||
{ | ||
Window.Add(new GlfwPlatform()); | ||
InputWindowExtensions.Add(new GlfwInputPlatform()); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// This file is part of Silk.NET. | ||
// | ||
// You may modify and distribute Silk.NET under the terms | ||
// of the MIT license. See the LICENSE file for details. | ||
|
||
using Silk.NET.Windowing; | ||
using Silk.NET.Windowing.Sdl; | ||
|
||
namespace Silk.NET.Input.Sdl | ||
{ | ||
public static class SdlInput | ||
{ | ||
public static void RegisterPlatform() | ||
{ | ||
Window.Add(new SdlPlatform()); | ||
InputWindowExtensions.Add(new SdlInputPlatform()); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
using Silk.NET.OpenGL; | ||
using System; | ||
|
||
namespace Tutorial | ||
{ | ||
public class BufferObject<TDataType> : IDisposable | ||
where TDataType : unmanaged | ||
{ | ||
private uint _handle; | ||
private BufferTargetARB _bufferType; | ||
private GL _gl; | ||
|
||
public unsafe BufferObject(GL gl, Span<TDataType> data, BufferTargetARB bufferType) | ||
{ | ||
_gl = gl; | ||
_bufferType = bufferType; | ||
|
||
_handle = _gl.GenBuffer(); | ||
Bind(); | ||
fixed (void* d = data) | ||
{ | ||
_gl.BufferData(bufferType, (UIntPtr)(data.Length * sizeof(TDataType)), d, BufferUsageARB.StaticDraw); | ||
} | ||
} | ||
|
||
public void Bind() | ||
{ | ||
_gl.BindBuffer(_bufferType, _handle); | ||
} | ||
|
||
public void Dispose() | ||
{ | ||
_gl.DeleteBuffer(_handle); | ||
} | ||
} | ||
} |
Oops, something went wrong.