I'm just looking around for starting learning NDK, with one particular project in mind:
I want to continually render a changing bitmap from NDK side to be able to show it in a live wallpaper.
(hence I'm not talking about rendering to OpenGL texture here, but about rendering to a Bitmap)
I googled a bit and found out that there's an option to directly manipulate a Bitmap pixels. But I also found that documentation says that this feature is avaiable only since Android 2.2. And I'd like to support 2.1 in my live wallpaper.
On the other hand I found several projects that do similar stuff - render something from ndk and show it in live wallpaper. And they work on 2.1. Examples are: wonderful Video Live Wallpaper, and I think Shake Them All Live Wallpaper does the same kind of stuff.
So the question is - am I missing some other way to do continuous rendering to LW other than direct manipulation of Bitmap data? Or some other thing I got wrong? :)
As far as I know, the other projects that do rendering with the NDK and use jnigraphics
prior to 2.2 actually include that library in the project and load it as a 3-rd party library.
See the description of PREBUILT_SHARED_LIBRARY
in android-ndk-r5b/docs/ANDROID-MK.html
for more information on how to do that.
You can find jnigraphics in:
android-ndk-r5b/platforms/android-8/arch-arm/usr/lib/libjnigraphics.so
Of course, I don't know if it's actually permissible to redistribute part of the NDK (maybe someone else can weigh in on this), but apparently the only holdup with using jnigraphics
prior to Android 2.2 is simply the fact that it's not present in earlier releases.
Hope that helps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With