Replies: 11 comments 30 replies
-
There is already a PR that integrates with OpenTK. It's not finished yet since I'm currently still suffering from covid repercursions and still need to complete macOS support, but it is already usable for Windows and Linux. While PR is integrating OpenTK in particular, it introduces a generic infrastructure for creating OpenGL contexts and using those to draw to an offscreen surface that is later used by Avalonia's renderer. The build is available as |
Beta Was this translation helpful? Give feedback.
-
Thanks for the quick reply. I have also made the teapot sample work within a new Avalonia MVVM project template. So, maybe OpenGlControlBase would make sense both for rendering and taking the user inputs like picking or camera control. What says you? |
Beta Was this translation helpful? Give feedback.
-
So, for the typical renderer integration features like resize (make the renderer use a different resolution and do not resize the resulting texture, control updates and user input you would still propose offscreen rendering? |
Beta Was this translation helpful? Give feedback.
-
As far as I understand things, OpenGL should not be used for new cross-platform applications. There are two reasons:
Vulkan with MoltenVK would make more sense as you haven't written the renderer yet. |
Beta Was this translation helpful? Give feedback.
-
True. Vulkan will be the future. But when it comes to effort our guys have the feeling that an additional render backend as an alternative to the existing DX11 (using SharpDX) and WebGL should be straight forward for OpenGL whereas for Vulkan may take much longer. Also I would hope we could use SkiaSharp. |
Beta Was this translation helpful? Give feedback.
-
A question about this OpenGL rendering within Avalonia app. I'm looking at integrating MPV media player. Here it recommends using OpenGL Render API to integrate. Would that currently work in Avalonia on all platforms? Any leads or issues to be aware of? |
Beta Was this translation helpful? Give feedback.
-
Oh there's an OpenGL control in Avalonia? Sweet. Any kind of documentation related to it? |
Beta Was this translation helpful? Give feedback.
-
I read in another thread that you guys had previously intended to support generic DXGI surfaces. This would in turn allow images from Direct3D, Vulkan, and most other APIs to be used with varying degrees of difficulty. Is this still part of the plan? |
Beta Was this translation helpful? Give feedback.
-
Is there any update on OpenGL interop for Avalonia 11? I'm specifically looking for OpenTK integration (PR #6391 was apparently abandoned). I found an old sample project (https://github.com/SamboyCoding/OpenTKAvalonia) which does not work with Avalonia 11 due to Compositor, GPUInterop etc. changes. |
Beta Was this translation helpful? Give feedback.
-
Hi, We are using latest AvaloniaUI and ANGLE BR |
Beta Was this translation helpful? Give feedback.
-
Ok Guys I now installed the latest Angle.Windows.Natives Version 2.2.xxx and still Avalonia uses the version 3.0 what do we need to modify to use the latest ? |
Beta Was this translation helpful? Give feedback.
-
Before I start: I had posted a similar question about DirectX here. But this time it is about integration with OpenGL.
We are considering to use Avalonia within our .NET 5 based framework. We have our own 3D renderer which currently has a DirectX 11 backend but will be equipped with an additional OpenGL backend. This renderer is currently integrated into WPF. Because WPF is DirectX 9 based, the only option to make our renderer work 100% correct within WPF (unfortunately), was to draw the rendered texture into a Windows Forms surface and use a WindowsFormsHost within WPF tree.
I wonder whether this could be avoided using Avalonia. It would be beneficial to be able to integrate the rendered OpenGL texture directly into an Avalonia UI scene graph node.
This is targeting Windows and Linux as as the OS platform.
Beta Was this translation helpful? Give feedback.
All reactions