Ogre作为图形渲染引擎, 采用OO模式, 用了不少设计模式 , 个人认为有种滥用的样子,  有趋于学院派的作品趋势,当然,尽可能的采用各种设计模式会使引擎更具有理论上的合理性,但是OGRE为了达到更高统一性,而使引擎的趋于复杂,调用关系不再直观,带来的后果将是越来越难以深层次开发.

学习就是要将复杂的东西弄简单了,简单的东西搞深入了.下面简单将OGRE的引擎渲染流程,调用关系分析下,看下他和别的图形引擎渲染流程的的异同. 画下图.

 

SceneManager::_renderScene
|
|-------_updateSceneGraph(camera);
|
|-------prepareRenderQueue();
|
|-------_findVisibleObjects
|
|
|
|
|
|
|------_renderVisibleObjects
|      |
|      |-----renderVisibleObjectsDefaultSequence
|            |
|            |-------_renderQueueGroupObjects
|                    |
|                    |---------renderBasicQueueGroupObjects
|                              |
|                              |---------sort
|                              |---------renderObjects
|                              |         |
|                              |         |--------acceptVisitorGrouped
|                              |                  |
|                              |                  |---------visit
|                              |                            |
|                                                           |-------------renderSingleObject
|
|
|

 

作者:Perit

 

posted on 2010-06-17 17:19  操作系统  阅读(1162)  评论(0编辑  收藏  举报