- const PropertyInputImpl* property = NULL;
-
- const SceneGraph::PropertyBase* baseProperty =
- SHADER_IMPL.GetRegisteredSceneGraphProperty( this,
- &Shader::FindAnimatableProperty,
- &Shader::FindCustomProperty,
- index );
- property = static_cast<const PropertyInputImpl*>( baseProperty );
-
- if( property == NULL && index < DEFAULT_PROPERTY_MAX_COUNT )
- {
- if( index == Dali::Shader::Property::SHADER_HINTS )
- {
- // @todo MESH_REWORK - return the property
- }
- else
- {
- DALI_ASSERT_ALWAYS( 0 && "Property is not a valid constraint input" );
- }
- }
-
- return property;
-}
-
-int Shader::GetPropertyComponentIndex( Property::Index index ) const
-{
- return Property::INVALID_COMPONENT_INDEX;
-}
-
-Shader::Shader()
-: mSceneObject( NULL )
-{
-}
-
-void Shader::Initialize(
- const std::string& vertexSource,
- const std::string& fragmentSource,
- Dali::Shader::ShaderHints hints )
-{
- EventThreadServices& eventThreadServices = GetEventThreadServices();
- SceneGraph::UpdateManager& updateManager = eventThreadServices.GetUpdateManager();
-
- // @todo MESH_REWORK - Pass hints directly to a new scene graph shader
- int effectHint = Dali::ShaderEffect::HINT_NONE;
- if( hints & Dali::Shader::HINT_OUTPUT_IS_TRANSPARENT )
- {
- effectHint |= Dali::ShaderEffect::HINT_BLENDING;
- }
-
- if( hints & Dali::Shader::HINT_REQUIRES_SELF_DEPTH_TEST )
- {
- effectHint |= Dali::ShaderEffect::HINT_DEPTH_BUFFER;
- }
-
- if( (hints & Dali::Shader::HINT_MODIFIES_GEOMETRY) == 0x0 )
- {
- effectHint |= Dali::ShaderEffect::HINT_DOESNT_MODIFY_GEOMETRY;
- }
- Dali::ShaderEffect::GeometryHints shaderEffectHint = static_cast<Dali::ShaderEffect::GeometryHints>( effectHint );
-
- mSceneObject = new SceneGraph::Shader( shaderEffectHint );
-
- // Add to update manager
- AddShaderMessage( updateManager, *mSceneObject );
-
- // Try to load a precompiled shader binary for the source pair: