Dali 3D User Interface Engine
List of all members | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
Dali::Internal::ShaderEffect Class Reference

An abstract base class for a shader effect object. More...

#include <shader-effect-impl.h>

Inheritance diagram for Dali::Internal::ShaderEffect:
Inheritance graph
[legend]
Collaboration diagram for Dali::Internal::ShaderEffect:
Collaboration graph
[legend]

Public Types

typedef
Dali::ShaderEffect::UniformCoordinateType 
UniformCoordinateType
 
- Public Types inherited from Dali::Internal::Object
typedef Dali::Handle::Capability Capability
 

Public Member Functions

void SetEffectImage (Dali::Image image)
 .47 More...
 
void SetUniform (const std::string &name, Property::Value value, UniformCoordinateType uniformCoordinateType)
  More...
 
void SetPrograms (const std::string &vertexSource, const std::string &fragmentSource)
 Add a GeometryType specific default program to this ShaderEffect. More...
 
void SetPrograms (const std::string &vertexPrefix, const std::string &fragmentPrefix, const std::string &vertexSource, const std::string &fragmentSource)
 Add a default program to this ShaderEffect. More...
 
void Connect (ActorPtr actor)
 Notify ShaderEffect that it's being used by an Actor. More...
 
void Disconnect (ActorPtr actor)
 Notify ShaderEffect that an Actor is no longer using it. More...
 
ShaderPtr GetShader () const
 Returns the shader for this ShaderEffect. More...
 
Vector2 GetGridSize (const Vector2 &size)
 Returns the geometry grid size. More...
 
Dali::Image GetEffectImage () const
 Returns the effect image for this ShaderEffect. More...
 
virtual unsigned int GetPropertyCount () const
 Query how many properties are provided by an handle. More...
 
virtual std::string GetPropertyName (Property::Index index) const
 Query the name of a property. More...
 
virtual Property::Index GetPropertyIndex (const std::string &name) const
 Query the index of a property. More...
 
virtual bool IsPropertyWritable (Property::Index index) const
 Query whether a property can be set using SetProperty(). More...
 
virtual bool IsPropertyAnimatable (Property::Index index) const
 Query whether a writable property can be the target of an animation or constraint. More...
 
virtual bool IsPropertyAConstraintInput (Property::Index index) const
 Query whether a property can be used as in input to a constraint. More...
 
virtual Property::Type GetPropertyType (Property::Index index) const
 Query the type of a property. More...
 
virtual void SetProperty (Property::Index index, const Property::Value &propertyValue)
 Set the value of an existing property. More...
 
virtual Property::Value GetProperty (Property::Index index) const
 Retrieve a property value. More...
 
virtual void GetPropertyIndices (Property::IndexContainer &indices) const
 Retrieve all the property indices for this object (including custom properties). More...
 
virtual Property::Index RegisterProperty (const std::string &name, const Property::Value &propertyValue)
 Register a new animatable property. More...
 
virtual Property::Index RegisterProperty (const std::string &name, const Property::Value &propertyValue, Property::AccessMode accessMode)
  More...
 
virtual Dali::PropertyNotification AddPropertyNotification (Property::Index index, int componentIndex, const Dali::PropertyCondition &condition)
 Add a property notification to this object. More...
 
virtual void RemovePropertyNotification (Dali::PropertyNotification propertyNotification)
 Remove a property notification from this object. More...
 
virtual void RemovePropertyNotifications ()
 Remove all property notifications from this object. More...
 
virtual unsigned int GetDefaultPropertyCount () const
 Query how many default properties the derived class supports. More...
 
virtual void GetDefaultPropertyIndices (Property::IndexContainer &indices) const
 Retrieve all the indices that are associated with the default properties supported by the derived class. More...
 
virtual const char * GetDefaultPropertyName (Property::Index index) const
 Query how many default properties the derived class supports. More...
 
virtual Property::Index GetDefaultPropertyIndex (const std::string &name) const
 Query the index of a default property. More...
 
virtual bool IsDefaultPropertyWritable (Property::Index index) const
 Query whether a default property is writable. More...
 
virtual bool IsDefaultPropertyAnimatable (Property::Index index) const
 Query whether a default property is animatable. More...
 
virtual bool IsDefaultPropertyAConstraintInput (Property::Index index) const
 Query whether a default property can be used as an input to a constraint. More...
 
virtual Property::Type GetDefaultPropertyType (Property::Index index) const
 Query the type of a default property. More...
 
virtual void SetDefaultProperty (Property::Index index, const Property::Value &propertyValue)
 Set the value of a default property. More...
 
virtual Property::Value GetDefaultProperty (Property::Index index) const
 Retrieve a default property value. More...
 
virtual const
SceneGraph::PropertyOwner
GetSceneObject () const
 Retrieve the scene-graph object added by this object. More...
 
virtual const
SceneGraph::PropertyBase
GetSceneObjectAnimatableProperty (Property::Index index) const
 Retrieve an animatable property owned by the scene-graph object. More...
 
virtual const PropertyInputImplGetSceneObjectInputProperty (Property::Index index) const
 Retrieve a constraint input-property owned by the scene-graph object. More...
 
virtual int GetPropertyComponentIndex (Property::Index index) const
 Query whether the property is a component of a scene-graph property. More...
 
- Public Member Functions inherited from Dali::Internal::Object
 Object ()
 Constructor. More...
 
virtual void AddObserver (Observer &observer)
 Add an observer to the object. More...
 
virtual void RemoveObserver (Observer &observer)
 Remove an observer from the object. More...
 
virtual bool Supports (Capability capability) const
 Query whether an handle supports a given capability. More...
 
void AddUniformMapping (Property::Index propertyIndex, const std::string &uniformName) const
  More...
 
void RemoveUniformMapping (const std::string &uniformName)
  More...
 
void ApplyConstraint (ConstraintBase &constraint)
 Apply a constraint to an Object. More...
 
void RemoveConstraint (ConstraintBase &constraint)
 Remove one constraint from an Object. More...
 
void RemoveConstraints ()
 Remove all constraints from a Object. More...
 
void RemoveConstraints (unsigned int tag)
 Remove all constraints from a Object with a matching tag. More...
 
void SetTypeInfo (const TypeInfo *typeInfo)
 Called by TypeInfo to set the type-info that this object-impl is created by. More...
 
unsigned int CustomPropertyStartIndex ()
 
- Public Member Functions inherited from Dali::BaseObject
template<class T >
bool ConnectSignal (ConnectionTrackerInterface *connectionTracker, const std::string &signalName, const T &functor)
 Connects a void() functor to a specified signal. More...
 
bool DoAction (const std::string &actionName, const Property::Map &attributes)
 Perform action on this object with the given action name and attributes. More...
 
const std::string & GetTypeName () const
 Returns the type name for the Handle. More...
 
bool GetTypeInfo (Dali::TypeInfo &info) const
 Returns the type info for the Handle. More...
 
bool DoConnectSignal (ConnectionTrackerInterface *connectionTracker, const std::string &signalName, FunctorDelegate *functorDelegate)
 Not intended for application developers. More...
 
- Public Member Functions inherited from Dali::RefObject
void Reference ()
 Increment the object's reference count. More...
 
void Unreference ()
 Decrement the object's reference count. More...
 
int ReferenceCount ()
 Retrieve the object's reference count. More...
 

Static Public Member Functions

static ShaderEffectPtr New (Dali::ShaderEffect::GeometryHints hints=Dali::ShaderEffect::HINT_NONE)
 Create a new ShaderEffect with no programs. More...
 

Protected Member Functions

 ShaderEffect (Dali::ShaderEffect::GeometryHints hints)
 Protected constructor. More...
 
virtual ~ShaderEffect ()
 A reference counted object may only be deleted by calling Unreference() More...
 
- Protected Member Functions inherited from Dali::Internal::Object
virtual ~Object ()
 A reference counted object may only be deleted by calling Unreference() More...
 
void OnSceneObjectAdd ()
 Called immediately by derived classes, after the scene-object has been created & passed to the scene-graph. More...
 
void OnSceneObjectRemove ()
 Called by derived classes, shortly before send a message to remove the scene-object. More...
 
virtual void OnPropertySet (Property::Index index, Property::Value propertyValue)
 For use in derived classes. More...
 
const TypeInfoGetTypeInfo () const
 Retrieves the TypeInfo for this object. More...
 
CustomPropertyMetadataFindCustomProperty (Property::Index index) const
 Helper to find custom property. More...
 
AnimatablePropertyMetadataFindAnimatableProperty (Property::Index index) const
 Helper to find animatable property. More...
 
Property::Index RegisterSceneGraphProperty (const std::string &name, Property::Index index, const Property::Value &propertyValue) const
 Helper to register a scene-graph property. More...
 
AnimatablePropertyMetadataRegisterAnimatableProperty (Property::Index index) const
 Check whether the animatable property is registered already, if not then register one. More...
 
EventThreadServicesGetEventThreadServices ()
 Get the event thread services object - used for sending messages to the scene graph Assert if called from the wrong thread. More...
 
const EventThreadServicesGetEventThreadServices () const
 Get the event thread services object - used for sending messages to the scene graph Assert if called from the wrong thread This is intentionally inline for performance reasons. More...
 
- Protected Member Functions inherited from Dali::BaseObject
 BaseObject ()
 Default constructor. More...
 
virtual ~BaseObject ()
 A reference counted object may only be deleted by calling Unreference(). More...
 
void RegisterObject ()
 Registers the object as created with the Object registry. More...
 
void UnregisterObject ()
 Unregisters the object from Object registry. More...
 
- Protected Member Functions inherited from Dali::RefObject
 RefObject ()
 Default constructor. More...
 
virtual ~RefObject ()
 RefObject is intended as a base class. More...
 
 RefObject (const RefObject &rhs)
 Copy constructor. More...
 
RefObjectoperator= (const RefObject &rhs)
 Assignment operator. More...
 

Private Member Functions

 ShaderEffect (const ShaderEffect &)
 
ShaderEffectoperator= (const ShaderEffect &rhs)
 

Private Attributes

std::vector< ActorPtrmConnectedActors
 The array of actors that are currently connected to this ShaderEffect. More...
 
ShaderPtr mShader
 The shader pointer. More...
 
Dali::Image mEffectImage
 The Client-side handle to the effect image. More...
 
float mGridDensity
 The grid denisty. More...
 
Dali::ShaderEffect::GeometryHints mGeometryHints
 shader geometry hints for building the geometry More...
 

Detailed Description

An abstract base class for a shader effect object.

The corresponding scene-graph object is a collection of shader programs, which can apply the same effect to different geometry types.

Definition at line 40 of file shader-effect-impl.h.

Member Typedef Documentation

Definition at line 43 of file shader-effect-impl.h.

Constructor & Destructor Documentation

Dali::Internal::ShaderEffect::ShaderEffect ( Dali::ShaderEffect::GeometryHints  hints)
protected

Protected constructor.

Parameters
[in]hintsGeometry hints

Definition at line 168 of file shader-effect-impl.cpp.

Referenced by New().

Here is the caller graph for this function:

Dali::Internal::ShaderEffect::~ShaderEffect ( )
protectedvirtual

A reference counted object may only be deleted by calling Unreference()

Definition at line 174 of file shader-effect-impl.cpp.

References Dali::BaseObject::UnregisterObject().

Here is the call graph for this function:

Dali::Internal::ShaderEffect::ShaderEffect ( const ShaderEffect )
private

Member Function Documentation

Dali::PropertyNotification Dali::Internal::ShaderEffect::AddPropertyNotification ( Property::Index  index,
int  componentIndex,
const Dali::PropertyCondition condition 
)
virtual

Add a property notification to this object.

.0

Parameters
[in]indexThe index of the property.
[in]conditionThe notification will be triggered when this condition is satisfied.
Returns
A handle to the newly created PropertyNotification

Reimplemented from Dali::Internal::Object.

Definition at line 402 of file shader-effect-impl.cpp.

References Dali::Handle::AddPropertyNotification(), and mShader.

Here is the call graph for this function:

void Dali::Internal::ShaderEffect::Connect ( ActorPtr  actor)

Notify ShaderEffect that it's being used by an Actor.

Parameters
[in]actorThe Actor that is connecting to this ShaderEffect

Definition at line 255 of file shader-effect-impl.cpp.

References Dali::GetImplementation(), mConnectedActors, and mEffectImage.

Referenced by Dali::Internal::ImageActor::SetShaderEffect().

Here is the call graph for this function:

Here is the caller graph for this function:

void Dali::Internal::ShaderEffect::Disconnect ( ActorPtr  actor)

Notify ShaderEffect that an Actor is no longer using it.

Parameters
[in]actorThe Actor that is disconnecting from this ShaderEffect

Definition at line 273 of file shader-effect-impl.cpp.

References DALI_ASSERT_DEBUG, Dali::GetImplementation(), mConnectedActors, and mEffectImage.

Here is the call graph for this function:

Property::Value Dali::Internal::ShaderEffect::GetDefaultProperty ( Property::Index  index) const
virtual

Retrieve a default property value.

Parameters
[in]indexThe index of the property.
Returns
The property value.

Implements Dali::Internal::Object.

Definition at line 579 of file shader-effect-impl.cpp.

References Dali::Property::Value().

Referenced by GetProperty().

Here is the call graph for this function:

Here is the caller graph for this function:

unsigned int Dali::Internal::ShaderEffect::GetDefaultPropertyCount ( ) const
virtual

Query how many default properties the derived class supports.

Returns
The number of default properties.

Implements Dali::Internal::Object.

Definition at line 419 of file shader-effect-impl.cpp.

Referenced by GetPropertyCount().

Here is the caller graph for this function:

Property::Index Dali::Internal::ShaderEffect::GetDefaultPropertyIndex ( const std::string &  name) const
virtual

Query the index of a default property.

Parameters
[in]nameThe name of the property.
Returns
The index of the property, or Property::INVALID_INDEX if no default property exists with the given name.

Implements Dali::Internal::Object.

Definition at line 444 of file shader-effect-impl.cpp.

References Dali::Property::INVALID_INDEX.

Referenced by GetPropertyIndex().

Here is the caller graph for this function:

void Dali::Internal::ShaderEffect::GetDefaultPropertyIndices ( Property::IndexContainer indices) const
virtual

Retrieve all the indices that are associated with the default properties supported by the derived class.

Returns
A container of default property indices.
Note
The deriving class must not modify the existing elements in the container.

Implements Dali::Internal::Object.

Definition at line 424 of file shader-effect-impl.cpp.

References Dali::Vector< T, IsTrivialType >::PushBack(), Dali::Vector< T, IsTrivialType >::Reserve(), and Dali::VectorBase::Size().

Referenced by GetPropertyIndices().

Here is the call graph for this function:

Here is the caller graph for this function:

const char * Dali::Internal::ShaderEffect::GetDefaultPropertyName ( Property::Index  index) const
virtual

Query how many default properties the derived class supports.

Returns
The number of default properties.

Implements Dali::Internal::Object.

Definition at line 434 of file shader-effect-impl.cpp.

Referenced by GetPropertyName().

Here is the caller graph for this function:

Property::Type Dali::Internal::ShaderEffect::GetDefaultPropertyType ( Property::Index  index) const
virtual

Query the type of a default property.

Parameters
[in]indexThe index of the property.
Returns
The type of the property.

Implements Dali::Internal::Object.

Definition at line 477 of file shader-effect-impl.cpp.

References Dali::Property::NONE.

Referenced by GetPropertyType().

Here is the caller graph for this function:

Dali::Image Dali::Internal::ShaderEffect::GetEffectImage ( ) const
inline

Returns the effect image for this ShaderEffect.

Returns
Returns the effect image for this ShaderEffect

Definition at line 120 of file shader-effect-impl.h.

References mEffectImage.

Vector2 Dali::Internal::ShaderEffect::GetGridSize ( const Vector2 size)

Returns the geometry grid size.

Parameters
[in]sizeThe pixel area size.
Returns
Returns the geometry grid size

Definition at line 236 of file shader-effect-impl.cpp.

References Dali::Vector2::height, Dali::ShaderEffect::HINT_GRID_X, Dali::ShaderEffect::HINT_GRID_Y, mGeometryHints, mGridDensity, Dali::Vector2::width, Dali::Vector2::x, and Dali::Vector2::y.

Property::Value Dali::Internal::ShaderEffect::GetProperty ( Property::Index  index) const
virtual

Retrieve a property value.

.0

Parameters
[in]indexThe index of the property.
Returns
The property value.

Reimplemented from Dali::Internal::Object.

Definition at line 377 of file shader-effect-impl.cpp.

References GetDefaultProperty(), Dali::Handle::GetProperty(), and mShader.

Here is the call graph for this function:

int Dali::Internal::ShaderEffect::GetPropertyComponentIndex ( Property::Index  index) const
virtual

Query whether the property is a component of a scene-graph property.

Precondition
-1 < index < GetPropertyCount().
Parameters
[in]indexThe index of the property.
Returns
The index or Property::INVALID_COMPONENT_INDEX.

Reimplemented from Dali::Internal::Object.

Definition at line 600 of file shader-effect-impl.cpp.

References mShader.

unsigned int Dali::Internal::ShaderEffect::GetPropertyCount ( ) const
virtual

Query how many properties are provided by an handle.

This may vary between instances of a class, if dynamic properties are supported. .0

Returns
The number of properties.

Reimplemented from Dali::Internal::Object.

Definition at line 290 of file shader-effect-impl.cpp.

References GetDefaultPropertyCount(), Dali::Handle::GetPropertyCount(), and mShader.

Here is the call graph for this function:

Property::Index Dali::Internal::ShaderEffect::GetPropertyIndex ( const std::string &  name) const
virtual

Query the index of a property.

Returns the first property index that matches the given name exactly.

.0

Parameters
[in]nameThe name of the property.
Returns
The index of the property, or Property::INVALID_INDEX if no property exists with the given name.

Reimplemented from Dali::Internal::Object.

Definition at line 307 of file shader-effect-impl.cpp.

References GetDefaultPropertyIndex(), Dali::Handle::GetPropertyIndex(), Dali::Property::INVALID_INDEX, and mShader.

Here is the call graph for this function:

void Dali::Internal::ShaderEffect::GetPropertyIndices ( Property::IndexContainer indices) const
virtual

Retrieve all the property indices for this object (including custom properties).

.0

Parameters
[out]indicesA container of property indices for this object.
Note
the added container is cleared

Reimplemented from Dali::Internal::Object.

Definition at line 386 of file shader-effect-impl.cpp.

References GetDefaultPropertyIndices(), Dali::Handle::GetPropertyIndices(), and mShader.

Here is the call graph for this function:

std::string Dali::Internal::ShaderEffect::GetPropertyName ( Property::Index  index) const
virtual

Query the name of a property.

.0

Parameters
[in]indexThe index of the property.
Returns
The name of the property.

Reimplemented from Dali::Internal::Object.

Definition at line 295 of file shader-effect-impl.cpp.

References GetDefaultPropertyName(), Dali::Handle::GetPropertyName(), and mShader.

Here is the call graph for this function:

Property::Type Dali::Internal::ShaderEffect::GetPropertyType ( Property::Index  index) const
virtual

Query the type of a property.

.0

Parameters
[in]indexThe index of the property.
Returns
The type of the property.

Reimplemented from Dali::Internal::Object.

Definition at line 356 of file shader-effect-impl.cpp.

References GetDefaultPropertyType(), Dali::Handle::GetPropertyType(), and mShader.

Here is the call graph for this function:

const SceneGraph::PropertyOwner * Dali::Internal::ShaderEffect::GetSceneObject ( ) const
virtual

Retrieve the scene-graph object added by this object.

Returns
A pointer to the object, or NULL if no object has been added to the scene-graph.

Implements Dali::Internal::Object.

Definition at line 585 of file shader-effect-impl.cpp.

References mShader.

const SceneGraph::PropertyBase * Dali::Internal::ShaderEffect::GetSceneObjectAnimatableProperty ( Property::Index  index) const
virtual

Retrieve an animatable property owned by the scene-graph object.

Precondition
-1 < index < GetPropertyCount().
Parameters
[in]indexThe index of the property.
Returns
A dereferenceable pointer to a property, or NULL if a scene-object does not exist with this property.

Implements Dali::Internal::Object.

Definition at line 590 of file shader-effect-impl.cpp.

References mShader.

const PropertyInputImpl * Dali::Internal::ShaderEffect::GetSceneObjectInputProperty ( Property::Index  index) const
virtual

Retrieve a constraint input-property owned by the scene-graph object.

Precondition
-1 < index < GetPropertyCount().
Parameters
[in]indexThe index of the property.
Returns
A dereferenceable pointer to an input property, or NULL if a scene-object does not exist with this property.

Implements Dali::Internal::Object.

Definition at line 595 of file shader-effect-impl.cpp.

References mShader.

ShaderPtr Dali::Internal::ShaderEffect::GetShader ( ) const
inline

Returns the shader for this ShaderEffect.

Returns
Returns the shader for this ShaderEffect

Definition at line 105 of file shader-effect-impl.h.

References mShader.

bool Dali::Internal::ShaderEffect::IsDefaultPropertyAConstraintInput ( Property::Index  index) const
virtual

Query whether a default property can be used as an input to a constraint.

Parameters
[in]indexThe index of the property.
Returns
True if the property can be used as an input to a constraint.

Implements Dali::Internal::Object.

Definition at line 472 of file shader-effect-impl.cpp.

Referenced by IsPropertyAConstraintInput().

Here is the caller graph for this function:

bool Dali::Internal::ShaderEffect::IsDefaultPropertyAnimatable ( Property::Index  index) const
virtual

Query whether a default property is animatable.

This determines whether the property can be the target of an animation or constraint.

Parameters
[in]indexThe index of the property.
Returns
True if the property is animatable.

Implements Dali::Internal::Object.

Definition at line 467 of file shader-effect-impl.cpp.

Referenced by IsPropertyAnimatable().

Here is the caller graph for this function:

bool Dali::Internal::ShaderEffect::IsDefaultPropertyWritable ( Property::Index  index) const
virtual

Query whether a default property is writable.

Parameters
[in]indexThe index of the property.
Returns
True if the property is animatable.

Implements Dali::Internal::Object.

Definition at line 462 of file shader-effect-impl.cpp.

Referenced by IsPropertyWritable().

Here is the caller graph for this function:

bool Dali::Internal::ShaderEffect::IsPropertyAConstraintInput ( Property::Index  index) const
virtual

Query whether a property can be used as in input to a constraint.

.0

Parameters
[in]indexThe index of the property.
Returns
True if the property can be used as a constraint input.

Reimplemented from Dali::Internal::Object.

Definition at line 344 of file shader-effect-impl.cpp.

References IsDefaultPropertyAConstraintInput(), Dali::Handle::IsPropertyAConstraintInput(), and mShader.

Here is the call graph for this function:

bool Dali::Internal::ShaderEffect::IsPropertyAnimatable ( Property::Index  index) const
virtual

Query whether a writable property can be the target of an animation or constraint.

.0

Parameters
[in]indexThe index of the property.
Returns
True if the property is animatable.

Reimplemented from Dali::Internal::Object.

Definition at line 332 of file shader-effect-impl.cpp.

References IsDefaultPropertyAnimatable(), Dali::Handle::IsPropertyAnimatable(), and mShader.

Here is the call graph for this function:

bool Dali::Internal::ShaderEffect::IsPropertyWritable ( Property::Index  index) const
virtual

Query whether a property can be set using SetProperty().

.0

Parameters
[in]indexThe index of the property.
Returns
True if the property is writable.
Precondition
Property::INVALID_INDEX < index.

Reimplemented from Dali::Internal::Object.

Definition at line 320 of file shader-effect-impl.cpp.

References IsDefaultPropertyWritable(), Dali::Handle::IsPropertyWritable(), and mShader.

Here is the call graph for this function:

ShaderEffectPtr Dali::Internal::ShaderEffect::New ( Dali::ShaderEffect::GeometryHints  hints = Dali::ShaderEffect::HINT_NONE)
static

Create a new ShaderEffect with no programs.

Parameters
hintsGeometryHints to define the geometry of the rendered object
Returns
A smart-pointer to a newly allocated shader effect.

Definition at line 161 of file shader-effect-impl.cpp.

References ShaderEffect().

Referenced by Dali::Internal::anonymous_namespace{shader-effect-impl.cpp}::Create(), Dali::Internal::ShaderFactory::LoadDefaultShaders(), Dali::ShaderEffect::New(), Dali::Scripting::NewShaderEffect(), and Dali::ShaderEffect::NewWithPrefix().

Here is the call graph for this function:

Here is the caller graph for this function:

ShaderEffect& Dali::Internal::ShaderEffect::operator= ( const ShaderEffect rhs)
private
Property::Index Dali::Internal::ShaderEffect::RegisterProperty ( const std::string &  name,
const Property::Value propertyValue 
)
virtual

Register a new animatable property.

.0

Parameters
[in]nameThe name of the property.
[in]propertyValueThe new value of the property.
Returns
The index of the property or Property::INVALID_INDEX if registration failed
Precondition
The object supports dynamic properties i.e. Supports(Handle::DYNAMIC_PROPERTIES) returns true. Property names are expected to be unique, but this is not enforced. Property indices are unique to each registered custom property in a given object. returns Property::INVALID_INDEX if registration failed. This can happen if you try to register animatable property on an object that does not have scene graph object.
Note
Only the following types can be animated:
If a property with the desired name already exists, then the value given is just set.

Reimplemented from Dali::Internal::Object.

Definition at line 392 of file shader-effect-impl.cpp.

References mShader, and Dali::Handle::RegisterProperty().

Here is the call graph for this function:

Property::Index Dali::Internal::ShaderEffect::RegisterProperty ( const std::string &  name,
const Property::Value propertyValue,
Property::AccessMode  accessMode 
)
virtual

Reimplemented from Dali::Internal::Object.

Definition at line 397 of file shader-effect-impl.cpp.

References mShader, and Dali::Handle::RegisterProperty().

Here is the call graph for this function:

void Dali::Internal::ShaderEffect::RemovePropertyNotification ( Dali::PropertyNotification  propertyNotification)
virtual

Remove a property notification from this object.

.0

Parameters
[in]propertyNotificationThe propertyNotification to be removed.

Reimplemented from Dali::Internal::Object.

Definition at line 409 of file shader-effect-impl.cpp.

References mShader, and Dali::Handle::RemovePropertyNotification().

Here is the call graph for this function:

void Dali::Internal::ShaderEffect::RemovePropertyNotifications ( )
virtual

Remove all property notifications from this object.

.0

Reimplemented from Dali::Internal::Object.

Definition at line 414 of file shader-effect-impl.cpp.

References mShader, and Dali::Handle::RemovePropertyNotifications().

Here is the call graph for this function:

void Dali::Internal::ShaderEffect::SetDefaultProperty ( Property::Index  index,
const Property::Value propertyValue 
)
virtual
void Dali::Internal::ShaderEffect::SetEffectImage ( Dali::Image  image)

.47

Sets image for using as effect texture.

This image texture will be bound to the "sEffect" sampler so it can be used in fragment shader for effects

.0

Parameters
[in]imageto use as effect texture

Definition at line 180 of file shader-effect-impl.cpp.

