souldzin / Fritz

A minimal dev-focused game engine
0 stars 0 forks source link

Research OpenTk NativeWindow #1

Open JackSkylark opened 7 years ago

JackSkylark commented 7 years ago

Currently we are using the GameWindow OpenTK class. It might be more advantageous to build our own game window style class off of the provided NativeWindow class. This could also (in the future) allow for us to build a generic rendering context that could be applied to any API (e.g. DirectX or Vulkan).

souldzin commented 7 years ago

Agree. I was wanting to dive through the source and understand exactly what GameWindow is doing so we can abstract it, but that may be unnecessary.

One alternative is to create our own interface for Window IWindowAdapter which has a WindowOpenTK implementation. That way we can depend on the abstraction and can replace the implementation easily.

If we do this, we will probably need to have an adapter for GL as well...