Game Development Reference
In-Depth Information
You need to add support for two things to use custom APIs with the NDK:
Header files : These are required for compilation. The problem is that they are not
distributed with the NDK source, which means you will need to obtain them by
other means (from the Android source, perhaps).
Native libraries : The native libraries are required to link the final library.
In the case of OpenGL, the best bet is to download the Android source to obtain the header files.
This can be a time consuming but necessary step (Chapter 1 shows how to do this). Next, assuming that
you have downloaded the Android source to a Windows PC under c:\tmp\mydroid , follow the next steps
to setup OpenGL
Copy the OpenGL header file folders EGL and GLES from the Android source
(located in c:\tmp\mydroid\frameworks\base\opengl\include ) to
NDK_HOME\build\platforms\android-1.5\arch-arm\usr\include (see
Figure A-6).
1.
Figure A-6. OpenGL header files within the NDK
2.
Next, you need to copy OpenGL libraries to NDK_HOME\build\
platforms\android-1.5\arch-arm\usr\lib , as shown in Figure A-7.
Search WWH ::




Custom Search