Jacob Moen avatar Jacob Moen committed a90a344

The GUI does not cast shadows anymore - closes issue #3

Comments (0)

Files changed (2)

demo/Example_WorldEditor/OgreApp.cpp

 void OgreApp::createScene()
 {
 	sceneMgr->setAmbientLight(Ogre::ColourValue(0.6f, 0.6f, 0.6f));
-	sceneMgr->setShadowTechnique(Ogre::SHADOWTYPE_STENCIL_ADDITIVE);
+	//sceneMgr->setShadowTechnique(Ogre::SHADOWTYPE_STENCIL_ADDITIVE);
+	sceneMgr->setShadowTechnique(Ogre::SHADOWTYPE_TEXTURE_ADDITIVE);
 
 	node = sceneMgr->getRootSceneNode()->createChildSceneNode("OgreHead");
 	ent = sceneMgr->createEntity("Ogre", "ogrehead.mesh");

src/TwOgreWindowManager.cpp

 #include "TwOgreWindow.h"
 
 #include "OgreException.h"
-
+#include <OgreMaterialManager.h>
+#include <OgreRenderQueueInvocation.h>
 #include "AntTweakBar.h"
 
 template<> TwOgre::WindowManager* Ogre::Singleton<TwOgre::WindowManager>::ms_Singleton = 0;
 
 	void WindowManager::renderQueueStarted(Ogre::uint8 queueGroupId, const Ogre::String& invocation, bool& skipThisInvocation)
 	{
+		if (invocation == Ogre::RenderQueueInvocation::RENDER_QUEUE_INVOCATION_SHADOWS)
+			return;
 		// We're going to render ourselves in the Overlay Queue so we're always on top
 		if(queueGroupId == Ogre::RENDER_QUEUE_OVERLAY)
 		{
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.