question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

OpenGlControlBase not rendering

See original GitHub issue

Describe 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

  1. Compile ControlCatalog.(Desktop/NetCore) on windows
  2. Run it
  3. 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

Capture

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:closed
  • Created 3 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
kekekekscommented, Feb 9, 2021

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.

0reactions
kekekekscommented, Feb 9, 2021

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Help with SkiaSharp rendering in an AvaloniaUI control
I want to do some SkiaSharp rendering in an AvalonaiUI control. I found this StackOverflow answer that suggested using OpenGlControlBase ...
Read more >
How do I integrate an external OpenGL render loop into my ...
The library I'm working with (Mupen64Plus) does not work like this. Instead, it requires the GUI to provide for its own render loop....
Read more >
Embed MonoGame inside an AvaloniaUI control.
WpfCore to render my game in a WPF app and I'd like to do the same in ... OpenGlControlBase as seen in this...
Read more >
OpenGL not rendering on macOS Mojave
I disassembled Apple's frameworks and found out that they have changed how OpenGL rendering works on Mojave.
Read more >
Help with SkiaSharp rendering in an AvaloniaUI control
I want to do some SkiaSharp rendering in an AvalonaiUI control. I found this StackOverflow answer that suggested using OpenGlControlBase, with ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found