-
I'm trying to find out if there's a way to disable Silk.NET's render loop in order to be able to render on-demand in an application. There is the DoRender() method, which is the entry point that I assume would be used. The problem is that on setting up a window, Silk.NET sets up it's own timer loop which I can't seem to figure out how to bypass. Rationale, I'd like to use Silk.NET for what it is - 3D API bindings - and not for it's implementation of the main loop. Example, I have an abstract windowing and logic implementation that already exists that is designed to plug into a renderer. Unless I'm mistaken Silk.NET expects you to plug your code into it, not vice versa. Any thoughts? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
You probably don't want to use Silk.NET.Windowing then. You can use our OpenGL bindings with your own windowing system, you just need to provide a GetProcAddress method: var gl = GL.GetApi(functionName => myWindowSystem.GetProcAddress(functionName) /* returning nint/IntPtr */); You can also use your own game loop with Silk.NET windowing to an extent, we provide the window.Initialize();
window.Run(() => {
// your code here
});
window.Reset(); But this still has a "loop" controlled by silk, as this is required on some platforms (like iOS). In platforms that do not require control over the loop, Hopefully this helps! |
Beta Was this translation helpful? Give feedback.
You probably don't want to use Silk.NET.Windowing then.
You can use our OpenGL bindings with your own windowing system, you just need to provide a GetProcAddress method:
You can also use your own game loop with Silk.NET windowing to an extent, we provide the
Run
method which can be used like so:But this still has a "loop" controlled by silk, as this is required on some platforms …