Repository navigation
Conversation
0b943b5 to
0a1d393
Compare
|
@ofTheo do we think this level of feature should be 13.0 ? |
0a1d393 to
19dea74
Compare
|
Aquarium timing is in the PR description, and the example sources are on Apple M1 Max, macOS 26.6.2, Xcode 27.0. Outside view, pretty, vsync off, 600 frames after the scene line. Dawn is the WGSL retained-buffer path ( macOS 1024×1024:
iPhone 17 Pro simulator, iOS 26.5,
|
PicturesShort clips from the macOS runs on this Apple M1 Max. Aquarium is 500 fish, outside view, pretty, 1024×1024. The logo bench is one mesh of 20,000 triangles, 1024×768. Each GIF is 16 frames at 10 fps. The files live on Dawn aquarium for this capture logged AquariumOpenGL MetalANGLE Dawn openFrameworks logoOpenGL MetalANGLE Dawn |
Default windows stay desktop OpenGL and iOS GLES. OF_USE_DAWN=1 selects a WebGPU renderer on a CAMetalLayer (ofAppDawnWindow on macOS, ofxiOSDawnView on iOS) and draws the graphicsExample shapes. OF_USE_ANGLE=1 selects iOS MetalANGLE + MGLKit for OpenGL ES 1.1, 2.0, and 3.0. The two flags cannot both be set, and neither library is on the default link line.
OF_USE_ANGLE=1 on the desktop opens an MGLKit window. Dawn draws meshes, images, text, and video frames. The aquarium example keeps a separate WGSL path with retained buffers and one draw per fish. Aquarium image and mesh assets stay out of git; scripts/fetch_assets.py downloads them.
CI builds Release and produces openFrameworkstvOS.a. The template was still linking openFrameworkstvOSDebug.a and Dawn.
356dffd to
2301191
Compare
Dawn and MetalANGLE are no longer in the core libs packages; apothecary publishes them per library and target on its latest-modular release (oF_<lib>_<target>_<arch>[_gcc<N>].tar.bz2, .zip for Visual Studio). - scripts/dev/download_modules.sh: downloads modules for a platform, verifies SHA-256 against the release digests and unpacks them into libs/; Apple installs every Apple target that is published, and modules not built for a platform yet are skipped (--require to fail instead) - download_libs.sh --modules dawn,metalangle (or OF_LIB_MODULES) runs it after the core libs, so the platform scripts take it too - paths: modular packages install per target (lib/macos, lib/ios, lib/tvos) and MetalANGLE as MetalANGLE.xcframework; the core xcconfigs, makefiles and the macOS template's core build script now point there - CI: build-macos-renderers downloads the modules and builds backendBenchExample with OF_USE_DAWN=1 and OF_USE_ANGLE=1












Summary
Adds two opt-in Apple backends. The default window stays desktop OpenGL and iOS GLES, and neither Dawn nor MetalANGLE is on the default link line.
OF_USE_DAWN=1selects WebGPU through Dawn on aCAMetalLayer:ofAppDawnWindowon macOS andofxiOSDawnViewon iOS. The renderer batches meshes, polylines, paths, 3D primitives, images, video frames, bitmap strings, and TrueType strings. Custom shaders and GPU instancing are not part of that renderer.OF_USE_ANGLE=1selects MetalANGLE + MGLKit. iOS runs the same graphicsExample scene on OpenGL ES 1.1, 2.0, and 3.0. macOS opensofAppMGLWindow. The two flags cannot both be 1.OF_USE_ANGLE_OFFICIAL, libEGL + libGLESv2, no MGLKit) was timed on the iOS simulator. That window is a local build and is not in these commits. It cannot be combined withOF_USE_DAWNorOF_USE_ANGLE.examples/gl/aquariumExampleis the WebGL Aquarium scene (one draw per fish). On Dawn that example uses its own WGSL pipelines and retained buffers, not the generic renderer batch.examples/gl/backendBenchExampleis a separate logo stress test (mesh, immediate, and an in-exampleofxShapeBatchRenderer). It is not part of core. Aquarium images and meshes are not in git.examples/gl/aquariumExample/scripts/fetch_assets.pydownloads them.How to enable
macOS make:
macOS Xcode, in
scripts/templates/macos/Project.xcconfig, uncomment one pair:iOS, pass
OF_USE_DAWN=1orOF_USE_ANGLE=1on the xcodebuild command line so the static lib and the app match, and set the appOTHER_LDFLAGSto$(OF_DAWN_LIBS)or$(OF_ANGLE_APP_FRAMEWORKS) $(OF_ANGLE_LIBS).OF_TEST_GLES_VERSIONselects 1, 2, or 3 for ANGLE. RebuildopenFrameworksLibwith the same flag. Do not passOTHER_LDFLAGSon the xcodebuild command line.Dawn and MetalANGLE binaries come from apothecary. This PR does not move the
scripts/apothecarypointer.Test
Host: arm64 Apple M1 Max, macOS 26.6.2, Xcode 27.0 (27A266a).
iOS device: iPhone 17 Pro simulator, iOS 26.5, id
510B19CE-1ECE-4B16-AEE2-8AB232AC2F07. The physical iPad was offline, so the iOS rows are simulator numbers.macOS Dawn
iOS Dawn
apps/templates/ios/Project.xcconfiglink line for this run:1206x2622 @3is that simulator's framebuffer.iOS ANGLE, OpenGL ES 1.1, 2.0, and 3.0
Same project and simulator. Link line:
OF_TEST_GLES_VERSIONwas1, then2, then3. The static lib was rebuilt with the same flag each time.ES 1.1:
ES 2.0 (
OF_TEST_GLES_VERSION=2):ES 3.0 (
OF_TEST_GLES_VERSION=3):Each ANGLE launch also printed the duplicate-class warning for
EAGLContext(the stub in the app and the system OpenGLES framework). The context that came up is the ANGLE Metal line above. Requesting programmable-renderer minor version 1 on the ES 3 context still reportedOpenGL ES 3.0.0.Aquarium
examples/gl/aquariumExample. Outside view, pretty (normal maps and reflection), vsync off, 600 frames timed from theaquarium scenes=line toSHOT. OnedrawElementsper fish. Dawn logspipelines=okanddraws=609at 500 fish,draws=20109at 20,000 fish.macOS, 1024×1024:
Repeat with
make Debug OF_USE_ANGLE=1andmake Debug OF_USE_DAWN=1.ANGLE log:
Dawn log:
The macOS ANGLE and Dawn timing scripts killed the process after
SHOT(rc=-9). That is the harness, not a crash. Dawn skippedofSaveScreen.iOS used the same scene compiled into
apps/templates/iosemptyExample, then the template was restored to GLES.--novsyncdoes not disable the iOS display link, so a result near 59 fps is that cap. GLES ran at point size on the software renderer. MetalANGLE, official ANGLE, and Dawn used the retina drawable. No iOS screenshot was written.7e8009eb2c42, Apple iOS simulator GPUOfficial ANGLE log, same simulator, GLES 3, outside view, pretty, 600 frames:
These framebuffers are not the same size as each other or as the macOS 1024×1024 run.
Pictures
Short clips from the macOS runs on this Apple M1 Max. Aquarium is 500 fish, outside view, pretty, 1024×1024. The logo bench is one mesh of 20,000 triangles, 1024×768. Each GIF is 16 frames at 10 fps. The files live on
danoli3/openFrameworksbranchpr-8577-media, not in this pull request.Dawn aquarium for this capture logged
pipelines=okanddraws=609. MetalANGLE aquarium was OpenGL ES 3.0.0 (ANGLE 2.1.0.ec925142edeb), renderer ANGLE (Metal Renderer: Apple M1 Max).Aquarium
OpenGL
MetalANGLE
Dawn
openFrameworks logo
OpenGL
MetalANGLE
Dawn