开发者

Resources for doing GPU-accelerated computation (GPGPU) on the iPhone?

I'm interested in doing GPU-accelerated computation in iOS (for iPhones 3GS and 4). Unfortunately, neither device supports OpenCL, so it seems the only choice is to express the program data as graphics data and use the OpenGL ES 2.0 pr开发者_C百科ogrammable shaders (vertex and fragment) to do the work. Can anyone recommend any resources that might be useful? Sample code is the holy grail.


There are several ways to do this by now. If you want to support older devices, you should stick to OpenGL ES 2.0 shaders. There are the frameworks GPUImage and ogles_gpgpu for this. The latter even supports Android systems.

I've also written a master's thesis about this topic: Parallel Computing for Digital Signal Processing on Mobile Device GPUs.

You can do more advanced GPGPU things with OpenGL ES 3.0 now. Check out this post for example. Apple now also has the "Metal API" which allows even more GPU compute operations. Both, OpenGL ES 3.x and Metal are only supported by newer devices with A7 chip.


I have a simple project that could help you kick start your GPU programming. It's in GLSL though.

The purpose of my project is to create a little framework for testing out different GLSL shaders. All you need to do is to edit the shaders files, don't need to worry about creating setup OpenGL pipeline & OpenGL compatible UIView, etc.

The repo is here https://github.com/torinnguyen/Ripple

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