diff --git a/src/EngineSharp.Core/.idea/.idea.EngineSharp.Core/.idea/.gitignore b/src/EngineSharp.Core/.idea/.idea.EngineSharp.Core/.idea/.gitignore new file mode 100644 index 0000000..27b73b9 --- /dev/null +++ b/src/EngineSharp.Core/.idea/.idea.EngineSharp.Core/.idea/.gitignore @@ -0,0 +1,13 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Rider ignored files +/contentModel.xml +/projectSettingsUpdater.xml +/modules.xml +/.idea.EngineSharp.Core.iml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/src/EngineSharp.Core/.idea/.idea.EngineSharp.Core/.idea/encodings.xml b/src/EngineSharp.Core/.idea/.idea.EngineSharp.Core/.idea/encodings.xml new file mode 100644 index 0000000..df87cf9 --- /dev/null +++ b/src/EngineSharp.Core/.idea/.idea.EngineSharp.Core/.idea/encodings.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/src/EngineSharp.Core/.idea/.idea.EngineSharp.Core/.idea/indexLayout.xml b/src/EngineSharp.Core/.idea/.idea.EngineSharp.Core/.idea/indexLayout.xml new file mode 100644 index 0000000..7b08163 --- /dev/null +++ b/src/EngineSharp.Core/.idea/.idea.EngineSharp.Core/.idea/indexLayout.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/src/EngineSharp.Core/.idea/.idea.EngineSharp.Core/.idea/vcs.xml b/src/EngineSharp.Core/.idea/.idea.EngineSharp.Core/.idea/vcs.xml new file mode 100644 index 0000000..b2bdec2 --- /dev/null +++ b/src/EngineSharp.Core/.idea/.idea.EngineSharp.Core/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/src/EngineSharp.Core/EngineSharp.Core.sln b/src/EngineSharp.Core/EngineSharp.Core.sln new file mode 100644 index 0000000..795a9dd --- /dev/null +++ b/src/EngineSharp.Core/EngineSharp.Core.sln @@ -0,0 +1,16 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EngineSharp.Core", "EngineSharp.Core\EngineSharp.Core.csproj", "{A617B903-6114-448A-864F-17B157C58C53}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {A617B903-6114-448A-864F-17B157C58C53}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A617B903-6114-448A-864F-17B157C58C53}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A617B903-6114-448A-864F-17B157C58C53}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A617B903-6114-448A-864F-17B157C58C53}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/src/EngineSharp.Core/EngineSharp.Core/EngineSharp.Core.csproj b/src/EngineSharp.Core/EngineSharp.Core/EngineSharp.Core.csproj new file mode 100644 index 0000000..c81548c --- /dev/null +++ b/src/EngineSharp.Core/EngineSharp.Core/EngineSharp.Core.csproj @@ -0,0 +1,15 @@ + + + + net9.0 + enable + enable + + + + + + + + + diff --git a/src/EngineSharp.Core/EngineSharp.Core/OpenGLEngine.cs b/src/EngineSharp.Core/EngineSharp.Core/OpenGLEngine.cs new file mode 100644 index 0000000..517e63c --- /dev/null +++ b/src/EngineSharp.Core/EngineSharp.Core/OpenGLEngine.cs @@ -0,0 +1,41 @@ +using Silk.NET.Windowing; + +namespace EngineSharp.Core; + +public interface IEngine +{ + void Start(); +} + +public class OpenGLEngine : IEngine +{ + private readonly IWindow _window; + + public OpenGLEngine(WindowOptions windowOptions) + { + _window = Window.Create(windowOptions); + _window.Load += OnLoad; + _window.Update += OnUpdate; + _window.Render += OnRender; + } + + public void Start() + { + _window.Run(); + } + + private void OnLoad() + { + // TODO: Create openGL context etc. + } + + private void OnUpdate(double deltaTime) + { + // TODO: from here call custom code / game logic + } + + private void OnRender(double deltaTime) + { + // TODO: Here render all meshes etc. + } +} \ No newline at end of file