OpenGL学习笔记(-)

OpenGL

模型—->窗口显示涉及到几个矩阵

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

颜色设置

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

坐标系

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.

猜你喜欢

转载自blog.csdn.net/qq494946022/article/details/80056406