{
struct Vertex
{
- float index;
- Dali::Vector2 position;
- Dali::Vector2 textureCoord;
-
Vertex()
- {}
+ : index( 0.0f ), position(), textureCoord()
+ {
+ }
Vertex( float index, const Dali::Vector2& position, const Dali::Vector2& textureCoord )
: index( index ), position( position ), textureCoord( textureCoord )
- {}
+ {
+ }
+
+ float index;
+ Dali::Vector2 position;
+ Dali::Vector2 textureCoord;
};
/**
// Prepare the frame buffer to store the color adjusted background image
mEffectImage = FrameBufferImage::New( mMovementArea.width/4.f, mMovementArea.height/4.f, Pixel::RGBA8888, Dali::Image::UNUSED );
- // Generate the samplers and geometry, which is used by all bubbleActors
- mSamplerBackground = Sampler::New( mEffectImage, "sBackground" );
- mSamplerBubbleShape = Sampler::New( mShapeImage, "sBubbleShape" );
+ // Generate the geometry, which is used by all bubbleActors
mMeshGeometry = CreateGeometry( mNumBubblePerActor*mDensity );
Shader bubbleShader = CreateBubbleShader (mNumBubblePerActor );
mMaterial = Material::New( bubbleShader );
- mMaterial.AddSampler( mSamplerBackground );
- mMaterial.AddSampler( mSamplerBubbleShape );
+ mMaterial.AddTexture( mEffectImage, "sBackground" );
+ mMaterial.AddTexture( mShapeImage, "sBubbleShape" );
mBubbleActors.resize( mNumActor );
void BubbleEmitter::SetShapeImage( Image shapeImage )
{
- mSamplerBubbleShape.SetImage( shapeImage );
+ mMaterial.SetTextureImage( 1, shapeImage );
}
void BubbleEmitter::SetBubbleScale( float scale )