Commit Graph

121 Commits

Author SHA1 Message Date
Dianne Hackborn
2b352d76d8 Native activity now draws!
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
2010-07-01 19:20:44 -07:00
Dianne Hackborn
88510488e9 Update native_activity sample code to use ANativeWindow.
We now get the native window to the engine, all ready for something
to be done with it.

Change-Id: Ie4537e505cdf8a2fffc28de82b7e3cda448fde41
2010-07-01 13:38:58 -07:00
Dianne Hackborn
bbdfd7c347 Update to new native activity APIs.
Change-Id: Id2a32fd0ed0de39b2f266216d5b3d903156fb761
2010-06-28 23:37:49 -07:00
Dianne Hackborn
5468d76871 Update native APIs for events.
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
2010-06-21 18:07:58 -07:00
David 'Digit' Turner
fcefaf88ab Add a sample to demonstrate module exports in the NDK.
+ add .gitignore

Change-Id: Ifa160316e37cf201099ab0d8d89fdd375ee3eb59
2010-06-10 16:56:16 -07:00
David 'Digit' Turner
d616e8b214 Fix build
Also remove unwanted binary files here

Change-Id: I1b52abbbfd3f67670fb5977f5430a1bb4dac22bb
2010-06-09 17:46:46 -07:00
David 'Digit' Turner
c817c5210e Copy platforms and samples from ndk/ source tree.
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
2010-06-09 17:02:09 -07:00
Jean-Baptiste Queru
7e203f10b6 Delete NDK.
It is being moved to a standalone project.

Change-Id: If863753b9bf10ec2b7351fd39eccf28a989102f7
2010-03-24 09:22:53 -07:00
The Android Open Source Project
d05de7642c merge from open-source master
Change-Id: Ia641d105e05982e3a3c85c7b82a70fe1fa664f1a
2010-03-22 15:55:11 -07:00
David 'Digit' Turner
fb0b04d485 Merge "Add missing headers to the x86 android-5 headers (GLES/GLES2/log)" 2010-03-19 11:25:48 -07:00
David 'Digit' Turner
a161c4f5d9 Remove problematic headers from x86 android-5 headers.
These files have the same case-insensitive name, and this creates problems
when used on Windows + Cygwin.

Change-Id: I911906c209ad9fca8752ba4cdc9c65abdd0bd4a9
2010-03-18 18:00:31 -07:00
David 'Digit' Turner
0573b37098 Add missing headers to the x86 android-5 headers (GLES/GLES2/log)
Change-Id: I0e066a1256d6a23b65672327c0cfcf67a0f03f1b
2010-03-18 17:45:15 -07:00
Bruce Beare
3750d3a442 android-5 platform files for IA
Change-Id: Id785125438abfd4dbc795f358ec223bf22c73fc1
2010-03-11 10:33:43 -08:00
David 'Digit' Turner
a74f31701a Allow the build-toolchain.sh script to apply source packages.
All you need to do is place name them like the following:

   build/tools/toolchain-patches/<subpath>/<foo>.patch

And they will be applied with 'patch -p1' into:

   <build-src>/<subpath>

This is useful to experiment with toolchain changes without having
to regenerate a whole new source package tarball each time.
2010-02-24 14:43:10 -08:00
David 'Digit' Turner
1b0f27549b am 528c8fa1: am 4653cb89: cpufeatures license is BSD, no Apache 2.0
Merge commit '528c8fa1827b36c19ff92655bb40012415761193'

* commit '528c8fa1827b36c19ff92655bb40012415761193':
  cpufeatures license is BSD, no Apache 2.0
2010-02-22 16:43:26 -08:00
David 'Digit' Turner
4653cb897b cpufeatures license is BSD, no Apache 2.0 2010-02-22 16:23:24 -08:00
David 'Digit' Turner
a166abb9e4 am fda2f438: am 693ad65e: Add missing copyright disclaimers to cpufeatures and hello-neon
Merge commit 'fda2f43891153dbb80cf2d86d1c3a3b632fbed41'

* commit 'fda2f43891153dbb80cf2d86d1c3a3b632fbed41':
  Add missing copyright disclaimers to cpufeatures and hello-neon
