Quick Links: Download Gideros Studio | Gideros Documentation | Gideros Development Center | Gideros community chat
Any document available for migrating to Metal? - Gideros Forum

Any document available for migrating to Metal?

XmanXman Member
edited April 24 in General questions
I want to migrating to Metal, I see the Enable Metal support (iOS) in the require plugin and enabled it.
After enable it and do a full export, 3 issues appeared:
1. the warning still exists in Xcode that says OpenGLES is deprecated.Consider migrating to Metal instead.
2. some images become upside-down after enabling it.
3. it just crashed when run in the simulator.

Are there any other operations required?

Comments

  • hgy29hgy29 Maintainer
    Enabling Metal should be enough. It doesn't disable OpenGL though, but allows Gideros to select Metal back end at runtime if it is available.
    About your upside down image issue, can you trace it/ come up with a short piece of code that exhibits the issue ?
  • XmanXman Member
    Then the warning is reasonable and can just be ignored?

    What about the crash in simulator?

    I did several times to export the project with enabled and disabled the metal, and the upside down only happened when enabled. I will provide some useful information after check my code.
  • hgy29hgy29 Maintainer
    I don't know about the crash in the simulator. Actually my Mac doesn't support Metal (it is a very old Mac Mini), so I can't test Metal in the simulator at all
  • XmanXman Member
    the upside down issue happens when I use a RenderTarget to draw an image.
  • hgy29hgy29 Maintainer
    Thanks, there is probably a bug in the Metal backend then. It should be easy to fix, and I'll do it ASAP.
  • XmanXman Member
    edited April 24
    Is it necessary to update the iOS app to metal? Will it be required for App Store in near future?
  • hgy29hgy29 Maintainer
    Ask apple :)
  • XmanXman Member
    :D
    I'm just curious whether metal apps are common in the app store currently.
  • hgy29hgy29 Maintainer
    Frankly I don't know, I wrote the Metal backend because OpenGL was deprecated two years ago, but the industry in general wasn't ready to switch to Metal, so Apple had to keep it longer. I am not sure how Metal is supported today by other popuilar frameworks (Unity in particular), but until it is fully supported by major engines, OpenGL will continue to be available on iOS devices.
  • XmanXman Member
    No matter the metal is enabled or disabled, after removing the OpenGLES.framework, the warning disappeared.
    Is this framework redundant and can be removed safely?
  • XmanXman Member
    For the crash info for simulator:

    iOS[82958:10107956] -[MTLTextureDescriptorInternal validateWithDevice:], line 1414: error 'MTLTextureDescriptor: Depth, Stencil, DepthStencil, and Multisample textures must be allocated with the MTLStorageModePrivate or MTLStorageModeMemoryless storage mode.'
  • hgy29hgy29 Maintainer
    I don't think you can remove the OpenGL framework, even though the app won't use it if metal is selected, gideros calls to opengl are still compiled. Remember that Metal is currently just an experiment, to allow users to check their app is working. Once stable, Gideros will probably remove OpenGL support for iOS.
    I take note about your issue with the simulator, but I have no way of checking the result of a possible fix.
  • XmanXman Member
    edited April 24
    But even metal is not enable, after removing the OpenGLES.framework, it still works. :D
  • trojanfoetrojanfoe Member
    edited April 25
    I have some experience with Metal and to get it working on macOS, iOS and iOS Simulator you will need to use different storage modes for the buffers (because of how the memory is wired-up differently between the CPU and GPU on a Mac or iPhone). This is normally a compile-time constant (by way of TargetConditionals.h), but not sure how to accomplish that with Gideros, as I am just beginning to use it.

    Metal is commonly used on the App Store and all phones since iPhone 6s support it, but I don't see why you would remove OpenGLES anytime soon.

    Unity has provided a Metal backend for a while now.

    Likes: hgy29, MoKaLux

    +1 -1 (+2 / -0 ) Share on Facebook
  • hgy29hgy29 Maintainer
    In the end Apple forced me to invest in a new Mac, since Xcode 11 will be required in order to compile apps for iOS starting next month, and Xcode 11 requires OSX Catalina which is not available on my Mac Mini 2010. I shall receive my brand new Mac Mini 2020 in a month or so, so I'll be able to debug issues with simulator, Metal and whatever new requirements apple set up in the future.
  • keszeghkeszegh Member
    @hgy29 , please test then a bit the double-finger scroll issue on macs i noted in the forum recently (athoug i think it happens on an old mac actually).
  • hgy29hgy29 Maintainer
    @keszegh, how am I supposed to even do a single finger scroll on a Mac Mini ?
  • hgy29hgy29 Maintainer
    I mean, there is no touchpad on a Mac Mini :)
  • keszeghkeszegh Member
    @hgy29, sorry for my ignorance, i thought it's a macbook you have (mini whatever), i forgot about desktop macs existing. (as i never had any mac or i... devices myself)

    Likes: hgy29

    +1 -1 (+1 / -0 ) Share on Facebook
Sign In or Register to comment.