-
-
Notifications
You must be signed in to change notification settings - Fork 397
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
86 additions
and
3 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
47 changes: 47 additions & 0 deletions
47
examples/CSharp/OpenGL Demos/SelfContainedTexturedCube/Program.cs
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,47 @@ | ||
using System.Drawing; | ||
using Silk.NET.Maths; | ||
using Silk.NET.OpenGL; | ||
using Silk.NET.Windowing; | ||
|
||
namespace SelfContainedTexturedCube; | ||
|
||
public class Program | ||
{ | ||
private static IWindow _window; | ||
private static GL _gl; | ||
|
||
public static void Main(string[] args) | ||
{ | ||
WindowOptions options = WindowOptions.Default with | ||
{ | ||
Title = "Self Contained Textured Cube Demo", | ||
Size = new Vector2D<int>(1280, 720) | ||
}; | ||
|
||
_window = Window.Create(options); | ||
_window.Load += Initialize; | ||
_window.Update += Update; | ||
_window.Render += Draw; | ||
|
||
_window.Run(); | ||
|
||
_window.Dispose(); | ||
} | ||
|
||
private static void Initialize() | ||
{ | ||
_gl = _window.CreateOpenGL(); | ||
|
||
_gl.ClearColor(Color.Indigo); | ||
} | ||
|
||
private static void Update(double dt) | ||
{ | ||
|
||
} | ||
|
||
private static void Draw(double dt) | ||
{ | ||
_gl.Clear(ClearBufferMask.ColorBufferBit | ClearBufferMask.DepthBufferBit); | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
examples/CSharp/OpenGL Demos/SelfContainedTexturedCube/SelfContainedTexturedCube.csproj
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 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<OutputType>Exe</OutputType> | ||
<TargetFramework>net7.0</TargetFramework> | ||
<ImplicitUsings>disable</ImplicitUsings> | ||
<Nullable>disable</Nullable> | ||
</PropertyGroup> | ||
|
||
<ItemGroup><!--<ProjectReference Include="..\..\..\..\src\Input\Silk.NET.Input\Silk.NET.Input.csproj" /> | ||
<ProjectReference Include="..\..\..\..\src\OpenGL\Silk.NET.OpenGL\Silk.NET.OpenGL.csproj" /> | ||
<ProjectReference Include="..\..\..\..\src\Windowing\Silk.NET.Windowing\Silk.NET.Windowing.csproj" />--> | ||
|
||
<PackageReference Include="Silk.NET.OpenGL" Version="2.17.1" /> | ||
|
||
<PackageReference Include="Silk.NET.Windowing" Version="2.17.1" /> | ||
</ItemGroup> | ||
|
||
</Project> |