waydabber / BetterDisplay

Unlock your displays on your Mac! Flexible HiDPI scaling, XDR/HDR extra brightness, virtual screens, DDC control, extra dimming, PIP/streaming, EDID override and lots more!
https://betterdisplay.pro
19.64k stars 343 forks source link

Dummy display doesn't work with OBS29 (OpenGL issue at OBS side) #1428

Closed timboxyz closed 1 year ago

timboxyz commented 1 year ago

On V 1.316 I created a dummy display set to 1920x1080 and turned on PIP. This works fine as a 2nd display for OpenLP to check functionality, however, using OBS 29 and selecting the [Full screen Projector(program)] option or the [Multiview Full screen] option and choosing the dummy display results in a black screen. Using a genuine second screen works fine.

Instead of using PIP, I used NDI to capture the dummy screen and view that on the NDI viewer, the behaviour was as above suggesting that the issue is not with the PIP option but the actual dummy display.

This suggests that something about the dummy display is not quite correct and is upsetting OBS. There could of course be an issue with OBS but since it works with other 2nd screens I thought starting from this end was best.

waydabber commented 1 year ago

Hi there,

hmm. I don't recall making any changes regarding dummies in the past few releases as the focus of the development was elsewhere.

Can you try these?

Thank you!

timboxyz commented 1 year ago

Just looked at the OBS current log and when I try and perform the operation I get multiple lines of:-

10:32:42.865: glBindFramebuffer failed, glGetError returned GL_INVALID_FRAMEBUFFER_OPERATION(0x506)

I don't have a version combination that I know for sure worked as I've only just tried doing it having upgraded to the pro version.

I can try rolling back to see if it ever worked with any combination when I get a chance.

waydabber commented 1 year ago

Can you try if it works with a Sidecar display (without BetterDisplay running) just to confirm it is a general OBS issue with virtual displays?

The glBindFramebuffer and GL_INVALID_FRAMEBUFFER_OPERATION suggets that OBS is somewhat outdated and seems to use OpenGL stuff. OpenGL has been deprecated in MacOS for almost 2 years now and Metal was available for several years so apps could transition to that in time. Also, macOS provides two perfectly good APIs from screen capture (a new iteration just released with Ventura - ScreenCaptureKit). I am afraid it's just a matter of time and OBS will need to rewrite this or it will stop working altogether.

https://developer.apple.com/documentation/opengles/1617397-glbindframebuffer?language=objc

Since this seems to be an OS level issue and stems from using outdated APIs, this probably cannot be fixed on BetterDisplay side. I'll move this to discussions maybe somebody has an idea or an alternative suggestion instead of using OBS.