| 791 | } |
| 792 | |
| 793 | void EditTSCtrl::_renderScene( ObjectRenderInst*, SceneRenderState *state, BaseMatInstance* ) |
| 794 | { |
| 795 | GFXTransformSaver saver; |
| 796 | |
| 797 | // render through console callbacks |
| 798 | SimSet * missionGroup = static_cast<SimSet*>(Sim::findObject("MissionGroup")); |
| 799 | if(missionGroup) |
| 800 | { |
| 801 | mConsoleRendering = true; |
| 802 | |
| 803 | // [ rene, 27-Jan-10 ] This calls onEditorRender on the server objects instead |
| 804 | // of on the client objects which seems a bit questionable to me. |
| 805 | |
| 806 | for(SimSetIterator itr(missionGroup); *itr; ++itr) |
| 807 | { |
| 808 | SceneObject* object = dynamic_cast< SceneObject* >( *itr ); |
| 809 | if( object && object->isRenderEnabled() && !object->isHidden() ) |
| 810 | { |
| 811 | char buf[2][16]; |
| 812 | dSprintf(buf[0], 16, object->isSelected() ? "true" : "false"); |
| 813 | dSprintf(buf[1], 16, object->isExpanded() ? "true" : "false"); |
| 814 | |
| 815 | Con::executef( object, "onEditorRender", getIdString(), buf[0], buf[1] ); |
| 816 | } |
| 817 | } |
| 818 | |
| 819 | mConsoleRendering = false; |
| 820 | } |
| 821 | |
| 822 | // render the mission area... |
| 823 | renderMissionArea(); |
| 824 | |
| 825 | // Draw the grid |
| 826 | if ( mRenderGridPlane ) |
| 827 | renderGrid(); |
| 828 | |
| 829 | // render the editor stuff |
| 830 | renderScene(mSaveViewport); |
| 831 | |
| 832 | // Draw the camera axis |
| 833 | GFX->setClipRect(mSaveViewport); |
| 834 | GFX->setStateBlock(mDefaultGuiSB); |
| 835 | renderCameraAxis(); |
| 836 | } |
| 837 | |
| 838 | void EditTSCtrl::renderMissionArea() |
| 839 | { |
nothing calls this directly
no test coverage detected