Results 1 to 8 of 8
Discuss OpenGL - Flickering at the Free Toolchain Software (Cydia App's) - Hackint0sh.org; Hey! I'm in the progress of developing a really nice game for the iPhone/iPod Touch ...
  1. #1
    Newbie Array

    Join Date
    Nov 2007
    Posts
    7
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default OpenGL - Flickering

    Hey!

    I'm in the progress of developing a really nice game for the iPhone/iPod Touch using OpenGL.

    As some of you have noticed the game called Labyrinth is experiencing screen flicker sometimes. This is also the case for the game that I'm developing. Do any of you know what could solve this?

    To explain the situation:

    The game uses the UIGLView by Andrew Willmott (big thanks to him for all work on it!). As in his demo, the screen is updated by an NSTimer calling setNeedsDisplay. If I lower the update interval to 0.5 seconds or so the screen flicker happens only once if any time. With 0.1 it happens more like an occasional blink. I'm thinking that it might have something to do with:

    eglWaitNative(EGL_CORE_NATIVE_ENGINE);
    CoreSurfaceBufferLock(mScreenSurface, 3);

    Thus calling the screen lock in the middle of a system screen update or in other ways colliding with system redraw calls.

    The flickering is not apparent in Andrew's full screen app (which is NOT strange as it uses a dedicated screen surface an a non-event driven run loop).

    So, what do you think could solve this problem?

    Cheers,
    Max



  2. #2
    Professional Array

    Join Date
    Aug 2007
    Posts
    78
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    12

    Default

    Maybe uiview startHeartbeat: sel inRunLoopMode:

    Instead of NSTimer for refreshes?

  3. #3
    Professional Array

    Join Date
    Aug 2007
    Posts
    78
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    12

    Default

    From my MobileMusicPlayer disassembly, heartBeat seems to be used in the coverflow stuff, for what I assume at this stage is redraw related stuff.

  4. #4
    Newbie Array

    Join Date
    Nov 2007
    Posts
    7
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default

    Oh, cool. I did actually take a look at just that call, but couldn't find much about it. Do you know how to call it?

    Just a question out of curiosity: how do you dissemble something like the music player app?

    Cheers,
    Max

  5. #5
    Professional Array

    Join Date
    Aug 2007
    Posts
    78
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    12

    Default

    Dunno if it's what you're after but he's an example:

    [myUIView startHeartbeat:@selector(heartbeatCallback inRunLoopMode:nil];

    then define the selector method

    - (void)heartbeatCallbackid)unused
    {
    // do stuff here
    }

    Apparently it's called by the UI occasionally. Other than that, I don't know anything about it.

    For disassembly I use ravel-arm, but IDA is another arm disassembler capable of reversing arm mach-o binaries


  6. #6
    Newbie Array

    Join Date
    Nov 2007
    Posts
    7
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default

    Great info! I'll try that and report the results!

    Cheers,
    Max

  7. #7
    Newbie Array

    Join Date
    Nov 2007
    Posts
    7
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default

    I did this in the init for the main view, which contains the UIGLView:

    Code:
    [self startHeartbeat:@selector(update) inRunLoopMode:nil];
    And further down in the implementation:

    Code:
    - (void)update {	
        [glview setNeedsDisplay];
    }
    This does work and it seems to lock to a frame rate of about 60FPS.

    BUT, the flicker is still there. Now it's more even, that is all buttons, status bar and so on blinks at the same time. It also still flickers when the home button is pushed (probably has to catch the button press and call [self stopHeartbeat] to stop the redraw).

    To conclude:

    - startHeartbeat works
    - it does not get rid of the flicker
    - it seems to sync up all drawing a bit

    Cheers,
    Max

  8. #8
    NSB
    NSB is offline
    Rookie Array

    Join Date
    Sep 2007
    Posts
    10
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default

    I took a slightly different approach, though I'm not sure if it helps the flickering or not. I don't have flickering problems with my app or with labyrinth, so it's possible it's just my setup.

    Here are some links to my test app:

    http://ixionstudios.com/files/glTest_app.zip
    http://ixionstudios.com/files/glTest_app.tar.gz
    http://ixionstudios.com/files/glTest_src.zip
    http://ixionstudios.com/files/glTest_src.tar.gz


    -NSB

 

 

Similar Threads

  1. iPhone 3G Flickering Screen
    By curtisbcm in forum iPhone 3GS
    Replies: 1
    Last Post: 11-18-2009, 09:45 PM
  2. iphone screen flickering
    By boogie in forum Hardware
    Replies: 15
    Last Post: 08-06-2009, 11:53 PM
  3. iphone screen problem - flickering
    By mpgo13 in forum Hardware
    Replies: 2
    Last Post: 01-22-2009, 10:27 PM
  4. screen flickering
    By al217739 in forum General
    Replies: 1
    Last Post: 11-11-2007, 01:35 AM
  5. Flickering Screen _ No Start Up With Sim
    By zincozinco in forum iPhone "2G" (Rev. 1)
    Replies: 0
    Last Post: 10-09-2007, 02:19 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Powered by vBulletin®
Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.
Search Engine Friendly URLs by vBSEO
(c) 2006-2012 Hackint0sh.org
All times are GMT +2. The time now is 11:32 PM.
twitter, follow us!