【Android OpenGL ES】阅读hello-gl2代码(四)C/C++代码
摘要: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
阅读(2017)
推荐(0) 编辑
【Android OpenGL ES】阅读hello-gl2代码(三)配置EGL
摘要:关于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
阅读(4078)
推荐(0) 编辑
【Android OpenGL ES】阅读hello-gl2代码(二)Java代码
摘要: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
阅读(2184)
推荐(0) 编辑
【Android OpenGL ES】阅读hello-gl2代码(一)准备工作
摘要: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
阅读(3046)
推荐(0) 编辑