/*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
// INTERNAL INCLUDES
#include <dali/public-api/animation/constraints.h> // for EqualToConstraint
#include <dali/public-api/object/type-registry.h>
+#include <dali/public-api/rendering/renderer.h>
#include <dali/devel-api/scripting/scripting.h>
#include <dali/internal/event/animation/constraint-impl.h>
#include <dali/internal/event/common/property-helper.h>
{
geometry->SetIndexBuffer( &indices[0], indices.Size() );
}
- geometry->SetGeometryType( Dali::Geometry::TRIANGLE_STRIP );
+ geometry->SetType( Dali::Geometry::TRIANGLE_STRIP );
return geometry;
}
GeometryPtr quad = CreateGeometry( 1u, 1u, Vector2::ONE );
actor->mRenderer->SetGeometry( *quad );
- ShaderPtr shader = Shader::New( VERTEX_SHADER, FRAGMENT_SHADER, Dali::Shader::HINT_NONE );
+ ShaderPtr shader = Shader::New( VERTEX_SHADER, FRAGMENT_SHADER, Dali::Shader::Hint::NONE );
actor->mRenderer->SetShader( *shader );
TextureSetPtr textureSet = TextureSet::New();
actor->mRenderer->SetTextures( *textureSet );
void ImageActor::SetBlendMode( BlendingMode::Type mode )
{
- mRenderer->SetBlendMode( mode );
+ mRenderer->SetBlendMode( static_cast<BlendMode::Type>( mode ) );
}
BlendingMode::Type ImageActor::GetBlendMode() const
{
- return mRenderer->GetBlendMode();
+ return static_cast<BlendingMode::Type>( mRenderer->GetBlendMode() );
}
void ImageActor::SetBlendFunc( BlendingFactor::Type srcFactorRgba, BlendingFactor::Type destFactorRgba )
{
- mRenderer->SetBlendFunc( srcFactorRgba, destFactorRgba, srcFactorRgba, destFactorRgba );
+ mRenderer->SetBlendFunc( static_cast<BlendFactor::Type>(srcFactorRgba), static_cast<BlendFactor::Type>(destFactorRgba), static_cast<BlendFactor::Type>(srcFactorRgba), static_cast<BlendFactor::Type>(destFactorRgba) );
}
void ImageActor::SetBlendFunc( BlendingFactor::Type srcFactorRgb, BlendingFactor::Type destFactorRgb,
BlendingFactor::Type srcFactorAlpha, BlendingFactor::Type destFactorAlpha )
{
- mRenderer->SetBlendFunc( srcFactorRgb, destFactorRgb, srcFactorAlpha, destFactorAlpha );
+ mRenderer->SetBlendFunc( static_cast<BlendFactor::Type>(srcFactorRgb), static_cast<BlendFactor::Type>(destFactorRgb), static_cast<BlendFactor::Type>(srcFactorAlpha), static_cast<BlendFactor::Type>(destFactorAlpha) );
}
void ImageActor::GetBlendFunc( BlendingFactor::Type& srcFactorRgb, BlendingFactor::Type& destFactorRgb,
BlendingFactor::Type& srcFactorAlpha, BlendingFactor::Type& destFactorAlpha ) const
{
- mRenderer->GetBlendFunc( srcFactorRgb, destFactorRgb, srcFactorAlpha, destFactorAlpha );
+ mRenderer->GetBlendFunc( reinterpret_cast<BlendFactor::Type&>(srcFactorRgb), reinterpret_cast<BlendFactor::Type&>(destFactorRgb), reinterpret_cast<BlendFactor::Type&>(srcFactorAlpha), reinterpret_cast<BlendFactor::Type&>(destFactorAlpha) );
}
void ImageActor::SetBlendEquation( BlendingEquation::Type equationRgba )
{
- mRenderer->SetBlendEquation( equationRgba, equationRgba );
+ mRenderer->SetBlendEquation( static_cast<BlendEquation::Type>(equationRgba), static_cast<BlendEquation::Type>(equationRgba) );
}
void ImageActor::SetBlendEquation( BlendingEquation::Type equationRgb, BlendingEquation::Type equationAlpha )
{
- mRenderer->SetBlendEquation( equationRgb, equationAlpha );
+ mRenderer->SetBlendEquation( static_cast<BlendEquation::Type>(equationRgb), static_cast<BlendEquation::Type>(equationAlpha) );
}
void ImageActor::GetBlendEquation( BlendingEquation::Type& equationRgb, BlendingEquation::Type& equationAlpha ) const
{
- mRenderer->GetBlendEquation( equationRgb, equationAlpha );
+ mRenderer->GetBlendEquation( reinterpret_cast<BlendEquation::Type&>(equationRgb), reinterpret_cast<BlendEquation::Type&>(equationAlpha) );
}
void ImageActor::SetBlendColor( const Vector4& color )
{
mShaderEffect->Disconnect( this );
// change to the standard shader and quad geometry
- ShaderPtr shader = Shader::New( VERTEX_SHADER, FRAGMENT_SHADER, Dali::Shader::HINT_NONE );
+ ShaderPtr shader = Shader::New( VERTEX_SHADER, FRAGMENT_SHADER, Dali::Shader::Hint::NONE );
mRenderer->SetShader( *shader );
mShaderEffect.Reset();