added groundwork

This commit is contained in:
2025-08-29 22:42:27 +02:00
parent e88fda41b2
commit 318091c337
7 changed files with 103 additions and 0 deletions

View File

@ -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

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding" addBOMForNewFiles="with BOM under Windows, with no BOM otherwise" />
</project>

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="UserContentModel">
<attachedFolders />
<explicitIncludes />
<explicitExcludes />
</component>
</project>

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$/../.." vcs="Git" />
</component>
</project>

View File

@ -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

View File

@ -0,0 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Silk.NET.Input" Version="2.22.0" />
<PackageReference Include="Silk.NET.OpenGL" Version="2.22.0" />
<PackageReference Include="Silk.NET.Windowing" Version="2.22.0" />
</ItemGroup>
</Project>

View File

@ -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.
}
}