Basic OpenGL ES question, please help

Apprentice
Posts: 5
Joined: 2008.10
Post: #1
Please go easy on me as I'm new with openGL.

I'm trying to animate images going across the screen. I'm using the Texture2D class from the Crash Landing example to render the image(s). I'm able to build a timer and start to animate the 1 image across the screen. The problem is, when I start to animate the 2nd image, it swaps out the render buffer and I lose the 1st image. I'm wondering how to continue to animate all images as it goes. The images come in staggered, so there will be any number of them on the screen at once. So, I'd like for a smooth animation of multiple images across the screen.

One last thing...

I'm trying to learn OpenGL ES and I'm finding it hard to information for a beginner. Does anyone have any good sources?

Thanks
Quote this message in a reply
Member
Posts: 21
Joined: 2008.10
Post: #2
I'm no expert, so this just may be the blind leading the blind...

Are you making multiple calls to swapBuffers? Are you clearing the screen between textures? Because you shouldn't. You should clear at the beginning of a frame, draw all your textures, and then swapBuffers at the end of the frame. Crash Landing uses the Texture2D class, which seems handy, but I am not familiar with yet.

Anyway, good luck. Perhaps if you provide more details, one of the pros here could help you out.
Quote this message in a reply
Apprentice
Posts: 5
Joined: 2008.10
Post: #3
Thanks for the response, I did update it to draw all the textures at once and then swap the buffers.

I'm still seeing some flickering though, is there a way to prevent this?
Quote this message in a reply
Member
Posts: 178
Joined: 2008.09
Post: #4
abdm436 Wrote:I'm trying to learn OpenGL ES and I'm finding it hard to information for a beginner. Does anyone have any good sources?
Thanks

Hi
Could you put here some begguiners opengl
Tutorials links that already have please?

my iphone website: http://www.elsalvadorguia.com
intel Imac 20", iphone 8GB (2G)
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Basic structure of an iOS game with OpenGL whitey 0 3,529 Oct 4, 2011 09:40 PM
Last Post: whitey
  basic wifi question wonza 0 1,946 Feb 14, 2009 05:03 PM
Last Post: wonza
  Basic design question lithiastudios 2 2,223 Jan 8, 2009 12:06 PM
Last Post: lithiastudios