2010-02-22 15:06:54 -08:00
David 'Digit' Turner
693ad65e24 Add missing copyright disclaimers to cpufeatures and hello-neon 2010-02-22 14:11:07 -08:00
David 'Digit' Turner
7b23f86bfe am ec0ff012: am f4efa044: Update hello-gl2 sample to properly implement EGL Config selection.
Merge commit 'ec0ff0125cb33cbae29be268035c461b5a2355ce'

* commit 'ec0ff0125cb33cbae29be268035c461b5a2355ce':
  Update hello-gl2 sample to properly implement EGL Config selection.
2010-02-22 10:33:24 -08:00
David 'Digit' Turner
f4efa044a0 Update hello-gl2 sample to properly implement EGL Config selection.
Also add some comments to explicit what is being done here.
+ add <uses-feature android:glEsVersion="0x00020000"/> to AndroidManifest.xml
2010-02-21 12:23:51 -08:00
David 'Digit' Turner
6052fa299a am 7ab10f9f: am 92210fe1: Update documentation + simplify make-release.sh script
Merge commit '7ab10f9ffa522e1831594e75d3e4bf1174d02f1d'

* commit '7ab10f9ffa522e1831594e75d3e4bf1174d02f1d':
  Update documentation + simplify make-release.sh script
2010-02-12 17:52:17 -08:00
David 'Digit' Turner
65352de314 am 142eafac: am 93369c24: Add the \'hello-neon\' sample app to demonstrate cpufeatures and ARM Neon usage.
Merge commit '142eafac97d8aae9d05532d19a80494a1593d2e8'

* commit '142eafac97d8aae9d05532d19a80494a1593d2e8':
  Add the 'hello-neon' sample app to demonstrate cpufeatures and ARM Neon usage.
2010-02-12 17:44:56 -08:00
David 'Digit' Turner
92210fe14b Update documentation + simplify make-release.sh script 2010-02-12 17:23:21 -08:00
David 'Digit' Turner
93369c2470 Add the 'hello-neon' sample app to demonstrate cpufeatures and ARM Neon usage.
+ Add a small cleanup script (build/tools/cleanup-apps.sh)
+ Minor formatting of hello-gl2 sample.
2010-02-12 16:26:31 -08:00
David Turner
8789080d4f am e3af8ae5: am e6aa4229: Merge "Add NEON support to the NDK build system + docs" into eclair
Merge commit 'e3af8ae5211eb3b544e79634420964110d3f5340'

* commit 'e3af8ae5211eb3b544e79634420964110d3f5340':
  Add NEON support to the NDK build system + docs
2010-02-11 12:19:30 -08:00
David 'Digit' Turner
da4b8312a1 Add NEON support to the NDK build system + docs
You can now define LOCAL_ARM_NEON to 'true' in your Android.mk
to indicate that a whole module must be compiled with NEON support.

Alternatively, use the .neon suffix when listing source files in
LOCAL_SRC_FILES to indicate that they should be built with NEON
support. E.g.:

  LOCAL_SRC_FILES := foo.c.neon bar.c zoo.c.arm.neon

Note that .arm.neon is supported, but .neon.arm is NOT.

Also added documentation in docs/CPU-ARM-NEON.TXT

Another patch will provide one or more sample applications
to demonstrate all of this.
2010-02-09 13:18:48 -08:00
David Turner
bf7419b7cf am e52f44d9: am 3b712fda: Merge "Add \'cpufeatures\' library to perform runtime CPU family/features detection." into eclair
Merge commit 'e52f44d9506b56e610f81eecc4f6aaca390f7a8d'

* commit 'e52f44d9506b56e610f81eecc4f6aaca390f7a8d':
  Add 'cpufeatures' library to perform runtime CPU family/features detection.
2010-02-08 12:58:38 -08:00
David 'Digit' Turner
43809914f6 Add 'cpufeatures' library to perform runtime CPU family/features detection.
It is provided as a static library that NDK developers can link against.
The code is designed to run on all official Android platforms, starting
from Android 1.5.
2010-02-05 16:03:39 -08:00
David Turner
3c2d9cdaef am 1921f03a: am 50c5ce01: Merge "Force ARMv7 builds to use only 16 FP registers." into eclair
Merge commit '1921f03a780c4664c984eeb64d72d76fb3d53b61'

