doing5552

记录每日点滴,不枉人生一世

  C++博客 :: 首页 :: 联系 :: 聚合  :: 管理
  73 Posts :: 0 Stories :: 94 Comments :: 0 Trackbacks

公告

常用链接

留言簿(24)

我参与的团队

最新随笔

搜索

  •  

积分与排名

  • 积分 - 452268
  • 排名 - 47

最新随笔

最新评论

阅读排行榜

评论排行榜


glPushMatrix didn't fail to push onto the stack; it's job is to push a copy of the current matrix onto a stack of matrices. Those matrices on the stack don't interact at all. You only manipulate the current, top-most, matrix at any given time.

Example 1:
   command                 result
glLoadMatrixf(A)       stack = [A]
glPushMatrix()         stack = [A, A]
glLoadMatrixf(B)       stack = [B, A]
glPopMatrix()          stack = [A]

Example 2:
   command                 result
glLoadMatrixf(A)       stack = [A]
glPushMatrix()         stack = [A, A]
glMultMatrixf(B)       stack = [AB, A]
glPopMatrix()          stack = [A]


Notice that glLoadMatrixf replaced the top-most matrix, whilst glMultMatrixf just manipulated it.
Likewise, functions such as glTranslate* and glRotate* just manipulate (by multiplication) the top-most matrix.
posted on 2008-12-31 10:47 doing5552 阅读(815) 评论(0)  编辑 收藏 引用

只有注册用户登录后才能发表评论。
网站导航: 博客园   IT新闻   BlogJava   知识库   博问   管理