| 765 | //------------------------------------------------------------------------------ |
| 766 | |
| 767 | void EditTSCtrl::renderWorld(const RectI & updateRect) |
| 768 | { |
| 769 | // Make sure that whatever the editor does, it doesn't |
| 770 | // dirty the GFX transform state. |
| 771 | GFXTransformSaver saver; |
| 772 | |
| 773 | updateGizmo(); |
| 774 | |
| 775 | gClientSceneGraph->setDisplayTargetResolution(getExtent()); |
| 776 | |
| 777 | // Use a render instance to do editor 3D scene |
| 778 | // rendering after HDR is processed and while the depth |
| 779 | // buffer is still intact. |
| 780 | RenderPassManager *rpm = gClientSceneGraph->getDefaultRenderPass(); |
| 781 | ObjectRenderInst *inst = rpm->allocInst<ObjectRenderInst>(); |
| 782 | inst->type = RenderPassManager::RIT_Editor; |
| 783 | inst->renderDelegate.bind(this, &EditTSCtrl::_renderScene); |
| 784 | rpm->addInst(inst); |
| 785 | |
| 786 | if( mDisplayType == DisplayTypePerspective ) |
| 787 | gClientSceneGraph->renderScene( SPT_Diffuse ); |
| 788 | else |
| 789 | { |
| 790 | // If we are in an orthographic mode, do a special render |
| 791 | // with AL, fog, and PostFX disabled. |
| 792 | |
| 793 | FogData savedFogData = gClientSceneGraph->getFogData(); |
| 794 | gClientSceneGraph->setFogData( FogData() ); |
| 795 | |
| 796 | SceneRenderState renderState |
| 797 | ( |
| 798 | gClientSceneGraph, |
| 799 | SPT_Diffuse |
| 800 | ); |
| 801 | |
| 802 | gClientSceneGraph->renderScene( &renderState ); |
| 803 | gClientSceneGraph->setFogData( savedFogData ); |
| 804 | } |
| 805 | } |
| 806 | |
| 807 | void EditTSCtrl::_renderScene( ObjectRenderInst*, SceneRenderState *state, BaseMatInstance* ) |
| 808 | { |
nothing calls this directly
no test coverage detected