鍍金池/ 教程/ Android/ 階段小結(jié)
繪制線段 Line Segment
投影變換 Projection
繪制迷你太陽系
繪制一個球體
繪制三角形 Triangle
OpenGL 光照模型
三維坐標(biāo)系及坐標(biāo)變換初步
定義 3D 模型的前面和后面
繪制一個 20 面體
顏色 Color
Depth Buffer
材質(zhì)及光照示例
基本幾何圖形定義
關(guān)于EGL
導(dǎo)言
Viewing 和 Modeling(MODELVIEW) 變換
FrameBuffer
設(shè)置光照效果 Set Lighting
Viewport 變換
階段小結(jié)
繪制點 Point
OpenGL ES API 命名習(xí)慣
通用的矩陣變換指令
關(guān)于 OpenGL ES
創(chuàng)建實例應(yīng)用 OpenGLDemos 程序框架
OpenGL ES 管道(Pipeline)
GLSurfaceView

階段小結(jié)

之前介紹了什么是 OpenGL ES ,OpenGL ES 管道的概念,什么是 EGL,Android中OpenGL ES 的開發(fā)包以及 GLSurfaceView,OpenGL ES 所支持的基本幾何圖形:點,線,面,已及如何使用這些基本幾何通過構(gòu)成較復(fù)雜的圖像(20面體)。

但到目前為止還只是繪制 2D 圖形,而忽略了一些重要的概念,3D 坐標(biāo)系,和 3D 坐標(biāo)變換,在介紹 OpenGL ES Demo 程序框架時,創(chuàng)建一個 OpenGLRenderer 實現(xiàn) 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 圖形構(gòu)建模型,在下面的幾篇將詳細(xì)介紹 OpenGL ES 的坐標(biāo)系和坐標(biāo)變換已經(jīng)如何進行3D建模。