From a49c9c458aac2a738c3cf90860fb6e942747617e Mon Sep 17 00:00:00 2001 From: Hamed Zaghaghi Date: Sat, 12 Jul 2008 10:21:37 +0000 Subject: improvement of 2d-filter custom shader, some bugfixes, now you can use depth buffer and luminance buffer without any settings, also you can use object's properties in a shader --- source/gameengine/GameLogic/SCA_2DFilterActuator.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'source/gameengine/GameLogic/SCA_2DFilterActuator.cpp') diff --git a/source/gameengine/GameLogic/SCA_2DFilterActuator.cpp b/source/gameengine/GameLogic/SCA_2DFilterActuator.cpp index 56249bb52ec..96a770a553f 100644 --- a/source/gameengine/GameLogic/SCA_2DFilterActuator.cpp +++ b/source/gameengine/GameLogic/SCA_2DFilterActuator.cpp @@ -7,7 +7,6 @@ #endif #include - SCA_2DFilterActuator::~SCA_2DFilterActuator() { } @@ -18,7 +17,6 @@ SCA_2DFilterActuator::SCA_2DFilterActuator( short flag, float float_arg, int int_arg, - short texture_flag, RAS_IRasterizer* rasterizer, RAS_IRenderTools* rendertools, PyTypeObject* T) @@ -26,11 +24,15 @@ SCA_2DFilterActuator::SCA_2DFilterActuator( m_type(type), m_flag(flag), m_int_arg(int_arg), - m_texture_flag(texture_flag), m_float_arg(float_arg), m_rasterizer(rasterizer), m_rendertools(rendertools) { + m_gameObj = NULL; + if(gameobj){ + m_propNames = gameobj->GetPropertyNames(); + m_gameObj = gameobj; + } } void SCA_2DFilterActuator::SetShaderText(STR_String text) @@ -52,8 +54,6 @@ CValue* SCA_2DFilterActuator::GetReplica() bool SCA_2DFilterActuator::Update() { - bool result = false; - bool bNegativeEvent = IsNegativeEvent(); RemoveAllEvents(); @@ -74,7 +74,7 @@ bool SCA_2DFilterActuator::Update() } else if(m_type < RAS_2DFilterManager::RAS_2DFILTER_NUMBER_OF_FILTERS) { - m_rendertools->Update2DFilter(m_type, m_int_arg, m_shaderText, m_texture_flag); + m_rendertools->Update2DFilter(m_propNames, m_gameObj, m_type, m_int_arg, m_shaderText); } return true; } -- cgit v1.2.3