* commit '1921f03a780c4664c984eeb64d72d76fb3d53b61':
  Force ARMv7 builds to use only 16 FP registers.
2010-01-29 14:56:53 -08:00
David 'Digit' Turner
14665046f8 Force ARMv7 builds to use only 16 FP registers.
This is needed because upcoming Cortex-A9 devices implement
VFPv3-D16 instead of the assumed VFPv3-D32 and have thus half
the floating-point registers.
2010-01-28 17:58:56 -08:00
David Turner
1ee57affb6 am a84a9656: am 23d8ded2: Merge "Update documentation for OpenGL ES 1.0 / 1.1 / 2.0" into eclair
Merge commit 'a84a9656b33c3e90a0747aff26272a7a316bc298'

* commit 'a84a9656b33c3e90a0747aff26272a7a316bc298':
  Update documentation for OpenGL ES 1.0 / 1.1 / 2.0
2010-01-19 00:01:46 -08:00
David 'Digit' Turner
eef791e9a1 Update documentation for OpenGL ES 1.0 / 1.1 / 2.0 2010-01-13 16:50:57 -08:00
Romain Guy
74192eafec Deprecate fill_parent and introduce match_parent.
Bug: #2361749.
2010-01-08 15:11:18 -08:00
David 'Digit' Turner
a13e890e57 Update documentation to indicate EGL ES 2.0 isn't supported in the emulator. 2009-12-09 15:46:07 -08:00
David 'Digit' Turner
6b913ab885 Fix toolchain scripts for Darwin and Cygwin.
Only touches download-toolchain-sources.sh and build-toolchain.sh
This does not impact the NDK build scripts themselves and is only
needed to properly package NDK release packages.
2009-12-04 17:57:36 -08:00
David 'Digit' Turner
cb96cddc77 Cleanup installed binaries before the NDK build begins.
Ensures that no stale/obsolete shared libraries are left in the
application's project path before the build.

Also fix a minor typo that made the ABI selection process not
work properly in certain cases.
2009-11-23 16:12:12 -08:00
David 'Digit' Turner
f5862d8da6 Add support for armeabi-v7a to the NDK.
This patch modifies the NDK build scripts to support the 'armeabi-v7a' ABI.
(For the record, it corresponds to Thumb-2 + FPU support, to speed up native
code on certain devices like the Droid).

To build for this ABI, the Application.mk file should use a line like:

  APP_ABI := armeabi-v7a

It is also possible to build for both 'armeabi' and 'armeabi-v7a' by using:

  APP_ABI := armeabi armeabi-v7a

This will result in the generation of two distinct shared libraries that both
will be copied to the final application package.

This is dependent on having GCC 4.4.0 prebuilt binaries under
build/prebuilt/<host>/arm-eabi-4.4.0, since gcc 4.2.1 does not support
this new ABI.

Note that this also changes the NDK to use gcc 4.4.0 by default, unless
the user defines NDK_TOOLCHAIN to 'arm-eabi-4.2.1' in its environment to
switch back to the previous one.
2009-11-20 14:07:15 -08:00
David 'Digit' Turner
69eeb8a22f Update the build-toolchain.sh script.
This patch modifies the script to be able to build all prebuilt toolchain
binaries in a single call. I.e. if passed a recent toolchain source package
generated with download-toolchain-sources.sh, then it will build both
GCC 4.2.1 and GCC 4.4.0 and place them in the final prebuilt tarball.

We need this because, while we're going to switch to gcc 4.4.0 by default
in a new version of the NDK, the 4.4.0 C++ compiler is more strict about
various constructs and might refuse to build certain sources. An option
will be given to application developers to use 4.2.1 instead, to keep their
sources building.

Other changes include:

Move all builds into a random temporary directory under /tmp by default,
unless you use --build-out=<path>.

Cleanup the build out directory on succesful build

