用户操作
[留言]  [发消息]  [加为好友] 
订阅我的博客
XML聚合    FeedSky
订阅到鲜果
订阅到Google
订阅到抓虾
n5的公告
在信息时代,客观障碍已不复存在,所谓障碍都是主观上的。如果你想研发什么新的技术,你不需要几百万美元的资金,你只需要在冰箱里放满比萨和可乐,再有一台便宜的计算机,和与之献身的决心,你即可拥有任何你想拥有的编程境界!- John Carmack
文章分类
同道中人
lyo-非常酷的J2ME模拟器(RSS)
游戏开发&3D
3D Game Study-google邮件列表
EuclideanSpace - building a 3D world
realtimerendering.com
一个不错的3D教程
专业站点
J2ME开发网
Nokia论坛讨论区
python中文社区
sonyericsson开发者站点
存档

原创  OpenGL clip plane会受modle-view matrix影响 收藏

From the red book: OpenGL implementations often must compute the inverse of the modelview matrix so that normals and clipping planes can be correctly transformed to eye coordinates.

From google: When you call glClipPlane, equation is transformed by the inverse of the modelview matrix and stored in the resulting eye coordinates. Subsequent changes to the modelview matrix have no effect on the stored plane-equation components.

即, 调用glClipPlane时,会使用当前的modle-view矩阵的逆矩阵将plane变换到eye space,因为openGL的model-view矩阵是合并的,所以要保证调用glClipPlane时,modle-view矩阵只包含当前的 view矩阵,而没受到任何modle矩阵的污染。但调用glClipPlane之后的modle-view矩阵不会再影响已经变换好的clip plane。

发表于 @ 2009年06月21日 21:48:00 | 评论( loading... ) | 编辑| 举报| 收藏

旧一篇:成为优秀的程序员真不简单 | 新一篇:lens flare:镜头光晕

  • 发表评论
  • 评论内容:
  •  
Copyright © n5
Powered by CSDN Blog