Change the precision of size and uSize from mediumP to highP
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / visuals / border / border-visual.cpp
index 229d12c..03412bf 100644 (file)
@@ -20,7 +20,6 @@
 
 // EXTERNAL INCLUDES
 #include <dali/integration-api/debug.h>
-#include <dali/devel-api/object/handle-devel.h>
 
 // INTERNAL INCLUDES
 #include <dali-toolkit/public-api/visuals/border-visual-properties.h>
@@ -50,13 +49,13 @@ const char* VERTEX_SHADER = DALI_COMPOSE_SHADER(
   attribute mediump vec2 aPosition;\n
   attribute mediump vec2 aDrift;\n
   uniform highp   mat4 uMvpMatrix;\n
-  uniform mediump vec3 uSize;\n
+  uniform highp   vec3 uSize;\n
   uniform mediump float borderSize;\n
   \n
 
   //Visual size and offset
   uniform mediump vec2 offset;\n
-  uniform mediump vec2 size;\n
+  uniform highp   vec2 size;\n
   uniform mediump vec4 offsetSizeMode;\n
   uniform mediump vec2 origin;\n
   uniform mediump vec2 anchorPoint;\n
@@ -90,7 +89,7 @@ const char* VERTEX_SHADER_ANTI_ALIASING = DALI_COMPOSE_SHADER(
   attribute mediump vec2 aPosition;\n
   attribute mediump vec2 aDrift;\n
   uniform highp   mat4 uMvpMatrix;\n
-  uniform mediump vec3 uSize;\n
+  uniform highp   vec3 uSize;\n
   uniform mediump float borderSize;\n
   varying mediump float vAlpha;\n
   \n
@@ -201,12 +200,12 @@ void BorderVisual::DoSetOnScene( Actor& actor )
 {
   InitializeRenderer();
 
-  mBorderColorIndex = DevelHandle::RegisterProperty( mImpl->mRenderer, Toolkit::BorderVisual::Property::COLOR, COLOR_NAME, mBorderColor );
+  mBorderColorIndex = mImpl->mRenderer.RegisterProperty( Toolkit::BorderVisual::Property::COLOR, COLOR_NAME, mBorderColor );
   if( mBorderColor.a < 1.f || mAntiAliasing)
   {
     mImpl->mRenderer.SetProperty( Renderer::Property::BLEND_MODE, BlendMode::ON );
   }
-  mBorderSizeIndex = DevelHandle::RegisterProperty( mImpl->mRenderer, Toolkit::BorderVisual::Property::SIZE, SIZE_NAME, mBorderSize );
+  mBorderSizeIndex = mImpl->mRenderer.RegisterProperty( Toolkit::BorderVisual::Property::SIZE, SIZE_NAME, mBorderSize );
 
   actor.AddRenderer( mImpl->mRenderer );
 
@@ -324,7 +323,7 @@ Geometry BorderVisual::CreateBorderGeometry()
   Property::Map borderVertexFormat;
   borderVertexFormat[POSITION_ATTRIBUTE_NAME] = Property::VECTOR2;
   borderVertexFormat[DRIFT_ATTRIBUTE_NAME] = Property::VECTOR2;
-  PropertyBuffer borderVertices = PropertyBuffer::New( borderVertexFormat );
+  VertexBuffer borderVertices = VertexBuffer::New( borderVertexFormat );
   borderVertices.SetData( borderVertexData, 16 );
 
   // Create indices