OpenGlControlBase not rendering
See original GitHub issueDescribe the bug The OpenGL Page of the ControlCatalog sample does not render anything. I tested the “Desktop” and the “NetCore” variants. Both showing the same behavior. This was tested on my PC with a Radeon RX 560 desktop GPU as well as on another PC with integrated Intel GPU.
On my PC I had the change to debug the sample. I noticed the page constructor is called, but OnOpenGlInit and OnOpenGlRender are not. Knowing that it’s not surprising that nothing is rendered. The question is: why do these functions not get called?
I tried both current master as well as the 0.10 branch. I am not aware of any pre-compiled binaries or I would have tried running those as well.
I know the OpenGL support of GPU drivers on Windows are usually not in great shape. But at least the basics work as I could make the SharpGL tea-pot demo run without problems.
Are there any additional information I can obtain to help solve this problem?
To Reproduce
- Compile ControlCatalog.(Desktop/NetCore) on windows
- Run it
- Select the “OpenGL” sample
Expected behavior
I would expect to see a tea-pot similar to the screencast in https://github.com/AvaloniaUI/Avalonia/pull/3386
Screenshots
Desktop:
- OS: Window 10
- Version 2004
Additional context
- PC 1 GPU: AMD Radeon RX 560 with up to date drivers
- PC 2 GPU: Intel “Iris Pro Graphics 580”
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (5 by maintainers)

Top Related StackOverflow Question
On Windows OpenGL is currently only supported with WGL. Add
.With(new Win32PlatformOptions{UseWgl = true})to your AppBuilder.I’m planning to add proper support for ANGLE-powered OpenGL rendering in 0.10.x branch this Spring.
OpenGL has notoriously bad support on Windows systems due to all these years of promotion of DirectX over OpenGL. So to get better platform coverage we are using ANGLE layer that translates OpenGL calls into DirectX calls.
Unfortunately ANGLE doesn’t really support context sharing, so we’ve disabled it for ANGLE-based renderer.