Skip to content

Conversation

PatTheMav
Copy link
Member

Description

Adds an explicit check for the OpenGL renderer in the current render function to set the special rect effect only for that renderer.

Motivation and Context

Metal does not require the "rect" effect and can use the default effect just like D3D11.

This change does not negatively affect OBS Studio running with OpenGL as its renderer, but unlocks use of browser sources for the Metal renderer.

How Has This Been Tested?

Tested on macOS 15.

Types of changes

  • Tweak (non-breaking change to improve existing functionality)

Checklist:

  • My code has been run through clang-format.
  • I have read the contributing document.
  • My code is not on the master branch.
  • The code has been tested.
  • All commit messages are properly formatted and commits squashed where appropriate.
  • I have included updates to all appropriate documentation.

Metal does not require the "rect" effect and can use the default
effect just like D3D11.
Copy link
Member

@RytoEX RytoEX left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine.

Copy link
Member

@RytoEX RytoEX left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still approved, just commenting on the placement/timing of gs_get_device_type().

@RytoEX RytoEX merged commit e5f0dbf into obsproject:master Aug 20, 2025
1 check passed
@PatTheMav PatTheMav deleted the metal-render-update branch August 20, 2025 22:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants