// INTERNAL INCLUDES
#include <dali/public-api/text-abstraction/font-client.h>
#include <dali/public-api/actors/image-actor.h>
-#include <dali/public-api/actors/mesh-actor.h>
#include <dali/public-api/images/atlas.h>
-#include <dali/public-api/geometry/mesh.h>
#include <dali-toolkit/internal/text/rendering/shaders/text-basic-shader.h>
+#include <dali-toolkit/internal/text/rendering/shaders/text-bgra-shader.h>
+
using namespace Dali;
using namespace Dali::Toolkit;
* @param[in] positions The 2D positions of the glyphs.
* @param[in] image The material uses this as a diffuse texture.
*/
+ /*
Mesh CreateMesh( const Vector<GlyphInfo>& glyphs, const std::vector<Vector2>& positions, Pixel::Format format, Image image )
{
MeshData::VertexContainer vertices( 4 * glyphs.Count() ); // 1 quad per glyph
Dali::Mesh mesh = Mesh::New( meshData );
return mesh;
}
-
- RenderableActor mActor; ///< The actor which renders the text
+ */
+ Actor mActor; ///< The actor which renders the text
Atlas mAtlasL8;
unsigned int mWidthL8;
return Text::RendererPtr( new BasicRenderer() );
}
-RenderableActor BasicRenderer::Render( Text::ViewInterface& view )
+Actor BasicRenderer::Render( Text::ViewInterface& view )
{
// Remove the previous text
UnparentAndReset( mImpl->mActor );
mImpl->CreateAtlases( glyphs );
- MeshActor actorL8;
+ Actor actorL8;
if( mImpl->mAtlasL8 )
{
- actorL8 = MeshActor::New( mImpl->CreateMesh( glyphs, positions, Pixel::L8, mImpl->mAtlasL8 ) );
+ //actorL8 = MeshActor::New( mImpl->CreateMesh( glyphs, positions, Pixel::L8, mImpl->mAtlasL8 ) );
actorL8.SetColorMode( USE_OWN_MULTIPLY_PARENT_COLOR );
ShaderEffect shader = BasicShader::New();
- actorL8.SetShaderEffect( shader );
+ //actorL8.SetShaderEffect( shader );
}
- MeshActor actorBGRA8888;
+ Actor actorBGRA8888;
if( mImpl->mAtlasBGRA8888 )
{
- actorBGRA8888 = MeshActor::New( mImpl->CreateMesh( glyphs, positions, Pixel::BGRA8888, mImpl->mAtlasBGRA8888 ) );
+ //actorBGRA8888 = MeshActor::New( mImpl->CreateMesh( glyphs, positions, Pixel::BGRA8888, mImpl->mAtlasBGRA8888 ) );
actorBGRA8888.SetColorMode( USE_OWN_MULTIPLY_PARENT_COLOR );
- ShaderEffect shader = BasicShader::New();
- actorBGRA8888.SetShaderEffect( shader );
+ ShaderEffect shader = BgraShader::New();
+ //actorBGRA8888.SetShaderEffect( shader );
}
// If we have both monochrome & color glyphs, two mesh actors are returned in a container