The generated tarball is now named android-ndk-prebuilt-<date>-<host>.tar.bz2
by default, unless you use the new --release=<name> option which will replace
<date> with <name> instead.

Removal of un-needed files (e.g. info or man pages, libiberty static library,
etc..) to reduce the size of the final tarball.
2009-11-19 13:43:11 -08:00
Android (Google) Code Review
e4df0ea14b Merge change I8d8b5816 into eclair
* changes:
  Update build-toolchain.sh to be able to build gcc 4.4.0
2009-11-16 14:53:57 -08:00
David 'Digit' Turner
37e84c2056 Update build-toolchain.sh to be able to build gcc 4.4.0
Update the script used to build the prebuilt toolchain binaries.
There are now two ways to use it:

1/ As usual, just invoke it and it will download the source tarball,
   uncompress it, configure the toolchain sources, build them, then
   package the result into a 'prebuilt' tarball.

2/ Generate a new source tarball with the 'download-toolchain-sources.sh'
   script, and invoke build-toolchain.sh with the --package=<tarball>
   option.

Additionally, you can now specify --gcc-version=4.4.0 to build GCC 4.4.0
(with ARMv7 / FPU support)

The option --gdb-version=6.8 has been added but the build doesn't seem
to work yet. This will probably be fixed in the toolchain git repository
though.

This will be used to refresh the NDK with gcc 4.4.0 prebuilts and support
for armeabi-v7a soon.
2009-11-16 12:41:33 -08:00
David 'Digit' Turner
af4040476e Add a script to download and package the toolchain sources.
download-toolchain-sources.sh will download the current toolchain sources
from our git repositories then finely package them into a compressed
tarball that will later be used to rebuild the prebuilt binaries properly.

Due to the way our sources are stored in the git repository, the sources
in the tarball are laid out slightly differently than in the original toolchain
source archive used for NDK 1.6.

An upcoming patch will modify build-toolchain.sh to deal with the difference
and also allow the build of gcc-4.4.0 and gdb-6.8.
2009-11-16 11:31:33 -08:00
David 'Digit' Turner
27ad1ef820 Add a new sample named "hello-gl2" that shows how to call OGL ES 2.0 functions
from native code through JNI.
2009-10-22 17:34:32 -07:00
David 'Digit' Turner
9eff6cbfaa Add OpenGL 2.0 headers and libraries to the NDK.
This is only available for platform android-5. A sample
application will be available in a next patch.
2009-10-21 14:43:09 -07:00
David 'Digit' Turner
975491c9eb Add android-5 platform to the NDK.
For now, this is an exact copy of android-4. Another patch will
provide additionnal headers and libraries for OpenGL 2.0 plus
the relevant documentation bits and a sample app.
2009-10-21 14:31:53 -07:00
David 'Digit' Turner
b48ab64028 Allow applications to target future API levels
E.g. if an application's default.properties targets android-10
then the build system will default it to the highest supported
API level found in build/platforms (e.g. android-4 currently).
2009-10-21 10:19:07 -07:00
David 'Digit' Turner
31f23a0b9f Remove build/platforms/android-*/common directories.
There is little point to use symlinks to point to them from
android-*/arch-arm/usr/include. Besides, the zip file format doesn't
support symlinks which meant that each file was essentially
duplicated in the final release package.
2009-10-20 15:53:42 -07:00
David 'Digit' Turner
f7aa22af3c Remove bash-ism from build-ndk-sysroot.sh 2009-10-20 15:33:40 -07:00
David 'Digit' Turner
898b43fedc Refresh NDK C library headers for all platforms 2009-10-20 15:25:40 -07:00
David 'Digit' Turner
1db4662e79 Remove bash-ism from build-toolchain.sh 2009-10-15 13:29:06 -07:00
David 'Digit' Turner
854f820c24 Add --prebuilt-ndk=FILE and --no-git options to build/tools/make-release.sh script.
This is used to help people easily package experimental versions of the NDK to
test and distribute fixes and improvements. The main idea is to allow external
contributors to play with it in interesting way and share the result easily.
2009-10-14 15:39:58 -07:00