Skip to content

Commit

Permalink
Adjust README fixes #16
Browse files Browse the repository at this point in the history
  • Loading branch information
deccer committed Aug 6, 2023
1 parent 71360af commit acb3150
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,28 @@ It tries to hide the ugliness of the global state machine that is OpenGL.

## Getting Started

It is a little cumbersome, but bare with me.

Create two projects

- `YourProject` as a console project
- `YourProject.Assets` as a class library project
- `YourProject.Assets` as a class library project (your IDE might have created a `Class1.cs` file, you can delete that safely)
---

- Add `YourProject.Assets` as a project reference to `YourProject`.
- Copy `Fonts` directory from [here](https://github.com/deccer/EngineKit/tree/main/examples/ForwardRendering/ForwardRendering.Assets) into `YourProject.Assets` (i am working on a neater solution)
- Add `EngineKit` to `YourProject` via nuget as a usual package.
- We also need a few other packages:
- `Microsoft.Extensions.Configuration` - handle configuration in general
- `Microsoft.Extensions.Configuration.Json` - to load appsettings.json
- `Microsoft.Extensions.Options.ConfigurationExtensions` - to turn sections of the configuration into usable objects
- `Microsoft.Extensions.DependencyInjection` - that's the dependency injection container we use here
- `Serilog.Sinks.Console` - to print log statement to the console
- `Serilog.Settings.Configuration` - an adapter for serilog to get its configuration from our configuration object
- Create an `appsettings.json` in `YourProject` which should like like [this](https://github.com/deccer/EngineKit/blob/main/examples/ForwardRendering/ForwardRendering/appsettings.json) one.
- Make sure to have it copied when its newer by right clicking it -> Properties -> "Copy to output directory" -> "Copy if newer"
---
- Create a class `YourProjectApplication` in `YourProject` and let it derive from `GraphicsApplication` (let your IDE implement the ctor)
- Create a class `YourProjectApplication` in `YourProject` and let it derive from `GraphicsApplication` (let your IDE implement the constructor, if you cannot figure it out look at [this constructor for inspiration](https://github.com/deccer/EngineKit/blob/main/examples/ForwardRendering/ForwardRendering/ForwardRendererApplication.cs#L69C26-L69C26))
- `Program.cs` of `YourProject` should look like
```cs
using EngineKit;
Expand Down

0 comments on commit acb3150

Please sign in to comment.