OpenGL study notes (-)

OpenGL

Model-->Window display involves several matrices

glMatrixMode(GL_PROJECTION)
投影变换 -有一个矩阵栈,新绘制的图像会使用栈顶矩阵
包括了 
glOrtho()      正交变换
gluPerspective() 射影变换
glMatrixMode(GL_MODELVIEW)
模型变换与视图变化--也有一个矩阵栈,新绘制的图像会使用栈顶矩阵
gluLookAt()     调整相机位置与方向
glTranslatef()  调整模型的位置
glViewPort()  视口变换,将截取的模型如何放在窗口上,以及放在窗口的位置

color settings

glClearcolor(Color) 设置缓冲区颜色
glClear(GL_COLOR_BUFFER_BIT)  使用缓冲区颜色进行背景的涂色

Coordinate System

opengl的右手定则
X is your thumb
Y is your index
Z is your middle finger. If you put your thumb to the right and your index to the sky, it will point to your back, too.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324721965&siteId=291194637