Home | History | Annotate | only in /development/ndk/platforms/android-18/samples/gles3jni
Up to higher level directory
NameDateSize
AndroidManifest-11.xml20-Jun-20141.4K
AndroidManifest-18.xml20-Jun-20141.4K
jni/20-Jun-2014
README20-Jun-20141.2K
res/20-Jun-2014
src/20-Jun-2014

README

      1 This sample demonstrates how to use OpenGL ES 3.0 from JNI/native code.
      2 
      3 The sample can be built two different ways:
      4   * Compatible with API level 11 and later [*1]
      5   * Require API level 18 or later.
      6 Both versions include an OpenGL ES 2.0 fallback path for devices that don't
      7 support OpenGL ES 3.0.
      8 
      9 To build and install the sample:
     10 $ ln -s AndroidManifest-$N.xml AndroidManifest.xml
     11 $ ln -s Android-$N.mk jni/Android.mk
     12 $ $ANDROID_SDK/tools/android update project --path . --target android-$N
     13 $ ../../ndk-build
     14 $ ant debug
     15 $ adb install bin/GLES3JNIActivity-debug.apk
     16 where $N is '11' or '18' and
     17 ANDROID_SDK is the root of your SDK installation.
     18 
     19 The OpenGL ES 3.0 rendering path uses a few new features compared to the
     20 OpenGL ES 2.0 path:
     21 
     22 * Instanced rendering and vertex attribute divisor to reduce the number of
     23   draw calls and uniform changes.
     24 * Vertex array objects to reduce the number of calls required to set up
     25   vertex attribute state on each frame.
     26 * Explicit assignment of attribute locations, eliminating the need to query
     27   assignments.
     28 
     29 
     30 [*1] The only dependency on API level 11 is the call to
     31      setEGLContextClientVersion in GLES3JNIView. With a custom
     32      EGLConfigChooser and EGLContextFactory the sample would be compatible
     33      with older API levels.
     34