opentk / GLWpfControl

A fast native control for OpenTK 4.x + 3.x on WPF.
MIT License
181 stars 43 forks source link

Graphics Context #121

Closed drb4637 closed 1 day ago

drb4637 commented 5 months ago

Hi My application has a few different graphics contexts and I noticed after switching context the glwpf control stops updating. Adding a check inside GLWpfControlRenderer.Render to make sure that the graphics context is current fixes the issue but I was wondering if there was a better way to handle multiple contexts?

NogginBops commented 2 months ago

What version of GLWpfControl are you using? Could you describe your issue in more detail?

How does the updates stop? Does the render function stop being called?

NogginBops commented 2 days ago

Changing the thread the GLWpfControls context is current on is going to be pretty problematic as you can't really synchronize when to make it current on the rendering thread. With #86 you are able to setup context sharing between contexts which is likely a better solution.

drb4637 commented 1 day ago

Hi, sorry for the delayed response. Yea the context sharing seems to fix my issue. Also nice you got MSAA working, gone are the days of bliting the frame buffer :D

NogginBops commented 1 day ago

Good to hear! I'll close this issue then. :)