Index: GTP/trunk/App/Demos/Vis/FriendlyCulling/src/ShaderManager.h
===================================================================
--- GTP/trunk/App/Demos/Vis/FriendlyCulling/src/ShaderManager.h	(revision 3055)
+++ GTP/trunk/App/Demos/Vis/FriendlyCulling/src/ShaderManager.h	(revision 3056)
@@ -70,12 +70,4 @@
 	ShaderMap mShaderMap;
 
-	////////////
-	//-- default shader programs
-
-	ShaderProgram *mMrtDefaultVertexProgram;
-	ShaderProgram *mMrtDefaultFragmentProgram;
-	ShaderProgram *mMrtDefaultFragmentTexProgram;
-
-
 private:
 
Index: GTP/trunk/App/Demos/Vis/FriendlyCulling/src/ShaderManager.cpp
===================================================================
--- GTP/trunk/App/Demos/Vis/FriendlyCulling/src/ShaderManager.cpp	(revision 3055)
+++ GTP/trunk/App/Demos/Vis/FriendlyCulling/src/ShaderManager.cpp	(revision 3056)
@@ -26,4 +26,7 @@
 
 
+// only instance of the shader manager
+ShaderManager *ShaderManager::sShaderManager = NULL;
+
 /////////
 //-- cg stuff
@@ -34,10 +37,4 @@
 static CGprofile sCgVertexProfile; 
 
-static ShaderProgram *sTreeAnimationProgramMrt;
-static ShaderProgram *sTreeAnimationProgram;
-static ShaderProgram *sTreeAnimation;
-
-// only instance of the shader manager
-ShaderManager *ShaderManager::sShaderManager = NULL;
 
 
@@ -73,34 +70,42 @@
 	// set textures to auto load
 	cgGLSetManageTextureParameters(sCgContext, false);
-
-	mMrtDefaultVertexProgram = CreateVertexProgram("mrt", "vtx", "defaultMrtVertex");
-	mMrtDefaultFragmentProgram = CreateFragmentProgram("mrt", "frag", "defaultMrtFragment");
-	mMrtDefaultFragmentTexProgram = CreateFragmentProgram("mrt", "fragtex", "defaultMrtFragmentTex");
+	
+	///////////////
+	//-- load the defaul programs for mrt (used if not defined by the user)
+
+	ShaderProgram *vertexProgMrt, *fragmentProgMrt, *fragmentProgMrtTex;
+
+	vertexProgMrt = CreateVertexProgram("mrt", "vtx", "defaultVertexMrt");
+	fragmentProgMrt = CreateFragmentProgram("mrt", "frag", "defaultFragmentMrt");
+	fragmentProgMrtTex = CreateFragmentProgram("mrt", "fragtex", "defaultFragmentTexMrt");
 
 	// provide the current view matrix
-	mMrtDefaultFragmentProgram->AddParameter("viewMatrix", 0);
-	mMrtDefaultFragmentTexProgram->AddParameter("viewMatrix", 0);
+	fragmentProgMrt->AddParameter("viewMatrix", 0);
+	fragmentProgMrtTex->AddParameter("viewMatrix", 0);
+
 	// add a texture parameter
-	mMrtDefaultFragmentTexProgram->AddParameter("tex", 1);
+	fragmentProgMrtTex->AddParameter("tex", 1);
 
 
 	//////////////////////////
-	//-- hack: apply hardcoded tree animation (should be provided with a material script!)
-
-	sTreeAnimationProgram = CreateVertexProgram("treeanimation", "animateVtx", "treeAnimation");
-	sTreeAnimationProgramMrt = CreateVertexProgram("treeanimation", "animateVtxMrt", "treeAnimationMrt");
-
-	sTreeAnimationProgram->AddParameter("timer", 0);
-	sTreeAnimationProgram->AddParameter("windDir", 1);
-	sTreeAnimationProgram->AddParameter("windStrength", 2);
-	sTreeAnimationProgram->AddParameter("minMaxPos", 3);
-	sTreeAnimationProgram->AddParameter("frequency", 4);
-	sTreeAnimationProgram->AddParameter("lightDir", 5);
-
-	sTreeAnimationProgramMrt->AddParameter("timer", 0);
-	sTreeAnimationProgramMrt->AddParameter("windDir", 1);
-	sTreeAnimationProgramMrt->AddParameter("windStrength", 2);
-	sTreeAnimationProgramMrt->AddParameter("minMaxPos", 3);
-	sTreeAnimationProgramMrt->AddParameter("frequency", 4);
+	//-- hack: use hardcoded tree animation (should be provided with a material script!)
+
+	ShaderProgram *treeAnimProg, *treeAnimProgMrt;
+
+	treeAnimProg = CreateVertexProgram("treeanimation", "animateVtx", "treeAnimation");
+	treeAnimProgMrt = CreateVertexProgram("treeanimation", "animateVtxMrt", "treeAnimationMrt");
+
+	treeAnimProg->AddParameter("timer", 0);
+	treeAnimProg->AddParameter("windDir", 1);
+	treeAnimProg->AddParameter("windStrength", 2);
+	treeAnimProg->AddParameter("minMaxPos", 3);
+	treeAnimProg->AddParameter("frequency", 4);
+	treeAnimProg->AddParameter("lightDir", 5);
+
+	treeAnimProgMrt->AddParameter("timer", 0);
+	treeAnimProgMrt->AddParameter("windDir", 1);
+	treeAnimProgMrt->AddParameter("windStrength", 2);
+	treeAnimProgMrt->AddParameter("minMaxPos", 3);
+	treeAnimProgMrt->AddParameter("frequency", 4);
 
 	cout << "cg initialization successful" << endl;
