Gideros can target iOS Metal engine instead of OpenGL since 2019.2, and enabling it was made easier in 2019.4, but it is still beta because largely untested. I am opening this thread to collect bug reports regarding Metal support, so that we can make it solid before it becomes a requirement.
Everyone who target iOS should have a go at Metal for testing. Please report here what happens!
Adding my own crash report, for the record: -[MTLDebugRenderCommandEncoder setScissorRect:]:2682: failed assertion `(rect.x(110) + rect.width(642))(752) must be <= render pass width(750)' Obviously Metal is more strict than OpenGL. This one is related to setClip()
I noticed a small bug on iOS+Metal in which some of the text was transparent when it shouldn't be. It's like you have 2 children of the same parent Sprite and set 1 child's alpha and it affects the other child's alpha. I need to get a small demo to prove this...
Hi. Everything seems OK on my iPad but fails on the simulators in XCode.
After looking around the web it appears that Metal can't run on the simulators and it doesn't look like it will anytime soon, despite the fact that Apple is going to deprecate Open GL [Big Clap for Apple!].
Is there a boolean anywhere that we can set to run on Open GL, or is Open GL no longer supported by Gideros? It seems to default to metal.
Really, I just wanted to work out how to deal with the notch properly. I suppose I could always revert to an older version of Gideros and do another build, but is there an easier way? Thanks
Edit: I just found the checkbox "Enable Metal" under the require plugin but it was unticked. However, the crashes in the simulator were all related to Metal.
Actually both metal and OpenGL codes are compiled in gideros even if you don’t tick ‘enable metal’. But if you don’t enable metal, the code related code isn’t called. What kind of error do you get ?
I get these errors when I try to run the app in the Xcode simulators: .../EAGLView.h:33:5: Unknown type name 'CAMetalLayer'; did you mean 'CATextLayer'? .../EAGLView.m:42:17: Unknown receiver 'CAMetalLayer'; did you mean 'CATextLayer'? .../EAGLView.m:52:26: Use of undeclared identifier 'CAMetalLayer'; did you mean 'metalLayer'? .../EAGLView.h:34:8: No type or protocol named 'CAMetalDrawable'
It is only a problem in the XCode simulators. It runs fine on a real device.
Enable metal wasn't ticked.
The simulators can't use Metal (mac hardware) but perhaps the app attempts to use Metal because it thinks it is running on a real device - but I'm just guessing.
Ok, those are compilation errors, meaning that the simulator doesn’t have any metal libs, not even stubs. We could change the tick box to #ifdef metal code instead, that should solve it.
Thanks. That would be great. Apparently the simulators can't use metal at all because it really needs the correct chips and they won't or can't emulate them on desktop. The XCode simulators aren't full emulators.
Is there any simple hack for the current version of Gideros or would I need to do a new build with an old version to check how things look in the iPhone x etc?
If metal is stable on devices, we would still want to use it because of its performance increase and the fact that they are going to deprecate open gl. So if your solution is like a fallback that would be perfect.
> Newcomers roadmap: from where to start learning Gideros "What one programmer can do in one month, two programmers can do in two months." - Fred Brooks “The more you do coding stuff, the better you get at it.” - Aristotle (322 BC)
@NatWobble, I changed EAGLView.m code so that references to non existent functions aren’t compiled in if metal isn’t enabled. Actually metal stubs are there on the simulator, but A few metal support libraries are missing.
I built a new iOS test app via Gideros 2019.5.1 with metal and also without. Without metal everything is fine. When I test the metal version of the app on a real iPhone5S and iPad2Mini I see this below where there is a green line draw under some alpha png border/mask and sprite graphics. The star is normally yellow too but the green line draw nearby makes it appear green. There are some green alpha particles on top too which don't seem to be the cause of the problem. Odd.
@hgy29 Sure, try this test complete with xcode project to illustrate the problem (metal enabled). Works fine if metal disabled when tested on real devices.
@hgy29 You should see this on real device that supports metal with metal flag enabled on export. I tested on iPhone5S and iPad2Mini. Obviously metal is not supported in the xcode simulators.
Thanks. BTW I heard rumors that OpenGL will still be available under iOS13, so we aren't in such a hurry after all. But on IOS13, OpenAL is deprecated too...
No worries, I will publish my next app as non-metal anyway but thought I'd flag this problem up. OpenAL going too tho jeez Hopefully the Gideros donations inbox will get some extra love once all this kicks in, as many of us will need the upgrades to publish and maintain apps on iOS.
Comments
-[MTLDebugRenderCommandEncoder setScissorRect:]:2682: failed assertion `(rect.x(110) + rect.width(642))(752) must be <= render pass width(750)'
Obviously Metal is more strict than OpenGL. This one is related to setClip()
Likes: vitalitymobile, SinisterSoft, Apollo14, MoKaLux
Likes: MobAmuse
https://github.com/gideros/gideros
https://www.youtube.com/c/JohnBlackburn1975
After looking around the web it appears that Metal can't run on the simulators and it doesn't look like it will anytime soon, despite the fact that Apple is going to deprecate Open GL [Big Clap for Apple!].
Is there a boolean anywhere that we can set to run on Open GL, or is Open GL no longer supported by Gideros? It seems to default to metal.
Really, I just wanted to work out how to deal with the notch properly. I suppose I could always revert to an older version of Gideros and do another build, but is there an easier way? Thanks
Edit: I just found the checkbox "Enable Metal" under the require plugin but it was unticked. However, the crashes in the simulator were all related to Metal.
.../EAGLView.h:33:5: Unknown type name 'CAMetalLayer'; did you mean 'CATextLayer'?
.../EAGLView.m:42:17: Unknown receiver 'CAMetalLayer'; did you mean 'CATextLayer'?
.../EAGLView.m:52:26: Use of undeclared identifier 'CAMetalLayer'; did you mean 'metalLayer'?
.../EAGLView.h:34:8: No type or protocol named 'CAMetalDrawable'
It is only a problem in the XCode simulators. It runs fine on a real device.
Enable metal wasn't ticked.
The simulators can't use Metal (mac hardware) but perhaps the app attempts to use Metal because it thinks it is running on a real device - but I'm just guessing.
Is there any simple hack for the current version of Gideros or would I need to do a new build with an old version to check how things look in the iPhone x etc?
If metal is stable on devices, we would still want to use it because of its performance increase and the fact that they are going to deprecate open gl. So if your solution is like a fallback that would be perfect.
Likes: EricCarr
"buying more of their crippled shit" or "buying more of their overpriced crap"
Likes: antix
"What one programmer can do in one month, two programmers can do in two months." - Fred Brooks
“The more you do coding stuff, the better you get at it.” - Aristotle (322 BC)
See EAGLView.h/.m changes in this commit https://github.com/gideros/gideros/commit/dee68f577b6b3e6db8d192fa2794b68cb5fe6d4a
Likes: Apollo14, MoKaLux, MobAmuse
Likes: hgy29, MobAmuse
Likes: MobAmuse
https://www.dropbox.com/s/chclodqphmpuf0r/iOSMetalTest.zip?dl=0
[Edit: archive deleted as now fixed below]
Likes: MoKaLux
Gotta go now but back 2moz.
Likes: MobAmuse, MoKaLux
Likes: MoKaLux
Likes: MoKaLux, MobAmuse, keszegh
Likes: MobAmuse, MoKaLux
Fragmenter - animated loop machine and IKONOMIKON - the memory game
Likes: MoKaLux
Likes: MobAmuse