- Timestamp:
- 06/14/05 09:08:04 (20 years ago)
- Location:
- trunk/VUT/work/ogre_changes
- Files:
-
- 2 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/VUT/work/ogre_changes/OgreMain/include/OgreSceneManager.h
r115 r131 149 149 */ 150 150 virtual Pass* setPass(Pass* pass); 151 152 /** Renders an Ogre Entity. 153 */ 154 //void renderEntity(Entity *ent); 155 156 /** Renders an Ogre MovableObject. 157 */ 158 void _renderMovableObject(MovableObject *mov, const bool leaveTransparentsInQueue); 159 151 160 #endif // GTP_VISIBILITY_MODIFIED_OGRE 152 161 -
trunk/VUT/work/ogre_changes/OgreMain/src/OgreSceneManager.cpp
r115 r131 646 646 647 647 // TEST 648 /*649 LogManager::getSingleton().logMessage("BEGIN PASS " + StringConverter::toString(pass->getIndex()) +650 " of " + pass->getParent()->getParent()->getName());651 */648 649 //LogManager::getSingleton().logMessage("BEGIN PASS " + StringConverter::toString(pass->getIndex()) + 650 //" of " + pass->getParent()->getParent()->getName() + "\n"); 651 652 652 bool passSurfaceAndLightParams = true; 653 653 … … 779 779 void SceneManager::_renderScene(Camera* camera, Viewport* vp, bool includeOverlays) 780 780 { 781 LogManager::getSingleton().logMessage("***********RENDER SCENE************"); 781 782 Root::getSingleton()._setCurrentSceneManager(this); 782 783 // Prep Pass for use in debug shadows … … 1540 1541 renderShadowVolumesToStencil(l, mCameraInProgress); 1541 1542 // render full-screen shadow modulator for all lights 1543 //LogManager::getSingleton().logMessage("setting shadow modulative pass"); 1542 1544 setPass(mShadowModulativePass); 1543 1545 // turn stencil check on … … 1800 1802 continue; 1801 1803 1804 //LogManager::getSingleton().logMessage("setting solid pass"); 1802 1805 // For solids, we try to do each pass in turn 1803 1806 Pass* usedPass = setPass(ipass->first); … … 1830 1833 itrans != itransend; ++itrans) 1831 1834 { 1835 //LogManager::getSingleton().logMessage("setting transparent pass"); 1832 1836 // For transparents, we have to accept that we can't sort entirely by pass 1833 1837 setPass(itrans->pass); … … 1915 1919 if (p->getParent()->getParent()->getTransparencyCastsShadows()) 1916 1920 { 1921 //LogManager::getSingleton().logMessage("setting transparent shadow pass"); 1917 1922 setPass(p); 1918 1923 renderSingleObject(itrans->renderable, p, doLightIteration, manualLightList); … … 2413 2418 mDestRenderSystem->_beginFrame(); 2414 2419 2420 //LogManager::getSingleton().logMessage("setting manual pass"); 2415 2421 setPass(pass); 2416 2422 mDestRenderSystem->_render(*rend); … … 2656 2662 if (l->isVisible()) 2657 2663 { 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2664 if (l->getType() == Light::LT_DIRECTIONAL) 2665 { 2666 // Always visible 2667 mLightsAffectingFrustum.push_back(l); 2668 } 2669 else 2670 { 2671 // NB treating spotlight as point for simplicity 2672 // Just see if the lights attenuation range is within the frustum 2673 sphere.setCenter(l->getDerivedPosition()); 2674 sphere.setRadius(l->getAttenuationRange()); 2675 if (camera->isVisible(sphere)) 2676 { 2677 mLightsAffectingFrustum.push_back(l); 2678 } 2679 2680 } 2681 } 2676 2682 } 2677 2683 … … 3008 3014 Pass* SceneManager::deriveShadowCasterPass(Pass* pass) 3009 3015 { 3016 //LogManager::getSingleton().logMessage("*********derive shadow caster pass*********"); 3010 3017 switch (mShadowTechnique) 3011 3018 { … … 3013 3020 if (mShadowTextureCustomCasterPass) 3014 3021 { 3022 //LogManager::getSingleton().logMessage("custom caster pass"); 3015 3023 // Caster pass has been customised 3016 3024 3017 3025 if (!pass->getShadowCasterVertexProgramName().empty()) 3018 3026 { 3027 //LogManager::getSingleton().logMessage("custom caster pass has vertex program"); 3019 3028 // Have to merge the shadow caster vertex program in 3020 3029 mShadowTextureCustomCasterPass->setVertexProgram( … … 3033 3042 else if (mShadowTextureCasterVPDirty) 3034 3043 { 3044 //LogManager::getSingleton().logMessage("caster pass dirty"); 3035 3045 // reset 3036 3046 mShadowTextureCustomCasterPass->setVertexProgram( … … 3048 3058 else 3049 3059 { 3060 //LogManager::getSingleton().logMessage("standard caster pass"); 3050 3061 // Standard pass 3051 3062 if (pass->hasVertexProgram()) 3052 3063 { 3064 //LogManager::getSingleton().logMessage("standard caster pass has vertex program"); 3053 3065 // Have to merge the shadow caster vertex program in 3054 3066 // This may in fact be blank, in which case it falls back on … … 3071 3083 else if (mShadowCasterPlainBlackPass->hasVertexProgram()) 3072 3084 { 3085 //LogManager::getSingleton().logMessage("standard caster pass no vertex program"); 3073 3086 // reset 3074 3087 mShadowCasterPlainBlackPass->setVertexProgram(""); … … 3084 3097 Pass* SceneManager::deriveShadowReceiverPass(Pass* pass) 3085 3098 { 3086 3099 //LogManager::getSingleton().logMessage("*********derive shadow receiver pass*********"); 3087 3100 switch (mShadowTechnique) 3088 3101 { … … 3091 3104 { 3092 3105 // Receiver pass has been customised 3093 3106 //LogManager::getSingleton().logMessage("custom receiver pass"); 3094 3107 if (!pass->getShadowReceiverVertexProgramName().empty()) 3095 3108 { 3109 //LogManager::getSingleton().logMessage("merge receiver pass shadow vertex program"); 3096 3110 // Have to merge the shadow Receiver vertex program in 3097 3111 mShadowTextureCustomReceiverPass->setVertexProgram( … … 3110 3124 else if (mShadowTextureReceiverVPDirty) 3111 3125 { 3126 //LogManager::getSingleton().logMessage("receiver pass dirty"); 3112 3127 // reset 3113 3128 mShadowTextureCustomReceiverPass->setVertexProgram( … … 3125 3140 else 3126 3141 { 3142 //LogManager::getSingleton().logMessage("no custom receiver pass"); 3127 3143 if (pass->hasVertexProgram()) 3128 3144 { 3145 //LogManager::getSingleton().logMessage("standard receiver pass has vertex program"); 3129 3146 // Have to merge the receiver vertex program in 3130 3147 // This may return "" which means fixed function will be used … … 3146 3163 else if (mShadowReceiverPass->hasVertexProgram()) 3147 3164 { 3165 //LogManager::getSingleton().logMessage("standard receiver pass no vertex program"); 3148 3166 // reset 3149 3167 mShadowReceiverPass->setVertexProgram(""); … … 3367 3385 setColourOperationEx(LBX_MODULATE, LBS_MANUAL, LBS_CURRENT, 3368 3386 zfailAlgo ? ColourValue(0.7, 0.0, 0.2) : ColourValue(0.0, 0.7, 0.2)); 3387 //LogManager::getSingleton().logMessage("setting shadow debug pass"); 3369 3388 setPass(mShadowDebugPass); 3370 3389 renderShadowVolumeObjects(iShadowRenderables, mShadowDebugPass, &lightList, flags, … … 4183 4202 node->_findVisibleObjects(cam, getRenderQueue(), false, mDisplayNodes, false); 4184 4203 SceneManager::_renderVisibleObjects(); 4185 4204 4186 4205 // delete all rendered objects from renderqueue 4187 4206 _deleteRenderedQueueGroups(leaveTransparentsInQueue); … … 4206 4225 else 4207 4226 { 4208 pGroup->clear();4209 }4227 pGroup->clear(); 4228 } 4210 4229 } 4211 4230 } … … 4214 4233 // Pass::processPendingPassUpdates(); 4215 4234 } 4235 //----------------------------------------------------------------------- 4236 /*void SceneManager::renderEntity(Entity *ent) 4237 { 4238 int n = (int)ent->getNumSubEntities(); 4239 4240 for (int i = 0; i < n; ++i) 4241 { 4242 Pass *pass = setPass(ent->getSubEntity(i)->getTechnique()->getPass(0)); 4243 4244 _renderSingleObject(ent->getSubEntity(i), pass, false); 4245 } 4246 }*/ 4247 //----------------------------------------------------------------------- 4248 void SceneManager::_renderMovableObject(MovableObject *mov, const bool leaveTransparentsInQueue) 4249 { 4250 mov->_updateRenderQueue(getRenderQueue()); 4251 SceneManager::_renderVisibleObjects(); 4252 4253 // delete rendered objects from renderqueue 4254 //TODO: should be first 4255 _deleteRenderedQueueGroups(leaveTransparentsInQueue); 4256 } 4216 4257 #endif //GTP_VISIBILITY_MODIFIED_OGRE 4217 4258 }
Note: See TracChangeset
for help on using the changeset viewer.