物探论坛

 找回密码
 立即注册

QQ登录

只需一步,快速开始

查看: 1192|回复: 0

[Envi] opengl笔记——OpenGL好资料备忘

[复制链接]
发表于 2013-8-12 11:26:08 | 显示全部楼层 |阅读模式
Overview

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 等,等价的矩阵变换模式


回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|手机版|小黑屋|物探论坛 ( 鄂ICP备12002012号 微信号:iwutan )

GMT+8, 2024-3-29 02:15 , Processed in 0.068251 second(s), 21 queries .

Powered by Discuz! X3.4

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表