2

I want to port a game I've made which renders the screen itself 50 fps (doesn't use opengl).

What is the best way to port this to the iPhone?

I was reading about Framebuffer Objects. Is this a good approach to render a buffer of pixels to the screen at high speeds?

Toad
  • 15,593
  • 16
  • 82
  • 128

2 Answers2

1

The fastest way to get pixels on the screen is via OpenGL.

Need more info about how your game currently renders to the screen, but I don't see how FBOs will help as they're usually used for getting a copy of the render buffer, i.e. for creating a screen recording, or compositing custom textures on fly.

Rhythmic Fistman
  • 34,352
  • 5
  • 87
  • 159
  • I was thinking of rendering the entire game on a texture, and then with opengl just rending one big quad with the texture attached to it. Is this feasible? – Toad Nov 03 '11 at 14:57
  • just using opengl's pixel primitives is way too slow. I really need a traditional 'pixel buffer'. – Toad Nov 03 '11 at 14:57
  • 1
    If you have static sprites that don't change much over time, storing them in textures that you render/composite in the back buffer should be blazingly fast. If your sprites are dynamic and change a lot over time, you could perhaps efficiently emulate a traditional pixel buffer by using texture backed by a CVOpenGLESTextureCache. – Rhythmic Fistman Nov 03 '11 at 15:13
0

If i ever need to create an app where I have to access the pixels directly and dont have direct access to the hardware I use SDL as it just requires you to create a surface and from there you can manipulate the pixels directly. and as far as im aware you can use SDL on the Iphone, maybe even accelerate it using opengl too

Stowelly
  • 1,260
  • 2
  • 12
  • 31
  • according to this question, SDL is not very workable on iPhone: http://stackoverflow.com/questions/597459/how-mature-is-sdl-for-iphone – Toad Nov 03 '11 at 16:06
  • SDL for iPhone just wraps an OpenGLES context. Unless you've already got a bunch of SDL code, you may as well use the native API. It'll save you a lot of trouble. – Rhythmic Fistman Nov 03 '11 at 16:24