-
Im thinking on porting hobby project to avalonia but already use opentk rather extensively so i would like to avoid using avalonia's opengl surface (using avalonia api for initialization is fine by me but actual Another challenge would be to avoid copying data. I saw very simple example with Extra point: Im thinking would it be possible to have two threads one for avalonia and other for opentk and interop rendering via Thanks in advance for any pointers |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
See for OpenGL rendering example. You can get glGetProcAddress from provided context.Also take a look at https://github.com/AvaloniaUI/Avalonia/blob/6332dfca96430e45cf61a82d28d5765358175d1a/src/Avalonia.OpenGL/Controls/OpenGlControlBase.cs itself since it only uses our public API surface. There are two limitations though:
|
Beta Was this translation helpful? Give feedback.
See
Avalonia/samples/ControlCatalog/Pages/OpenGlPage.xaml.cs
Line 1 in 6332dfc
Also take a look at https://github.com/AvaloniaUI/Avalonia/blob/6332dfca96430e45cf61a82d28d5765358175d1a/src/Avalonia.OpenGL/Controls/OpenGlControlBase.cs itself since it only uses our public API surface.
There are two limitations though:
.With(new Win32PlatformOptions {UseWgl = true}