views:

655

answers:

2

What's the fastest way to get a framebuffer and render to in software on the iPhone?

Basically getting into a mode 13h style thing going so I can make some effects? :)

+4  A: 

You need to create a CGImageContext, in a bitmap format that you can directly manipulate. Then, you can draw that image on the screen, use it as a GL texture, or whatever.

Pretty simple stuff - check the Core Graphics documentation. I don't think there's a good way toi get actual raw framebuffer access, but that's probably not what you really want, anyway.

Mark Bessey
You get about 5 fps with this method…
melfar
A: 

As far as I know you have an OpenGL|ES accelerator chip on the IPhone. If you want to push pixels you should check which kind of OpenGL|ES is supported. Write code for it and let the hardware do the job.

Writing OpenGL|ES is not hard btw. I you still know what mode13 is (old fart you are!) you should pick up the basics within an hour and after a weekend of toying around you've masterd the API.

Nils Pipenbrinck