Skip to content

How to interop with opentk via RenderTargetBitmap #5473

Answered by kekekeks
BreyerW asked this question in Q&A
Discussion options

You must be logged in to vote

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:

  1. on Windows you need to add .With(new Win32PlatformOptions {UseWgl = true}
  2. there is some bug with DPI support that I haven't investigated yet

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@BreyerW
Comment options

@kekekeks
Comment options

@BreyerW
Comment options

Answer selected by BreyerW
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants