2012年11月7日
摘要: JNI函数实现extern "C" { JNIEXPORT void JNICALL Java_com_android_gl2jni_GL2JNILib_init(JNIEnv * env, jobject obj, jint width, jint height); JNIEXPORT void JNICALL Java_com_android_gl2jni_GL2JNILib_step(JNIEnv * env, jobject obj);};JNIEXPORT void JNICALL Java_com_android_gl2jni_GL2JNILib_init(JN 阅读全文
posted @ 2012-11-07 10:48 Anthony Li 阅读(2011) 评论(0) 推荐(0) 编辑
  2012年11月5日
摘要: 关于EGL的介绍:EGL is an interface between Khronos rendering APIs such as OpenGL ES or OpenVG and the underlying native platform window system. It handles graphics context management, surface/buffer binding, and rendering synchronization and enables high-performance, accelerated, mixed-mode 2D and 3D rend 阅读全文
posted @ 2012-11-05 17:21 Anthony Li 阅读(4060) 评论(0) 推荐(0) 编辑
摘要: AndroidManifest.xml<?xml version="1.0" encoding="utf-8"?><manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.android.gl2jni"> <application android:label="@string/gl2jni_activity"> <activity android:n 阅读全文
posted @ 2012-11-05 15:51 Anthony Li 阅读(2168) 评论(0) 推荐(0) 编辑
  2012年11月4日
摘要: Android NDK开发包中,在sample文件夹下,有一个使用OpenGL ES 2.0的范例——hello-gl2。它为我们展示了,如何通过Android NDK,调用底层OpenGL ES库来渲染界面。1、导入项目打开Eclipse,New->Project...,选择Android Project from Existing Code,点击Next下一步Import Projects,在Root Directory:栏,点击按钮Browser浏览文件夹,选择Android NDK根目录/samples/hello-gl2,点击Finish导入项目成功导入项目后,会在Packag 阅读全文
posted @ 2012-11-04 16:42 Anthony Li 阅读(3034) 评论(1) 推荐(0) 编辑
  2012年10月16日
摘要: 方法A:菜单栏Tools -> 下拉菜单Options...勾选复选框 force https://...http://...方法A,如果行不通,方法B:打开文件夹C:\Windows\System32\drivers\etc,找到文件hosts通常情况下,不是管理员是没有权限修改该文件的。所以,先修改该文件的权限。右键,属性 -> 安全 -> 编辑,为你当前登录用户添加权限。在该文件末尾添加:203.208.46.146 dl.google.com203.208.46.146 dl-ssl.google.com重新启动Android SDK Manager 阅读全文
posted @ 2012-10-16 16:03 Anthony Li 阅读(503) 评论(0) 推荐(0) 编辑
  2012年10月12日
摘要: 1、建立Android应用application name: CallJavaMethodpackage name: com.example.cjmmain Activity: MainActivitymain Activity layout: activity_main2、Java实现打开layout/activity_main.xml布局文件,添加按钮控件,ID为“display_button_activity_main”<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android&quo 阅读全文
posted @ 2012-10-12 18:06 Anthony Li 阅读(7839) 评论(0) 推荐(0) 编辑
  2012年10月11日
摘要: 类型签名(Type Signatures) (<Parameter 1 Type Code>[<Parameter 1 Class>];...)<Return Type Code>The JNI uses the Java VM’s representation of type signatures. Following Table shows these type signatures.Type SignatureJava TypeZbooleabBbyteCcharSshortIintJlongFfloatDdoubleL full-qualified- 阅读全文
posted @ 2012-10-11 16:50 Anthony Li 阅读(697) 评论(0) 推荐(0) 编辑
  2012年10月7日
摘要: Java type JNI type C type Stdint C type booleanjbooleanunsigned charuint8_tbytejbytesigned charint8_tcharjcharunsigned shortuint16_tdoublejdoubledoubledoublefloatjfloatfloatfloatintjintintint32_tlongjlonglong longint64_tshortjshortshortint16_t 阅读全文
posted @ 2012-10-07 17:23 Anthony Li 阅读(423) 评论(0) 推荐(0) 编辑
摘要: 1、安装make build工具执行以下命令:sudo apt-get install build-essential2、下载NDK官网下载页:http://developer.android.com/tools/sdk/ndk/index.html选择Linux 32/64-bit (x86)版本,下载下载成功后,解压到/usr/lib/目录下3、配置Eclipse插件a) 搭建SDK开发环境,参考:【学习Android NDK开发】搭建Android SDK开发环境(Ubuntu 12.04 LTS 32-bit)打开Eclipse,设置NDK路径,Window -> Prefere 阅读全文
posted @ 2012-10-07 14:27 Anthony Li 阅读(6164) 评论(0) 推荐(0) 编辑
摘要: ndk-gdb,调试native code,出现以下错误:ndk-gdb --verbose,查看信息: --verbose: Print verbose information about the native debugging session setup. Only needed to debug problems when you can't connect and that the error messages printed by ndk-gdb are not enough.调试手机:HTC Desire Android 2.2Are you sure tha... 阅读全文
posted @ 2012-10-07 13:36 Anthony Li 阅读(3236) 评论(0) 推荐(0) 编辑

博客园博客已停止更新,博客地址:dyinigbleed.com