Search Unity

Force OpenGL ES 2.0 still calls 3.0 functions.

Discussion in 'iOS and tvOS' started by Good-old-Grim, Jun 9, 2014.

  1. Good-old-Grim

    Good-old-Grim

    Joined:
    Jan 17, 2014
    Posts:
    33
    When I attempt to build for iOS 6.0 with Force OpenGL ES 2.0 and Simulator SDK, I get the following error in simulator:

    dyld: Symbol not found: _glBeginQuery
    Referenced from: /Users/build/Library/Application Support/iPhone Simulator/6.1/Applications/DB65C081-9594-4F0C-8DBD-485839C64062/marss.app/marss
    Expected in: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.1.sdk/System/Library/Frameworks/OpenGLES.framework/OpenGLES

    glBeginQuery is a method that was introduced in Open GL ES 3.0.

    If I Build for iOS 7.1 with Force OpenGL ES 3.0, then everything works fine. I also tried this with a completely empty project with the same results.

    Am I doing something wrong or is this a bug in Unity?
     
  2. Alexey

    Alexey

    Unity Technologies

    Joined:
    May 10, 2010
    Posts:
    1,624
    we do not use glBeginQuery directly in gles2, rather getting the pointer through extension mechanism. Also, it is first time i heard about the issue. Are you some plugins that might reference it?
     
  3. MingGZ

    MingGZ

    Joined:
    Jun 10, 2014
    Posts:
    1
    I have the same issue. no plugin that might reference it.
     
  4. Good-old-Grim

    Good-old-Grim

    Joined:
    Jan 17, 2014
    Posts:
    33
    I have several plugins in the original project, though none that do any visual stuff beyond calling GUI functions.

    As mentioned in my original post, I could replicate the problem with a completely empty project.

    Note that this only happens to me when building for the emulator. My actual solution was to not use the emulator, but do all my testing on a physical device.
     
  5. Crwth

    Crwth

    Joined:
    Mar 1, 2014
    Posts:
    6
    I'm seeing the same problem. Granted, this is my first Unity project, and my first Xcode project, and I could be doing something wrong...

    But same as Grim, I can target 7 fine, but anything lower gives this same error. I get this regardless of the Graphics Level (Automatic, Force 2, Force 3).
     
  6. thinkyhead_

    thinkyhead_

    Joined:
    Jan 5, 2014
    Posts:
    3
    I am just seeing this now in Unity 4.5.2f1. I had been building for iOS 6.0 just fine, but I was fiddling with the iOS "Other" settings a bit, and now (even though settings are back where they used to be) when I target iOS 6 I always get the error:

    EAGLContextHelper.mm:28:43: Use of undeclared identifier 'kEAGLRenderingAPIOpenGLES3'

    ...and sometimes I get:

    GlesHelper.mm:17:10: 'OpenGLES/ES3/gl.h' file not found

    If I target iOS 7.0 or 7.1 these errors go away. The "force OpenGL ES 2.0" option doesn't seem to affect the generated code - at least not w/r/t these errors.

    I pulled out a backup of my project from before this started happening to compare settings. All the build settings were the same, except I had checked "Submit HW Statistics" in the newer project. Unchecking that setting didn't make any difference.

    Interestingly, when I built the older project the same issue occurred in it too, even though it had been working before. So that's interesting! Something in the Unity3D global environment seems to be overriding these project settings, or at least causing confusion about whether to generate code that has OpenGLES 3.0 dependencies. As far as I know, Unity's intention is to enforce ES 2.0 when targeting iOS 6.0, but somehow that's not happening.

    The only other thing I did recently was to use MonoDevelop to set some breakpoints (instead of using Sublime 2 and printing debug messages as I usually do), and did a little debugging session. But I didn't do any building for iOS until today.

    For development purposes I'm happy to target iOS 7, and maybe even for release, since it runs great on iPad 2. But I know there are many developers who would like to keep iOS 6 support for not-that-old iPod touch devices that can't run iOS 7, especially.
     
    Last edited: Aug 25, 2014
  7. darkmwar

    darkmwar

    Joined:
    May 27, 2014
    Posts:
    4
    I am also having this trouble. building for 6.0, in both EL2.0 or 3.0 gives me the error dyld: symbol not found: _glbeginquery. The only plugin I am using is facebook sdk
     
    BlackPanda likes this.
  8. darkmwar

    darkmwar

    Joined:
    May 27, 2014
    Posts:
    4
    is there a solution to this problem?
     
    ninjanosui likes this.
  9. BlackPanda

    BlackPanda

    Joined:
    Jan 24, 2014
    Posts:
    78
    I'm having the same issue while using facebook sdk. Did you find the solution?
     
  10. phusung

    phusung

    Joined:
    Mar 1, 2013
    Posts:
    1
    I have the same issue, Unity 4.5.5p3 build for Iphone 3GS , Ios 6.1 xcode 5.0.2.
    Build to Xcode project , 2 errors:

    Classes/Unity/GlesHelper.mm:17:10: 'OpenGLES/ES3/gl.h' file not found
    Classes/Unity/EAGLContextHelper.mm:28:43: Use of undeclared identifier 'kEAGLRenderingAPIOpenGLES3'

    Please help me, please....
     
  11. _Allen

    _Allen

    Joined:
    Jan 14, 2014
    Posts:
    3
    Same issue, is there any solutions?
     
  12. tomjan

    tomjan

    Joined:
    Sep 28, 2013
    Posts:
    1
    Hope that after all the time someone has found a solution.. cause these errors occured in my project too...

    Classes/Unity/GlesHelper.mm:17:10: 'OpenGLES/ES3/gl.h' file not found
    Classes/Unity/EAGLContextHelper.mm:28:43: Use of undeclared identifier 'kEAGLRenderingAPIOpenGLES3'

    Cheers!
     
  13. MrEsquire

    MrEsquire

    Joined:
    Nov 5, 2013
    Posts:
    2,712
    You probably get a reply: file a bug report