The platform headers use the ANDROID macro as a platform test.
This macro is set by the NDK build script explicitely, but it
is better to use __ANDROID__, which is also set by our toolchain
as a compiler prebuilt macro.
This allows usage of these headers with our standalone toolchain.
Change-Id: I431c54e29e502bb9da7a52ef7a58a6341211b4db
This is the preferred way of selecting config starting in
gingerbread, this procedure guarantees forward compatibility.
Change-Id: Iff55b545e722205bd029b92da33368129253b8a3
there is no reason to set a depth buffer. this is somewhat confusing.
also, it's better to always specify EGL_SURFACE_TYPE.
Change-Id: Ieff499b0b69a3812773cf3fe08b8bf1ca57a82d9
Update the header file to match the platform change.
Also add an Android.mk so I can actually build this sample when I want to.
Change-Id: I30c3c43fba7c233c59005d916888a46dc7049651
Includes bitmap.h which was missing from v9 but was previously in v8.
Also includes new obb stuff and other things that have gotten out of sync.
Change-Id: I6cf9ccdbc9d3271a34a1cf8a1de78aa8a1757276
This commit removes duplication of system headers per platform, i.e. remove
copies of common headers like <stdlib.h> from arch-arm/usr/include and arch-x86/usr/include
and move them to a common include directory. More specifically:
- common headers: android-N/arch-A/usr/include --> android-N/include
- arch-specific headers: android-N/arch-A/usr-include --> android-N/arch-A/include
- arch-specific libs: android-N/arch-A/usr/lib --> android-N/arch-A/lib
Change-Id: Ifdba5038d108901931f3e3a7c14ebe6270d2d276
NOTE: This also contains careful separation of API-level-specific headers.
For example, platforms/android-5/include/pthread.h contains new function
declarations that are not available when using platforms/android-3/include/pthread.h
NOTE: The NDK's build-platforms.sh script has been updated to understand the new
layout. This change in develeopment/ndk does not change the layout of
platform files under $NDK/platforms after build-platforms.sh is called.
Also the native-activity sample also has some very simple code showing
how to listen to the accelerometer.
Change-Id: I0629b8bc40cddd66233c1675cd5e8b42a9b722d8
Update to include newest headers and library, tweak glue code to
work better with state saving and add support for config changes.
Change-Id: I4d27bd4a0f542f217efaec86cf4f219aca020426
Remove all duplicate platform files, i.e development/ndk/platforms/android-N now
only contains files that are introduced in API level 'N' and not found in level 'N-1'
(This makes it easier to manage independent platform release branches, and makes
platform additions trivial to examine and maintain).
Move samples that depends on features of API level 'N' into platforms/android-N/samples
+ update tests/run-all.sh accordingly
Change-Id: I04c4c67c6c674c1714d5812d461d0524a4f4cfd9
Make the "glue library" part of the NDK as an importable module,
this has several benefits:
- no need to distribute a binary here with no easy way to regenerate it
- no need to explicitely list -lthreaded_app in your LOCAL_LDLIBS
(this is handled automatically by the module import capability)
- allows easier native debugging of what's really happening.
Note that the header is renamed <threaded_native_app.h>
+ Modify the native-activity sample to use and import the new module
+ Start documenting usage in the header file. We probably need something
better, and will probably put it under development/ndk/docs/ at some
point.
After this patch, we should be able to get rid of the code under
framework/base/native/{include.glue}
Change-Id: I6e81d70a225a6ca006beabf6e8b42529e8f371b9
This shows direct drawing to an ANativeWindow's bits.
Update the NDK API, and fix a bug in the native-activity app where it
would hang while exiting.
Change-Id: I4fa98d083405eb0d1b22b10a73a2ef18d45fdb59
The native_activity sample is now built with the new threaded_app
glue code, removing all of the boiler-plate code from it. This
adds the glue code (header and .a) to the NDK.
Change-Id: I2a7be473811f22f948dcda3da8034dd0bd62049d
We now rely instead on the content of $NDK/sources/cxx-stl/system/include
that is automatically used if a module has C++ sources.
Change-Id: I4319d9260fcf9fb31c59c2f21ca64b536725d4f5
Very simple and dumb, but we now get touch events and fill the
window with a color (using OpenGL) based on its location.
Change-Id: I6657d2bb013570238bc0fe639f33c59f1ab68872
This introduces crtbegin_so.o and crtend_so.o and also requires a corresponding
change in the NDK build scripts to use them.
Also add a small test under 'tests/dlclose-destruction' to check that.
Note that this is not a sample (i.e. Android application) per se.
Change-Id: Icf25836363a3ed59310e579ce990aeca868e70e4
Copy current native event APIs over; start updating
sample code to use them.
The native activity sample is now much more real, creating
its own worker thread, which now monitors and prints any
incoming input events.
Note that due to the lack of default key handling, pressing
back no longer works! Will be fixed in a bit. This code
also needs to be refactored to put the engine part into
a separate source file.
Change-Id: I2ab3e6d9f840b99ec9a05bbc0d2cd9314beb23d7
The idea is to allow developing the NDK in the open, while
having the platforms and samples under a private branch until
the corresponding release are open-sourced.
Change-Id: Iee995fb6c4d3ee1387dea7486e599e079c9e4c6d