Search Unity

Unity 3.2 OpenGL 2.0 issue

Discussion in 'Android' started by robhuhn, Feb 16, 2011.

  1. robhuhn

    robhuhn

    Joined:
    Jun 21, 2009
    Posts:
    113
    I have some weird graphical effects when using openGL ES 2.0 on Nexus one (neither testet on further devices nor on iOS).

    I'm using a sprite manager to loop a sequence of images on a 3D Texture in front of the camera. Now every time when the loop repeats the sprite is cut in two diagonally for a short time. Looks like there are problems to render the upper right vertex when starting the loop. If I switch to openGL 1.x the loop runs fine.

    My original project was built for iOS. Before Unity 3.2 I didn't have that issue with openGL 2.0.

    A further issue is that when I load new scenes additionally I can see a jitter for a short time. This happens on openGL 2.0 and openGL 1.x


    This is my code to load the scene:
    Code (csharp):
    1.  
    2. ...
    3.         AsyncOperation async = Application.LoadLevelAdditiveAsync("Loading");
    4.         yield return async;
    5.  
    6.         yield return new WaitForEndOfFrame();
    7.  
    8.         GC.Collect();
    9.  
    10.         yield return new WaitForEndOfFrame();
    11.  
    12.         async = Application.LoadLevelAdditiveAsync(name);
    13.         yield return async;
    14.  
    15.         GameObject container = GameObject.Find("Loading");
    16.         if (container != null)
    17.         {
    18.             Destroy(container);
    19.         }
    20.  
    21.         GameObject camera = GameObject.Find("FramebufferCamera");
    22.         if (camera != null)
    23.         {
    24.             Destroy(camera);
    25.         }
    26. ...
    27.  
     
  2. robhuhn

    robhuhn

    Joined:
    Jun 21, 2009
    Posts:
    113
    Looks like I found a solution for the jitter thing.
    My scene loader removed all previous content on start loading, added the content of the loader view, then removed the loader view and added the next content view at the end. So between the view changes there was no camera present. That procedure works on iOS without any issues... apparently not on Android / Nexus One / whatever.

    Now I have added a framebuffer camera between all view changes and destroy the camera when the next view is present.

    Unfortunately the openGL 2.0 / openGL 1.x issue is still not solved.

     
  3. Wozik

    Wozik

    Joined:
    Apr 10, 2009
    Posts:
    662
    Robhuhn, I can share an internal Unity secret: we fix bugs, when we get them reported with a repro project.

    And we'll fix your bug (if it is a bug after all), if you report it and help us to reproduce it.
     
  4. robhuhn

    robhuhn

    Joined:
    Jun 21, 2009
    Posts:
    113
    Yes, actually I don't send reports if I'm not absolutely sure that it is a bug, but I will report this issue today. Thanks
     
  5. Wozik

    Wozik

    Joined:
    Apr 10, 2009
    Posts:
    662
    Robhuhn, right approach actually, we appreciate it.
    thanks for the bugreport