Search Unity

why OpenGL ES on ios can not support multi-threaded rendering in unity?

Discussion in 'General Discussion' started by SAIKYOU, May 17, 2019.

  1. SAIKYOU

    SAIKYOU

    Joined:
    Oct 20, 2014
    Posts:
    4
    Anyone knows? I just want to know some deep tech details behind it, thank you!
     
  2. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    14,302
    There isn't anything deep about it. OpenGL ES restricts each context to a single thread. Trying to modify the context from multiple threads results in unpredictable behaviour. Apple's recommendation is to have multiple threads that are not dependent on the context perform calculations and then let the single thread push the results one at a time.

    https://developer.apple.com/library...html#//apple_ref/doc/uid/TP40008793-CH409-SW2
     
  3. VIC20

    VIC20

    Joined:
    Jan 19, 2008
    Posts:
    2,408
    Open GL is deprecated on iOS and macOS. I would not waste any time with it.
     
  4. Peter77

    Peter77

    Joined:
    Jun 12, 2013
    Posts:
    3,914
  5. VIC20

    VIC20

    Joined:
    Jan 19, 2008
    Posts:
    2,408
    I hope that is a sign that OpenGL will be still available for some time on macOS and iOS – otherwise I don’t understand why they invest any resources in a technology that might be not available anymore in iOS 13 and macOS 15.
     
  6. SAIKYOU

    SAIKYOU

    Joined:
    Oct 20, 2014
    Posts:
    4
    thanks for you reply, AFAIK, On Android, unity pushes every rendering command , except creating shader command , to rendering thread. Why can not use this same pattern on IOS? Does IOS have some restrictions? For example, rendering thread can't bind eagl conext which is created in the main thread to self(I just guess)?