Fix #27635: GLSL filter uniform variable not set for group instance.

The problem was that SCA_2DFilterActuator was defining and using a
variable called "m_gameObj", when it should be using "m_gameobj" as
defined by SCA_ILogicBrick. The way it was, reparenting did only half
the work required to duplicate the actuator.

Patch by Alex Fraser, thanks!
This commit is contained in:
Brecht Van Lommel
2011-06-13 11:36:25 +00:00
parent 1b1fdd7ecf
commit e8eefbf757
2 changed files with 3 additions and 4 deletions

View File

@@ -55,10 +55,10 @@ SCA_2DFilterActuator::SCA_2DFilterActuator(
m_rasterizer(rasterizer),
m_scene(scene)
{
m_gameObj = NULL;
m_gameobj = NULL;
if(gameobj){
m_propNames = gameobj->GetPropertyNames();
m_gameObj = gameobj;
m_gameobj = gameobj;
}
}
@@ -91,7 +91,7 @@ bool SCA_2DFilterActuator::Update()
}
else if(m_type < RAS_2DFilterManager::RAS_2DFILTER_NUMBER_OF_FILTERS)
{
m_scene->Update2DFilter(m_propNames, m_gameObj, m_type, m_int_arg, m_shaderText);
m_scene->Update2DFilter(m_propNames, m_gameobj, m_type, m_int_arg, m_shaderText);
}
// once the filter is in place, no need to update it again => disable the actuator
return false;

View File

@@ -42,7 +42,6 @@ class SCA_2DFilterActuator : public SCA_IActuator
private:
vector<STR_String> m_propNames;
void * m_gameObj;
RAS_2DFilterManager::RAS_2DFILTER_MODE m_type;
short m_disableMotionBlur;
float m_float_arg;