Install OpenGL ES and compile code for android

前端 未结 4 1265
天涯浪人
天涯浪人 2021-02-15 14:27

I\'ve just started learning OpenGL ES on android (using this book) and came across an issue of adopting source code from chapter 5 to existing methods of using jni in android (a

4条回答
  •  感情败类
    2021-02-15 15:00

    Those libraries are provided by Android itself. However, setting up your project to find them and compile your JNI (native) code correctly can be daunting.

    I recommend using glbuffer as a starting project, as it will provide you with a GLSurfaceView to draw on and set you up with the proper Android libraries.

    The details of linking to the Android libraries are contained in jni/Android.mk inside that project if you'd like to give it a shot yourself from scratch.

    Edit - apparently glbuffer is missing jni/Application.mk. Create it and put this inside:

    APP_ABI := armeabi armeabi-v7a
    APP_PLATFORM := android-8
    

    Then the ndk will know to look inside the android-8 platform for your includes. You can change this to other versions as needed.

提交回复
热议问题