2D Side scrolling - Draw objects on Buffer

I am developing a 2D platform, side scrolling game. The platform is constructed from a data file which has the array that represents different objects. Now the platform has to move very fast from right to left when the player moves. First time when I tried, I used OpenGL 2D and drew images for each tile. The tile size is around 10x10 PNG file. As I draw the tiles every frame the game seems to be really slow and not playable.

Now I am planning to have the platform pre-rendered on an image and I'll be drawing the image for every frame and the image will be constructed as the player passes a particular distance.

Now how do I draw something on an image, or is there anyother way doing it.

Sorry for the bump, but I have a solution to your unanswered problem. Right now I'm assuming your following that example exactly as it is. Now if you think about how that works, it draws the screen's size in tiles each and every frame, which would indeed end up appearing slow. I worked on a tilemap engine a bit back for the PSP (now I've just started moving onto the iPhone ), and I ran into the same problem. What you need to do is calculate each tile position and coordinate, and store them in two arrays - one for position and one for the image's texture coordinates (that is, if your planning on using a tilesheet as opposed to separate images). Then you use glDrawArrays to blit it all at once, rather than tile by tile. Hope this helped, if you have or notice some problems with this suggestion, I'd be glad to help and/or fix them. I hope this helps anyone else with this issue as well.

-Al

PS: if you need a coded example, I'd be glad to make one for you (but most likely not for the iPhone, as I'm just getting into everything).

If you're doing a simple 2D side scroller where everything moves one pixel at a time then this may be overkill. But if you want the scroll in fractional amounts, or rotate or zoom the layer, then you need to render to a texture like this to handle the filtering between tiles.