orey 发表于 2013-8-12 11:26:08


OpenGL fixed pipeline provides 4 different types of matrices (GL_MODELVIEW, GL_PROJECTION, GL_TEXTURE and GL_COLOR) and transformation routines for these matrices;glLoadIdentity(),glTranslatef(),glRotatef(),glScalef(),glMultMatrixf(),glFrustum() andglOrtho().These built-in matrices and routines are useful to develop simple OpenGL applications and to understand the matrix transformation. But once your application is getting complecated, it is better to manage your own matrix implementations by yourself for all movable objects. Furthermore, you cannot use these built-in matrix functions anymore in OpenGL programmable pipeline (GLSL) such as OpenGL v3.0+, OpenGL ES v2.0+ and WebGL v1.0+. You must have your own marix implementations then pass the matrix data to OpenGL shaders.This article provides a stand-alone, general purpose 4x4 matrix class, Matrix4 written in C++, and describes how to integrate this matrix class to the OpenGL applications. This matrix class is only dependent on the sister classes;Vector3 andVector4 definedVectors.h. These vector classes are also included inmatrix.zip. 注意:给出glRotate, glFrustum, glPerspective 等,等价的矩阵变换模式
页: [1]
查看完整版本: opengl笔记——OpenGL好资料备忘