added groundwork
This commit is contained in:
13
src/EngineSharp.Core/.idea/.idea.EngineSharp.Core/.idea/.gitignore
generated
vendored
Normal file
13
src/EngineSharp.Core/.idea/.idea.EngineSharp.Core/.idea/.gitignore
generated
vendored
Normal 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
|
4
src/EngineSharp.Core/.idea/.idea.EngineSharp.Core/.idea/encodings.xml
generated
Normal file
4
src/EngineSharp.Core/.idea/.idea.EngineSharp.Core/.idea/encodings.xml
generated
Normal 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>
|
8
src/EngineSharp.Core/.idea/.idea.EngineSharp.Core/.idea/indexLayout.xml
generated
Normal file
8
src/EngineSharp.Core/.idea/.idea.EngineSharp.Core/.idea/indexLayout.xml
generated
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="UserContentModel">
|
||||||
|
<attachedFolders />
|
||||||
|
<explicitIncludes />
|
||||||
|
<explicitExcludes />
|
||||||
|
</component>
|
||||||
|
</project>
|
6
src/EngineSharp.Core/.idea/.idea.EngineSharp.Core/.idea/vcs.xml
generated
Normal file
6
src/EngineSharp.Core/.idea/.idea.EngineSharp.Core/.idea/vcs.xml
generated
Normal 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>
|
16
src/EngineSharp.Core/EngineSharp.Core.sln
Normal file
16
src/EngineSharp.Core/EngineSharp.Core.sln
Normal 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
|
@ -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>
|
41
src/EngineSharp.Core/EngineSharp.Core/OpenGLEngine.cs
Normal file
41
src/EngineSharp.Core/EngineSharp.Core/OpenGLEngine.cs
Normal 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.
|
||||||
|
}
|
||||||
|
}
|
Reference in New Issue
Block a user