0) load the plugin
1) add every scenemanager that you want to use deferred shading with to the DeferredShadingManager singleton. (often that is only one, I guess...)
Code: Select all
DeferredShadingManager::getSingleton().addSceneManager(mSceneMgr);
Code: Select all
DeferredShadingSystem* mSystem = new DeferredShadingSystem(mWindow->getViewport(0), mCamera);
n-1) delete the DeferredShadingSystems.
n) unregister the scenemanager with the DeferredShadingManager.
I created it using OGRE_STATIC (as that is whay I use for my project). To make it also available for dynamic builds I tried to apply all the _declspec-like and CMAKE code that is used for the other plugins, but when I try to build the deferred shading sample, it gives 10 unresolved externals (all referring to functions from my plugin). So probably something is going wrong, but I'm clueless what, because static linking works fine.
I've also only tested the patch on Windows XP (openGL). I need testers to test it on the other platforms.