Polygon drawing glitches; what causes them?

Discussion in 'iOS Programming' started by musanim, Sep 4, 2010.

  1. musanim macrumors newbie

    May 14, 2009
    I modified the Apple sample program Touches to do some simple polygon drawing on an iPad.

    The strange thing is: when I first draw a polygon, it almost always has glitches in it (you can see what I mean in this YouTube video: http://www.youtube.com/watch?v=oNgXJ1oEDv8 ), but after a few seconds (with the program doing nothing, no user interaction), they always go away (also shown in the video).

    My first thought was that it might be a hardware problem, but it does the same thing on an iPhone.

    Since I'm a newbie in iPad/iPhone programming, I'm guessing that I'm just making some stupid mistake, but I have no idea what it might be.

    I can post the code for my test program if you're interested.
  2. kainjow Moderator emeritus


    Jun 15, 2000
    Please do.
  3. musanim thread starter macrumors newbie

    May 14, 2009
    Okay, I've ZIPped the project and put it here:



    1. The delay between the drawing (with glitches) and the time when the glitches go away by themselves is typically longer than in the video (I shortened the time by about half since there was no point in watching it do nothing).

    2. The glitches do not happen when I run the program in the emulator.

    3. Sometimes, when I've paused the iPad from the debugger, polygons that I've drawn previously disappear and reappear.

    4. Moving a touch causes the glitches to go away quickly (even when there are no associated graphics operations with that motion).

    5. If you're able to reproduce the problem (even if you're not able to solve it), please leave a note.

    Thanks in advance for any help.


Share This Page