美文网首页
使用android studio搭建简单jni层的opengl

使用android studio搭建简单jni层的opengl

作者: James999 | 来源:发表于2020-07-10 17:49 被阅读0次

    上层code Java 通过jni 调用 c 完成三角形的渲染, shader代码保存在assets。

    代码结构

    image.png

    遇到的问题

    1. 要用到assetmanager 所以导入android
    2. 如果使用的是opengles 3.0版本,则需要导入GLESv3,
    target_link_libraries( # Specifies the target library.
                           # native-lib
                           JNIOpenGLES30
                           GLESv3
                           # Links the target library to the log library
                           # included in the NDK.
                           android
                           ${log-lib} )
    

    githup code

    https://github.com/yuzhimin999/NDKOpenGlDemo

    学习研究

    REF

    https://blog.csdn.net/peng_weida/article/details/45200241
    https://blog.csdn.net/zhangpengzp/article/details/88714034

    相关文章

      网友评论

          本文标题:使用android studio搭建简单jni层的opengl

          本文链接:https://www.haomeiwen.com/subject/ikgmcktx.html