Commits

Steve Streeting  committed 4e8ea27

Fix a problem with using some of the lower-level renderable callbacks such as RenderObjectListener to alter shader parameter state - mGpuParamsDirty would not be updated to reflect this and as such things like manual param variances within light iteration loops would not be propagated.
Allow user to mark GPU params dirty themselves to resolve this.

  • Participants
  • Parent commits b4f158c
  • Branches v1-7

Comments (0)

Files changed (2)

File OgreMain/include/OgreSceneManager.h

         */
         virtual const Pass* _setPass(const Pass* pass, 
 			bool evenIfSuppressed = false, bool shadowDerivation = true);
+		
+		/** Method to allow you to mark gpu parameters as dirty, causing them to 
+			be updated according to the mask that you set when updateGpuProgramParameters is
+			next called. Only really useful if you're controlling parameter state in 
+			inner rendering loop callbacks.
+			@param mask Some combination of GpuParamVariability which is bitwise OR'ed with the
+				current dirty state.
+		*/
+		virtual void _markGpuParamsDirty(uint16 mask);
 
 
 		/** Indicates to the SceneManager whether it should suppress the 

File OgreMain/src/OgreSceneManager.cpp

 	mDestRenderSystem->bindGpuProgram(prog);
 }
 //---------------------------------------------------------------------
+void SceneManager::_markGpuParamsDirty(uint16 mask)
+{
+	mGpuParamsDirty |= mask;
+}
+//---------------------------------------------------------------------
 void SceneManager::updateGpuProgramParameters(const Pass* pass)
 {
 	if (pass->isProgrammable())