Skip to content

Commit

Permalink
Add a workaround for scopes on macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
ubitux committed Sep 1, 2023
1 parent f68ce13 commit a7eb6d2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions demos.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import array
import platform
from pathlib import Path
from textwrap import dedent

Expand Down Expand Up @@ -448,6 +449,11 @@ def prototype(cfg, bg_file=_IMG_CITY):

@scene(controls=dict(source=scene.File()))
def scopes(cfg, source=_VID_PIPER):
# FIXME this check is not sufficient when cross-building a scene
if platform.system() == "Darwin" and cfg.backend == "opengl":
cfg.aspect_ratio = (1, 1)
return ngl.Text("macOS OpenGL\nimplementation\ndoesn't support\ncompute shaders\n:(", fg_color=(1, 0.3, 0.3))

m = MediaInfo.from_filename(source)
cfg.duration = m.duration
cfg.aspect_ratio = (m.width, m.height)
Expand Down

0 comments on commit a7eb6d2

Please sign in to comment.