-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
iOS Metal ANGLE Prototype #6981
base: master
Are you sure you want to change the base?
Conversation
fixed bugs about casting (SoundOutputStream *)soundInputStream).delegate
…l section of ofConstants.h
Wow, very cool! |
iOS 16.0 + now Renders the openFrameworks (and all other) Open GL ES 2.0/ OpenGL ES 3.0) Contexts directly in a OS Level version of ANGLE - which is unfortunately leading to Garbage collector / maxing out of VBO / Mesh and Textures with base oF datastructure use. It is likely there is some leaks of GL objects in the ProgrammableRenderer that are not contained and within the scope of a Metal or Vulkan or Directx12 wrapper these leaks fill up the GPU buffers and texture memory leading to stalls / hitches and the Graphics card fighting to allocate / release required amounts per draw. I've seen the same symptom in many Unity Projects in the past that were basically impossible to release due to these bugs, when same project the Open GL ES output was fine (mostly gl devs got away with a lot due to glFlush()) - and the same rendering on Metal would lead to 30 fps or 10 -15fps under after a set duration of the game/app running (or once the memory or vertex position arrays were filled). Fixes I applied in those projects were fixing leaking temporary textures and vbos allowing Metal rendering to be - so we need to look into this. ofVboMesh / Mesh seems to be a leak oF iOS Performance as is: It will all still render and work: however overtime the buffer leaks will peak from avg rendering time of 1ms up to 16 ms with many 32 ms hitches (on latest iPhone 14 Pro) yep- that target should be 8ms as well METALKit using this MGLKit Angle wrapper for us I'll recommended for all projects since control is given directly back to us the engine developers to release / allocate critical data structures such as buffers / textures rather than it potentially be an issue at Apple's / Kronos (which it could be for iOS 16) I'll be further investigating and pushing some fixes |
issues still getting the storyboard to register as the type to instantiate the context
Yes the examples I am basing a lot of my conversion for iOS supports macOS, Catalyst, tvOS, iOS - all from pure OpenGL / OpenGL ES 1.0/OpenGL ES 2.0/OpenGL ES 3.0 It's very very stable and yeah Apple now even using it at OS level in some fashion for iOS and for Ventura ! You can see this in the Xcode Profiler |
Should probably merge this... it really fixed all the hitches |
* ios_fixes: ofxiOSVideoPlayer Fix iOS Extras Fixes iOS Fix Video Player
* commit '92bb06eeccee8bc5a09198f3706d62c5e4f4272c': (26 commits) Further Metal Developments for iOS oF Temp Fixes Metal Developments iOS Metal Renderer working Metal add TODO about delegates and protocols replace id type to instancetype on initXXX methods remove ARC feature test from tvos implementation files remove ARC feature test from implementation, add it to env conditional section of ofConstants.h resolve confilict to current master fix include guard update to remove flag disable ARC on pbxproj update to ARC (tvOS) update to ARC update to ARC (simple updates) update to ARC, change: hold delegate because MKMapView doesn't hold it. update to ARC (simple updates) update to ARC, strict check selector comment out unneeded substitute update to ARC code ... # Conflicts: # addons/ofxiOS/src/app/ofAppiOSWindow.h # addons/ofxiOS/src/core/ofxiOSAppDelegate.mm # addons/ofxiOS/src/core/ofxiOSGLKViewController.h # addons/ofxiOS/src/sound/ofxiOSSoundPlayer.mm # addons/ofxiOS/src/sound/ofxiOSSoundStream.mm # addons/ofxiOS/src/sound/ofxiOSSoundStreamDelegate.h # addons/ofxiOS/src/utils/ofxiOSCoreLocation.mm # addons/ofxiOS/src/utils/ofxiOSCoreMotion.mm # addons/ofxiOS/src/utils/ofxiOSExtras.mm # addons/ofxiOS/src/video/AVFoundationVideoPlayer.m # addons/ofxiOS/src/video/ofxiOSVideoPlayer.mm # libs/openFrameworks/app/ofAppGLFWWindow.cpp # libs/openFrameworks/gl/ofGLProgrammableRenderer.cpp # libs/openFrameworks/graphics/ofTrueTypeFont.h # libs/openFrameworks/utils/ofConstants.h # libs/openFrameworks/utils/ofSystemUtils.cpp # libs/openFrameworksCompiled/project/ios/CoreOF.xcconfig # libs/openFrameworksCompiled/project/ios/Debug.xcconfig # libs/openFrameworksCompiled/project/ios/Shared.xcconfig # libs/openFrameworksCompiled/project/ios/iOS+OFLib.xcodeproj/project.pbxproj # libs/openFrameworksCompiled/project/osx/CoreOF.xcconfig # libs/openFrameworksCompiled/project/osx/config.osx.default.mk # libs/openFrameworksCompiled/project/tvOS/CoreOF.xcconfig # libs/openFrameworksCompiled/project/tvOS/tvOS+OFLib.xcodeproj/project.pbxproj
* commit 'e084543a4be8e062cce7bf755f2264334248b22f': Github Actions update - for master (openframeworks#8188) Update install_dependencies.sh Actions update - nightly (openframeworks#8186) Actions Fix (openframeworks#8185) GitHub Actions update (openframeworks#8183)
iOS Open GLES 2.0 GLKit to MLGKit / MetalKit Wrapper for openFrameworks
WiP : Bleeding edge developments here but for those interested
Automatically converts OpenGL ES 2.0 to Native Metal
Change no code at the openFrameworks level for all Open GL ES calls
Set the main.mm/main.cpp to use METAL_KIT instead of GL_KIT or UI_KIT
Currently setup for iOS. Can be converted to include tvOS and macOS Catalyst in further developments
Could be adapted also for macOS if you use custom renderer instead of GLFW
Metal Framework: Add to /libs/
https://drive.google.com/file/d/10aeY5IbXSyRSRT_jWlarsnxbIbLNlKmL/view?usp=sharing