之前介绍了什么是 OpenGL ES ,OpenGL ES 管道的概念,什么是EGL,Android中OpenGL ES的开发包以及GLSurfaceView,OpenGL ES所支持的基本几何图形:点,线,面,已及如何使用这些基本几何通过构成较复杂的图像(20面体)。

  • Android OpenGL ES 开发教程(1):导言
  • Android OpenGL ES 开发教程(2):关于OpenGL ES
  • Android OpenGL ES 开发教程(3):OpenGL ES管道(Pipeline)
  • Android OpenGL ES 开发教程(4):OpenGL ES API 命名习惯
  • Android OpenGL ES 开发教程(5):关于EGL
  • Android OpenGL ES 开发教程(6):GLSurfaceView
  • Android OpenGL ES 开发教程(7):创建实例应用OpenGLDemos程序框架
  • Android OpenGL ES 开发教程(8):基本几何图形定义
  • Android OpenGL ES 开发教程(9):绘制点Point
  • Android OpenGL ES 开发教程(10):绘制线段Line Segment
  • Android OpenGL ES 开发教程(11):绘制三角形Triangle
  • Android OpenGL ES 开发教程(12):绘制一个20面体

但到目前为止还只是绘制2D图形,而忽略了一些重要的概念,3D坐标系,和3D坐标变换,在介绍OpenGL ES Demo程序框架时,创建一个OpenGLRenderer 实现 GLSurfaceView.Renderer接口

public void onSurfaceChanged(GL10 gl, int width, int height) { // Sets the current view port to the new size. gl.glViewport(0, 0, width, height); // Select the projection matrix gl.glMatrixMode(GL10.GL_PROJECTION); // Reset the projection matrix gl.glLoadIdentity(); // Calculate the aspect ratio of the window GLU.gluPerspective(gl, 45.0f, (float) width / (float) height, 0.1f, 100.0f); // Select the modelview matrix gl.glMatrixMode(GL10.GL_MODELVIEW); // Reset the modelview matrix gl.glLoadIdentity(); }}

我们忽略了对glViewport,glMatrixMode,gluPerspective以及20面体时glLoadIdentity,glTranslatef,glRotatef等方法的介绍,这些都涉及到如何来为3D图形构建模型,在下面的几篇将详细介绍OpenGL ES的坐标系和坐标变换已经如何进行3D建模。

更多相关文章

  1. android 蓝牙、低功耗BLE开发问题总结
  2. android蓝牙开发二-
  3. Android(安卓)TV开发中所有的遥控器按键监听
  4. Android开发需要配置的环境
  5. Paint---PorterDuffXfermode
  6. Android聊天软件开发(基于网易云IM即时通讯)——添加好友(三)
  7. Eclipse 开发 Android, Hello Spinner( 学习10 )
  8. Android(安卓)Studio 打造一个适合自己开发环境-- Distraction F
  9. Pycharm安装PyQt5的详细教程

随机推荐

  1. android代码实现ScaleAnimation动画(附原
  2. android 文档民间翻译版本
  3. Android prototype Q&A video and transc
  4. Android 简单购物车
  5. 38 Android actionbar 简单使用
  6. android正确使用killProcess完全退出应用
  7. android的四种点击事件的设置
  8. 用Kotlin实现Android点击事件
  9. Android apps应用检查更新代码
  10. Android异常捕获防止崩溃弹框