Hi, guys.

  I am using libgdx...and experiencing the flickering problem..

  Situation: I try to render an animation which has 3 frames in one
sprite sheet.After i upload and run this on my HERO, the flickering
problem occurs.

<code>
                mElapsedTime += Gdx.graphics.getDeltaTime();


                if (mElapsedTime > 0.3f) {
                        TextureRegion region = 
mTextureRegions.get(mTextureRegionIndex);
                        Gdx.gl.glClear(GL10.GL_COLOR_BUFFER_BIT);

                        SpriteBatch batch = mBatch;
                        batch.begin();
                        batch.draw(region.texture, 100f, 100f, region.x, 
region.y,
region.width, region.height, Color.RED);
                        batch.end();


                        mElapsedTime = 0f;
                        mTextureRegionIndex = ++mTextureRegionIndex % 3;
                }
</code>

I searched around and found
http://groups.google.com/group/android-developers/browse_thread/thread/174d70e41bf8e1aa,
http://groups.google.com/group/android-developers/browse_thread/thread/a26e54b5ecfd3e00/ede277e3d2d44a6e?pli=1.
But it doesn't help..

Any suggestions?

Thanks in advance.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to