References Dali::Internal::ImageActor::EffectImageUpdated(), Dali::GetImplementation(), mConnectedActors, and mEffectImage.

Referenced by SetDefaultProperty().

Here is the call graph for this function:

Here is the caller graph for this function:

void Dali::Internal::ShaderEffect::SetPrograms ( const std::string &  vertexSource,
const std::string &  fragmentSource 
)

Add a GeometryType specific default program to this ShaderEffect.

Parameters
[in]geometryTypeThe GeometryType rendered by the shader program
[in]vertexSourceThe source code for the vertex shader
[in]fragmentSourceThe source code for the fragment shader

Definition at line 223 of file shader-effect-impl.cpp.

Referenced by SetDefaultProperty().

Here is the caller graph for this function:

void Dali::Internal::ShaderEffect::SetPrograms ( const std::string &  vertexPrefix,
const std::string &  fragmentPrefix,
const std::string &  vertexSource,
const std::string &  fragmentSource 
)

Add a default program to this ShaderEffect.

This overload allows the optional prefixing for both the vertex and fragment shader. A useful prefix may be shader #defines for conditional compilation.

Parameters
[in]vertexPrefixThe prefix source code for the vertex shader
[in]fragmentPrefixThe prefix source code for the fragment shader
[in]vertexSourceThe source code for the vertex shader
[in]fragmentSourceThe source code for the fragment shader

Definition at line 228 of file shader-effect-impl.cpp.

References Dali::Internal::anonymous_namespace{shader-effect-impl.cpp}::ConvertHints(), mGeometryHints, mShader, Dali::Internal::Shader::New(), Dali::Internal::anonymous_namespace{shader-effect-impl.cpp}::WrapFragmentShader(), and Dali::Internal::anonymous_namespace{shader-effect-impl.cpp}::WrapVertexShader().

Here is the call graph for this function:

void Dali::Internal::ShaderEffect::SetProperty ( Property::Index  index,
const Property::Value propertyValue 
)
virtual

Set the value of an existing property.

Property should be write-able. Setting a read-only property is a no-op. .0

Parameters
[in]indexThe index of the property.
[in]propertyValueThe new value of the property.
Precondition
The property types match i.e. propertyValue.GetType() is equal to GetPropertyType(index).

Reimplemented from Dali::Internal::Object.

Definition at line 365 of file shader-effect-impl.cpp.

References mShader, SetDefaultProperty(), and Dali::Handle::SetProperty().

Here is the call graph for this function:

void Dali::Internal::ShaderEffect::SetUniform ( const std::string &  name,
Property::Value  value,
UniformCoordinateType  uniformCoordinateType 
)

Definition at line 217 of file shader-effect-impl.cpp.

References mShader, and Dali::Handle::RegisterProperty().

Here is the call graph for this function:

Member Data Documentation

std::vector< ActorPtr > Dali::Internal::ShaderEffect::mConnectedActors
private

The array of actors that are currently connected to this ShaderEffect.

Definition at line 292 of file shader-effect-impl.h.

Referenced by Connect(), Disconnect(), SetDefaultProperty(), and SetEffectImage().

Dali::Image Dali::Internal::ShaderEffect::mEffectImage
private

The Client-side handle to the effect image.

Definition at line 294 of file shader-effect-impl.h.

Referenced by Connect(), Disconnect(), GetEffectImage(), and SetEffectImage().

Dali::ShaderEffect::GeometryHints Dali::Internal::ShaderEffect::mGeometryHints
private

shader geometry hints for building the geometry

Definition at line 296 of file shader-effect-impl.h.

Referenced by GetGridSize(), SetDefaultProperty(), and SetPrograms().

float Dali::Internal::ShaderEffect::mGridDensity
private

The grid denisty.

Definition at line 295 of file shader-effect-impl.h.

Referenced by GetGridSize(), and SetDefaultProperty().

ShaderPtr Dali::Internal::ShaderEffect::mShader
private

The documentation for this class was generated from the following files:
Dali Docs Home
Read more about Dali