ogles_gpgpu: GPGPU for iOS and Android using OpenGL ES 2.0
ogles_gpgpu: GPGPU for iOS and Android using OpenGL ES 2.0
- Subject: ogles_gpgpu: GPGPU for iOS and Android using OpenGL ES 2.0
- From: mkonrad net <email@hidden>
- Date: Sat, 10 Jan 2015 17:41:49 +0100
I would like to announce a new library for GPU-based processing on mobile
systems – ogles_gpgpu.
As many of you know, it is often beneficial in terms of performance and
energy efficiency to execute certain processing tasks on the GPU instead of
the CPU. This is especially the case for image processing tasks.
ogles_gpgpu enables fast and portable, GPU-powered processing by using
OpenGL ES 2.0 shaders.
Since transferring data to and from the GPU is often a bottleneck for GPU
processing, platform-specific fast texture access is also implemented. The
library is written in well documented, clear C++ code, which is easy to
embed in iOS application projects. An interface for Android systems via JNI
is provided. Example applications show how to use this library. All code is
LGPL licensed.
There are several scenarios on how to use this library: You can for example
pass image data (or arbitrary byte data) to ogles_gpgpu, which creates an
OpenGL texture from it. You can then process it on the GPU by applying a
series of filters (OpenGL shaders) on it. This kind of rendering happens
off-screen. Afterwards, you can lock the result data and obtain a pointer
to it. You can then copy this data for future processing or directly
analyze or modify it. Another possible scenario is to directly pass an
OpenGL texture ID as input for ogles_gpgpu. This is for example beneficial
if you can obtain camera frames as OpenGL texture from the camera API of
your target platform (both Android and iOS allow this and example projects
or provided for this). Now ogles_gpgpu can directly run the filters on this
camera frame texture. This can happen off-screen or optionally on-screen,
which means that the result image is also displayed to a render surface.
After processing on the GPU side, you can access the result data again as
described in the first scenario. By this, you can do further CPU-based
processing of the result data. This is for example necessary, if certain
algorithms can not (efficiently) be implemented as OpenGL shaders.
At current development stage, there are not so many image processing
filters implemented, yet (as compared, for example, to Brad Larson's
"GPUImage" library). This is about to change in the future (you can of
course contribute to the project). The most important thing is that a
portable architecture for GPU-based processing is available, which allows
fast texture access by using platform-specific optimizations.
You can check out the project on github:
https://github.com/internaut/ogles_gpgpu
More information can be found on my personal website:
http://www.mkonrad.net/projects/ogles_gpgpu.html
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden