Commit d2223117baea75e170556014107fbc6455c02cbc

Authored by Agnelo Vaz
2 parents 28946d81 65253085

[dali_1.1.32] Merge branch 'devel/master'

Change-Id: Icaee249b52034a0f44859520609cc2acec7c9eda
demo/dali-table-view.cpp
... ... @@ -299,8 +299,6 @@ void DaliTableView::Initialize( Application& application )
299 299 unsigned int degrees = 0;
300 300 Rotate( degrees );
301 301  
302   - //orientation.ChangedSignal().Connect( this, &DaliTableView::OrientationChanged );
303   -
304 302 winHandle.ShowIndicator( Dali::Window::INVISIBLE );
305 303  
306 304 // Background animation
... ... @@ -415,11 +413,6 @@ void DaliTableView::Populate()
415 413 mScrollView.SetRulerY( mScrollRulerY );
416 414 }
417 415  
418   -void DaliTableView::OrientationChanged( Orientation orientation )
419   -{
420   - // TODO: Implement if orientation change required
421   -}
422   -
423 416 void DaliTableView::Rotate( unsigned int degrees )
424 417 {
425 418 // Resize the root actor
... ...
examples/image-scaling-and-filtering/image-scaling-and-filtering-example.cpp
... ... @@ -178,11 +178,11 @@ public:
178 178 // Background image:
179 179 Dali::Property::Map backgroundImage;
180 180 backgroundImage.Insert( "rendererType", "image" );
181   - backgroundImage.Insert( "imageUrl", BACKGROUND_IMAGE );
182   - backgroundImage.Insert( "imageDesiredWidth", stage.GetSize().width );
183   - backgroundImage.Insert( "imageDesiredHeight", stage.GetSize().height );
184   - backgroundImage.Insert( "imageFittingMode", "scaleToFill" );
185   - backgroundImage.Insert( "imageSamplingMode", "boxThenNearest" );
  181 + backgroundImage.Insert( "url", BACKGROUND_IMAGE );
  182 + backgroundImage.Insert( "desiredWidth", stage.GetSize().width );
  183 + backgroundImage.Insert( "desiredHeight", stage.GetSize().height );
  184 + backgroundImage.Insert( "fittingMode", "SCALE_TO_FILL" );
  185 + backgroundImage.Insert( "samplingMode", "BOX_THEN_NEAREST" );
186 186  
187 187 Toolkit::ImageView background = Toolkit::ImageView::New();
188 188 background.SetProperty( Toolkit::ImageView::Property::IMAGE, backgroundImage );
... ...
examples/item-view/item-view-example.cpp
... ... @@ -209,8 +209,6 @@ public:
209 209 TOOLBAR_IMAGE,
210 210 "" );
211 211  
212   - //app.GetWindow().GetOrientation().ChangedSignal().Connect( this, &ItemViewExample::OnOrientationChanged );
213   -
214 212 // Create an edit mode button. (left of toolbar)
215 213 Toolkit::PushButton editButton = Toolkit::PushButton::New();
216 214 editButton.SetUnselectedImage( EDIT_IMAGE );
... ... @@ -380,24 +378,6 @@ public:
380 378 mItemView.ActivateLayout( layoutId, Vector3(stageSize.x, stageSize.y, stageSize.x), 0.0f );
381 379 }
382 380  
383   - /**
384   - * Orientation changed signal callback
385   - * @param orientation
386   - */
387   - void OnOrientationChanged( Orientation orientation )
388   - {
389   - const unsigned int angle = orientation.GetDegrees();
390   -
391   - // If orientation really changed
392   - if( mOrientation != angle )
393   - {
394   - // Remember orientation
395   - mOrientation = angle;
396   -
397   - SetLayout( mCurrentLayout );
398   - }
399   - }
400   -
401 381 bool OnLayoutButtonClicked( Toolkit::Button button )
402 382 {
403 383 // Switch to the next layout
... ...
examples/line-mesh/line-mesh-example.cpp
... ... @@ -22,6 +22,8 @@
22 22 // INTERNAL INCLUDES
23 23 #include "shared/view.h"
24 24  
  25 +#include <sstream>
  26 +
25 27 using namespace Dali;
26 28  
27 29 namespace
... ... @@ -62,43 +64,11 @@ void main()
62 64 }
63 65 );
64 66  
65   -PropertyBuffer CreateIndexBuffer( Geometry::GeometryType geometryType )
66   -{
67   - // Create indices
68   - const unsigned int indexDataLines[] = { 0, 1, 1, 2, 2, 3, 3, 4, 4, 0 };
69   - const unsigned int indexDataLoops[] = { 0, 1, 2, 3, 4 };
70   - const unsigned int indexDataStrips[] = { 0, 1, 2, 3, 4, 0 };
71   -
72   - // Create index buffer if doesn't exist
73   - Property::Map indexFormat;
74   - indexFormat["indices"] = Property::INTEGER;
75   - PropertyBuffer indices = PropertyBuffer::New( indexFormat );
76   -
77   - // Update buffer
78   - switch( geometryType )
79   - {
80   - case Geometry::LINES:
81   - {
82   - indices.SetData( indexDataLines, sizeof(indexDataLines)/sizeof(indexDataLines[0]) );
83   - break;
84   - }
85   - case Geometry::LINE_LOOP:
86   - {
87   - indices.SetData( indexDataLoops, sizeof(indexDataLoops)/sizeof(indexDataLoops[0]) );
88   - break;
89   - }
90   - case Geometry::LINE_STRIP:
91   - {
92   - indices.SetData( indexDataStrips, sizeof(indexDataStrips)/sizeof(indexDataStrips[0]) );
93   - break;
94   - }
95   - default: // this will never happen, but compilers yells
96   - {
97   - }
98   - }
99   -
100   - return indices;
101   -}
  67 +const unsigned short INDEX_LINES[] = { 0, 1, 1, 2, 2, 3, 3, 4, 4, 0 };
  68 +const unsigned short INDEX_LOOP[] = { 0, 1, 2, 3, 4 };
  69 +const unsigned short INDEX_STRIP[] = { 0, 1, 2, 3, 4, 0 };
  70 +const unsigned short* INDICES[3] = { &INDEX_LINES[0], &INDEX_LOOP[0], &INDEX_STRIP[0] };
  71 +const unsigned int INDICES_SIZE[3] = { sizeof(INDEX_LINES)/sizeof(INDEX_LINES[0]), sizeof(INDEX_LOOP)/sizeof(INDEX_LOOP[0]), sizeof(INDEX_STRIP)/sizeof(INDEX_STRIP[0])};
102 72  
103 73 Geometry CreateGeometry()
104 74 {
... ... @@ -127,13 +97,11 @@ Geometry CreateGeometry()
127 97 PropertyBuffer pentagonVertices = PropertyBuffer::New( pentagonVertexFormat );
128 98 pentagonVertices.SetData(pentagonVertexData, 5);
129 99  
130   - // Create indices
131   - PropertyBuffer indices = CreateIndexBuffer( Geometry::LINES );
132 100  
133 101 // Create the geometry object
134 102 Geometry pentagonGeometry = Geometry::New();
135 103 pentagonGeometry.AddVertexBuffer( pentagonVertices );
136   - pentagonGeometry.SetIndexBuffer( indices );
  104 + pentagonGeometry.SetIndexBuffer( INDICES[0], INDICES_SIZE[0] );
137 105 pentagonGeometry.SetGeometryType( Geometry::LINES );
138 106 return pentagonGeometry;
139 107 }
... ... @@ -173,14 +141,18 @@ public:
173 141 {
174 142 Stage stage = Stage::GetCurrent();
175 143  
  144 + // initial settings
  145 + mPrimitiveType = Geometry::LINES;
  146 + mCurrentIndexCount = 10;
  147 + mMaxIndexCount = 10;
  148 +
176 149 CreateRadioButtons();
177 150  
178 151 stage.KeyEventSignal().Connect(this, &ExampleController::OnKeyEvent);
179 152  
180 153 mStageSize = stage.GetSize();
181 154  
182   - // The Init signal is received once (only) during the Application lifetime
183   - ReInitialise( Geometry::LINES );
  155 + Initialise();
184 156  
185 157 // Hide the indicator bar
186 158 application.GetWindow().ShowIndicator( Dali::Window::INVISIBLE );
... ... @@ -190,9 +162,8 @@ public:
190 162  
191 163 /**
192 164 * Invoked whenever application changes the type of geometry drawn
193   - * @param[in] type of geometry
194 165 */
195   - void ReInitialise( Geometry::GeometryType geometryType )
  166 + void Initialise()
196 167 {
197 168 Stage stage = Stage::GetCurrent();
198 169  
... ... @@ -207,6 +178,9 @@ public:
207 178 mGeometry = CreateGeometry();
208 179 mRenderer = Renderer::New( mGeometry, mShader );
209 180  
  181 + mRenderer.SetIndexRange( 0, 10 ); // lines
  182 + mPrimitiveType = Geometry::LINES;
  183 +
210 184 mMeshActor = Actor::New();
211 185 mMeshActor.AddRenderer( mRenderer );
212 186 mMeshActor.SetSize(200, 200);
... ... @@ -236,14 +210,14 @@ public:
236 210 {
237 211 Stage stage = Stage::GetCurrent();
238 212  
239   - Toolkit::TableView modeSelectTableView = Toolkit::TableView::New( 3, 1 );
  213 + Toolkit::TableView modeSelectTableView = Toolkit::TableView::New( 4, 1 );
240 214 modeSelectTableView.SetParentOrigin( ParentOrigin::TOP_LEFT );
241 215 modeSelectTableView.SetAnchorPoint( AnchorPoint::TOP_LEFT );
242 216 modeSelectTableView.SetFitHeight( 0 );
243 217 modeSelectTableView.SetFitHeight( 1 );
244 218 modeSelectTableView.SetFitHeight( 2 );
245 219 modeSelectTableView.SetCellPadding( Vector2( 6.0f, 0.0f ) );
246   - modeSelectTableView.SetScale( Vector3( 0.5f, 0.5f, 0.5f ));
  220 + modeSelectTableView.SetScale( Vector3( 0.8f, 0.8f, 0.8f ));
247 221  
248 222 const char* labels[] =
249 223 {
... ... @@ -268,7 +242,46 @@ public:
268 242 mButtons[i] = radio;
269 243 modeSelectTableView.AddChild( radio, Toolkit::TableView::CellPosition( i, 0 ) );
270 244 }
  245 +
  246 + Toolkit::TableView elementCountTableView = Toolkit::TableView::New( 1, 3 );
  247 + elementCountTableView.SetCellPadding( Vector2( 6.0f, 0.0f ) );
  248 + elementCountTableView.SetParentOrigin( ParentOrigin::BOTTOM_LEFT );
  249 + elementCountTableView.SetAnchorPoint( AnchorPoint::BOTTOM_LEFT );
  250 + elementCountTableView.SetFitHeight( 0 );
  251 + elementCountTableView.SetFitWidth( 0 );
  252 + elementCountTableView.SetFitWidth( 1 );
  253 + elementCountTableView.SetFitWidth( 2 );
  254 + mMinusButton = Toolkit::PushButton::New();
  255 + mMinusButton.SetLabelText( "<<" );
  256 + mMinusButton.SetParentOrigin( ParentOrigin::TOP_LEFT );
  257 + mMinusButton.SetAnchorPoint( AnchorPoint::CENTER_LEFT );
  258 +
  259 + Toolkit::PushButton mPlusButton = Toolkit::PushButton::New();
  260 + mPlusButton.SetLabelText( ">>" );
  261 + mPlusButton.SetParentOrigin( ParentOrigin::TOP_LEFT );
  262 + mPlusButton.SetAnchorPoint( AnchorPoint::CENTER_RIGHT );
  263 +
  264 + mMinusButton.ClickedSignal().Connect( this, &ExampleController::OnButtonClicked );
  265 + mPlusButton.ClickedSignal().Connect( this, &ExampleController::OnButtonClicked );
  266 +
  267 + mIndicesCountLabel = Toolkit::TextLabel::New();
  268 + mIndicesCountLabel.SetParentOrigin( ParentOrigin::CENTER );
  269 + mIndicesCountLabel.SetAnchorPoint( AnchorPoint::TOP_LEFT );
  270 +
  271 + std::stringstream str;
  272 + str << mCurrentIndexCount;
  273 + mIndicesCountLabel.SetProperty( Toolkit::TextLabel::Property::TEXT, str.str() );
  274 + mIndicesCountLabel.SetProperty( Toolkit::TextLabel::Property::TEXT_COLOR, Vector4( 1.0, 1.0, 1.0, 1.0 ) );
  275 + mIndicesCountLabel.SetProperty( Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT, "BOTTOM");
  276 + mIndicesCountLabel.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::WIDTH );
  277 + mIndicesCountLabel.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::HEIGHT );
  278 +
  279 + elementCountTableView.AddChild( mMinusButton, Toolkit::TableView::CellPosition( 0, 0 ) );
  280 + elementCountTableView.AddChild( mIndicesCountLabel, Toolkit::TableView::CellPosition( 0, 1 ) );
  281 + elementCountTableView.AddChild( mPlusButton, Toolkit::TableView::CellPosition( 0, 2 ) );
  282 +
271 283 stage.Add(modeSelectTableView);
  284 + stage.Add(elementCountTableView);
272 285 }
273 286  
274 287 /**
... ... @@ -295,35 +308,57 @@ public:
295 308  
296 309 bool OnButtonPressed( Toolkit::Button button )
297 310 {
298   - const Geometry::GeometryType geomTypes[] =
299   - {
300   - Geometry::LINES,
301   - Geometry::LINE_LOOP,
302   - Geometry::LINE_STRIP
303   - };
304   -
305   - size_t index;
  311 + int indicesArray;
306 312 if( button == mButtons[0] )
307 313 {
308   - index = 0;
  314 + mCurrentIndexCount = 10;
  315 + mMaxIndexCount = 10;
  316 + mPrimitiveType = Geometry::LINES;
  317 + indicesArray = 0;
309 318 }
310 319 else if( button == mButtons[1] )
311 320 {
312   - index = 1;
  321 + mCurrentIndexCount = 5;
  322 + mMaxIndexCount = 5;
  323 + mPrimitiveType = Geometry::LINE_LOOP;
  324 + indicesArray = 1;
313 325 }
314 326 else
315 327 {
316   - index = 2;
  328 + mCurrentIndexCount = 6;
  329 + mMaxIndexCount = 6;
  330 + mPrimitiveType = Geometry::LINE_STRIP;
  331 + indicesArray = 2;
317 332 }
318 333  
319   - PropertyBuffer indices = CreateIndexBuffer( geomTypes[ index ] );
320   - mGeometry.SetIndexBuffer( indices );
321   - mGeometry.SetGeometryType( geomTypes[ index ] );
322   -
  334 + std::stringstream str;
  335 + str << mCurrentIndexCount;
  336 + mIndicesCountLabel.SetProperty( Toolkit::TextLabel::Property::TEXT, str.str() );
  337 + mGeometry.SetGeometryType( mPrimitiveType );
  338 + mGeometry.SetIndexBuffer( INDICES[ indicesArray ], INDICES_SIZE[ indicesArray ] );
  339 + mRenderer.SetIndexRange( 0, mCurrentIndexCount );
323 340 return true;
324 341 }
325 342  
  343 + bool OnButtonClicked( Toolkit::Button button )
  344 + {
  345 + if( button == mMinusButton )
  346 + {
  347 + if (--mCurrentIndexCount < 2 )
  348 + mCurrentIndexCount = 2;
  349 + }
  350 + else
  351 + {
  352 + if (++mCurrentIndexCount > mMaxIndexCount )
  353 + mCurrentIndexCount = mMaxIndexCount;
  354 + }
326 355  
  356 + std::stringstream str;
  357 + str << mCurrentIndexCount;
  358 + mIndicesCountLabel.SetProperty( Toolkit::TextLabel::Property::TEXT, str.str() );
  359 + mRenderer.SetIndexRange( 0, mCurrentIndexCount );
  360 + return true;
  361 + }
327 362  
328 363 private:
329 364  
... ... @@ -334,7 +369,13 @@ private:
334 369 Geometry mGeometry;
335 370 Renderer mRenderer;
336 371 Actor mMeshActor;
337   - Toolkit::RadioButton mButtons[3];
  372 + Toolkit::RadioButton mButtons[3];
  373 + Toolkit::PushButton mMinusButton;
  374 + Toolkit::PushButton mPlusButton;
  375 + Toolkit::TextLabel mIndicesCountLabel;
  376 + Geometry::GeometryType mPrimitiveType;
  377 + int mCurrentIndexCount;
  378 + int mMaxIndexCount;
338 379 };
339 380  
340 381 void RunTest( Application& application )
... ...
examples/mesh-sorting/mesh-sorting-example.cpp
... ... @@ -102,16 +102,12 @@ Geometry CreateGeometry()
102 102 texturedQuadVertices.SetData( texturedQuadVertexData, 4 );
103 103  
104 104 // Create indices
105   - unsigned int indexData[6] = { 0, 3, 1, 0, 2, 3 };
106   - Property::Map indexFormat;
107   - indexFormat["indices"] = Property::INTEGER;
108   - PropertyBuffer indices = PropertyBuffer::New( indexFormat );
109   - indices.SetData( indexData, 6 );
  105 + unsigned short indexData[6] = { 0, 3, 1, 0, 2, 3 };
110 106  
111 107 // Create the geometry object
112 108 Geometry texturedQuadGeometry = Geometry::New();
113 109 texturedQuadGeometry.AddVertexBuffer( texturedQuadVertices );
114   - texturedQuadGeometry.SetIndexBuffer( indices );
  110 + texturedQuadGeometry.SetIndexBuffer( &indexData[0], sizeof(indexData)/sizeof(unsigned short) );
115 111  
116 112 return texturedQuadGeometry;
117 113 }
... ...
examples/metaball-explosion/metaball-explosion-example.cpp
... ... @@ -373,8 +373,6 @@ Geometry MetaballExplosionController::CreateGeometry()
373 373 { Vector2(1.0f, 1.0f * aspect) }
374 374 };
375 375  
376   - int indices[] = { 0, 3, 1, 0, 2, 3 };
377   -
378 376 unsigned int numberOfVertices = sizeof(vertices)/sizeof(VertexPosition);
379 377  
380 378 //Vertices
... ... @@ -390,17 +388,14 @@ Geometry MetaballExplosionController::CreateGeometry()
390 388 textureVertices.SetData( textures, numberOfVertices );
391 389  
392 390 //Indices
393   - Property::Map indicesVertexFormat;
394   - indicesVertexFormat["aIndices"] = Property::INTEGER;
395   - PropertyBuffer indicesToVertices = PropertyBuffer::New( indicesVertexFormat );
396   - indicesToVertices.SetData( indices, 6 );
  391 + unsigned short indices[] = { 0, 3, 1, 0, 2, 3 };
397 392  
398 393 // Create the geometry object
399 394 Geometry texturedQuadGeometry = Geometry::New();
400 395 texturedQuadGeometry.AddVertexBuffer( positionVertices );
401 396 texturedQuadGeometry.AddVertexBuffer( textureVertices );
402 397  
403   - texturedQuadGeometry.SetIndexBuffer ( indicesToVertices );
  398 + texturedQuadGeometry.SetIndexBuffer ( &indices[0], sizeof( indices )/ sizeof( indices[0] ) );
404 399  
405 400 return texturedQuadGeometry;
406 401 }
... ... @@ -431,8 +426,6 @@ Geometry MetaballExplosionController::CreateGeometryComposition()
431 426 { Vector2(1.0f, 1.0f) }
432 427 };
433 428  
434   - int indices[] = { 0, 3, 1, 0, 2, 3 };
435   -
436 429 unsigned int numberOfVertices = sizeof(vertices)/sizeof(VertexPosition);
437 430  
438 431 //Vertices
... ... @@ -448,17 +441,14 @@ Geometry MetaballExplosionController::CreateGeometryComposition()
448 441 textureVertices.SetData( textures, numberOfVertices );
449 442  
450 443 //Indices
451   - Property::Map indicesVertexFormat;
452   - indicesVertexFormat["aIndices"] = Property::INTEGER;
453   - PropertyBuffer indicesToVertices = PropertyBuffer::New( indicesVertexFormat );
454   - indicesToVertices.SetData( indices, 6 );
  444 + unsigned short indices[] = { 0, 3, 1, 0, 2, 3 };
455 445  
456 446 // Create the geometry object
457 447 Geometry texturedQuadGeometry = Geometry::New();
458 448 texturedQuadGeometry.AddVertexBuffer( positionVertices );
459 449 texturedQuadGeometry.AddVertexBuffer( textureVertices );
460 450  
461   - texturedQuadGeometry.SetIndexBuffer ( indicesToVertices );
  451 + texturedQuadGeometry.SetIndexBuffer ( &indices[0], sizeof( indices )/ sizeof( indices[0] ) );
462 452  
463 453 return texturedQuadGeometry;
464 454 }
... ...
examples/metaball-refrac/metaball-refrac-example.cpp
... ... @@ -322,8 +322,6 @@ Geometry MetaballRefracController::CreateGeometry()
322 322 { Vector3(0.0f, 0.0f, 1.0f) }
323 323 };
324 324  
325   - int indices[] = { 0, 3, 1, 0, 2, 3 };
326   -
327 325 unsigned int numberOfVertices = sizeof(vertices)/sizeof(VertexPosition);
328 326  
329 327 //Vertices
... ... @@ -345,11 +343,7 @@ Geometry MetaballRefracController::CreateGeometry()
345 343 normalVertices.SetData( normals, numberOfVertices );
346 344  
347 345 //Indices
348   - Property::Map indicesVertexFormat;
349   - indicesVertexFormat["aIndices"] = Property::INTEGER;
350   - PropertyBuffer indicesToVertices = PropertyBuffer::New( indicesVertexFormat );
351   - indicesToVertices.SetData( indices, 6 );
352   -
  346 + unsigned short indices[] = { 0, 3, 1, 0, 2, 3 };
353 347  
354 348 // Create the geometry object
355 349 Geometry texturedQuadGeometry = Geometry::New();
... ... @@ -357,7 +351,7 @@ Geometry MetaballRefracController::CreateGeometry()
357 351 texturedQuadGeometry.AddVertexBuffer( textureVertices );
358 352 texturedQuadGeometry.AddVertexBuffer( normalVertices );
359 353  
360   - texturedQuadGeometry.SetIndexBuffer ( indicesToVertices );
  354 + texturedQuadGeometry.SetIndexBuffer ( &indices[0], 6 );
361 355  
362 356 return texturedQuadGeometry;
363 357 }
... ... @@ -398,8 +392,6 @@ Geometry MetaballRefracController::CreateGeometryComposition()
398 392 { Vector3(0.0f, 0.0f, 1.0f) }
399 393 };
400 394  
401   - int indices[] = { 0, 3, 1, 0, 2, 3 };
402   -
403 395 unsigned int numberOfVertices = sizeof(vertices)/sizeof(VertexPosition);
404 396  
405 397 //Vertices
... ... @@ -421,10 +413,7 @@ Geometry MetaballRefracController::CreateGeometryComposition()
421 413 normalVertices.SetData( normals, numberOfVertices );
422 414  
423 415 //Indices
424   - Property::Map indicesVertexFormat;
425   - indicesVertexFormat["aIndices"] = Property::INTEGER;
426   - PropertyBuffer indicesToVertices = PropertyBuffer::New( indicesVertexFormat );
427   - indicesToVertices.SetData( indices, 6 );
  416 + unsigned short indices[] = { 0, 3, 1, 0, 2, 3 };
428 417  
429 418 // Create the geometry object
430 419 Geometry texturedQuadGeometry = Geometry::New();
... ... @@ -432,7 +421,7 @@ Geometry MetaballRefracController::CreateGeometryComposition()
432 421 texturedQuadGeometry.AddVertexBuffer( textureVertices );
433 422 texturedQuadGeometry.AddVertexBuffer( normalVertices );
434 423  
435   - texturedQuadGeometry.SetIndexBuffer ( indicesToVertices );
  424 + texturedQuadGeometry.SetIndexBuffer ( &indices[0], sizeof( indices )/ sizeof( indices[0] ) );
436 425  
437 426 return texturedQuadGeometry;
438 427 }
... ...
examples/motion-blur/motion-blur-example.cpp
... ... @@ -193,7 +193,6 @@ public:
193 193 winHandle.AddAvailableOrientation( Dali::Window::LANDSCAPE_INVERSE );
194 194  
195 195 // set initial orientation
196   - // winHandle.GetOrientation().ChangedSignal().Connect( this, &MotionBlurExampleApp::OnOrientationChanged );
197 196 unsigned int degrees = 0;
198 197 Rotate( static_cast< DeviceOrientation >( degrees ) );
199 198  
... ... @@ -289,18 +288,6 @@ public:
289 288 #endif //#ifdef MULTIPLE_MOTION_BLURRED_ACTORS
290 289 }
291 290  
292   - //////////////////////////////////////////////////////////////
293   - //
294   - // Device Orientation Support
295   - //
296   - //
297   -
298   - void OnOrientationChanged( Orientation orientation )
299   - {
300   - unsigned int degrees = orientation.GetDegrees();
301   - Rotate( static_cast< DeviceOrientation >( degrees ) );
302   - }
303   -
304 291 void Rotate( DeviceOrientation orientation )
305 292 {
306 293 // Resize the root actor
... ...
examples/motion-stretch/motion-stretch-example.cpp
... ... @@ -167,7 +167,6 @@ public:
167 167 winHandle.AddAvailableOrientation( Dali::Window::PORTRAIT_INVERSE );
168 168 winHandle.AddAvailableOrientation( Dali::Window::LANDSCAPE_INVERSE );
169 169  
170   - // winHandle.GetOrientation().ChangedSignal().Connect( this, &MotionStretchExampleApp::OnOrientationChanged );
171 170 unsigned int degrees = 0;
172 171 Rotate( static_cast< DeviceOrientation >( degrees ) );
173 172  
... ... @@ -196,12 +195,6 @@ public:
196 195 //
197 196 //
198 197  
199   - void OnOrientationChanged( Orientation orientation )
200   - {
201   - unsigned int degrees = orientation.GetDegrees();
202   - Rotate( static_cast< DeviceOrientation >( degrees ) );
203   - }
204   -
205 198 void Rotate( DeviceOrientation orientation )
206 199 {
207 200 // Resize the root actor
... ...
examples/new-window/new-window-example.cpp
... ... @@ -450,16 +450,12 @@ Geometry NewWindowController::CreateMeshGeometry()
450 450 vertices.SetData( vertexData, 5 );
451 451  
452 452 // Specify all the faces
453   - unsigned int indexData[12] = { 0,1,3,0,2,4,0,3,4,0,2,1 };
454   - Property::Map indexFormat;
455   - indexFormat["indices"] = Property::INTEGER;
456   - PropertyBuffer indices = PropertyBuffer::New( indexFormat );
457   - indices.SetData( indexData, 12 );
  453 + unsigned short indexData[12] = { 0,1,3,0,2,4,0,3,4,0,2,1 };
458 454  
459 455 // Create the geometry object
460 456 Geometry geometry = Geometry::New();
461 457 geometry.AddVertexBuffer( vertices );
462   - geometry.SetIndexBuffer( indices );
  458 + geometry.SetIndexBuffer( &indexData[0], 12 );
463 459  
464 460 return geometry;
465 461 }
... ...
examples/radial-menu/radial-sweep-view-impl.cpp
... ... @@ -330,15 +330,11 @@ void RadialSweepViewImpl::CreateStencil( Radian initialSector )
330 330 PropertyBuffer vertices = PropertyBuffer::New( vertexFormat );
331 331 vertices.SetData( vertexData, 7u );
332 332  
333   - unsigned int indexData[15] = { 0,1,2,0,2,3,0,3,4,0,4,5,0,5,6 };
334   - Property::Map indexFormat;
335   - indexFormat["indices"] = Property::INTEGER;
336   - PropertyBuffer indices = PropertyBuffer::New( indexFormat );
337   - indices.SetData( indexData, 15u );
  333 + unsigned short indexData[15] = { 0,1,2,0,2,3,0,3,4,0,4,5,0,5,6 };
338 334  
339 335 Geometry meshGeometry = Geometry::New();
340 336 meshGeometry.AddVertexBuffer( vertices );
341   - meshGeometry.SetIndexBuffer( indices );
  337 + meshGeometry.SetIndexBuffer( &indexData[0], sizeof( indexData )/sizeof(indexData[0]) );
342 338  
343 339 // Create shader
344 340 std::ostringstream vertexShaderStringStream;
... ...
examples/textured-mesh/textured-mesh-example.cpp
... ... @@ -79,16 +79,12 @@ Geometry CreateGeometry()
79 79 texturedQuadVertices.SetData( texturedQuadVertexData, 4 );
80 80  
81 81 // Create indices
82   - unsigned int indexData[6] = { 0, 3, 1, 0, 2, 3 };
83   - Property::Map indexFormat;
84   - indexFormat["indices"] = Property::INTEGER;
85   - PropertyBuffer indices = PropertyBuffer::New( indexFormat );
86   - indices.SetData( indexData, sizeof(indexData)/sizeof(indexData[0]) );
  82 + unsigned short indexData[6] = { 0, 3, 1, 0, 2, 3 };
87 83  
88 84 // Create the geometry object
89 85 Geometry texturedQuadGeometry = Geometry::New();
90 86 texturedQuadGeometry.AddVertexBuffer( texturedQuadVertices );
91   - texturedQuadGeometry.SetIndexBuffer( indices );
  87 + texturedQuadGeometry.SetIndexBuffer( &indexData[0], sizeof(indexData)/sizeof(indexData[0]) );
92 88  
93 89 return texturedQuadGeometry;
94 90 }
... ...
packaging/com.samsung.dali-demo.spec
... ... @@ -2,7 +2,7 @@
2 2  
3 3 Name: com.samsung.dali-demo
4 4 Summary: The OpenGLES Canvas Core Demo
5   -Version: 1.1.31
  5 +Version: 1.1.32
6 6 Release: 1
7 7 Group: System/Libraries
8 8 License: Apache-2.0
... ...
resources/scripts/animation.json
... ... @@ -118,9 +118,9 @@
118 118 "text": "or the image.."
119 119 }, {
120 120 "name": "image",
121   - "type": "ImageActor",
  121 + "type": "ImageView",
122 122 "image": {
123   - "filename": "{DEMO_IMAGE_DIR}gallery-large-21.jpg"
  123 + "url": "{DEMO_IMAGE_DIR}gallery-large-21.jpg"
124 124 },
125 125 "relayoutEnabled": false,
126 126 "position": [0, 200, 0],
... ...
resources/scripts/background.json
... ... @@ -45,8 +45,8 @@
45 45 "heightResizePolicy":"SIZE_RELATIVE_TO_PARENT",
46 46 "sizeModeFactor": [ 0.5, 0.333333333333, 1 ],
47 47 "background": {
48   - "rendererType": "svg",
49   - "imageUrl": "{DEMO_IMAGE_DIR}Kid1.svg"
  48 + "rendererType": "image",
  49 + "url": "{DEMO_IMAGE_DIR}Kid1.svg"
50 50 }
51 51 },
52 52  
... ... @@ -77,7 +77,7 @@
77 77 "sizeModeFactor": [ 0.5, 0.333333333333, 1 ],
78 78 "background": {
79 79 "rendererType": "image",
80   - "imageUrl": "{DEMO_IMAGE_DIR}gallery-large-9.jpg"
  80 + "url": "{DEMO_IMAGE_DIR}gallery-large-9.jpg"
81 81 }
82 82 },
83 83  
... ...
resources/scripts/shader-effect-ripple.json
1 1 {
2 2 "stage": [
3 3 {
4   - "type": "ImageActor",
  4 + "type": "ImageView",
5 5 "name": "Image1",
6 6 "position": [
7 7 0.40461349487305,
... ... @@ -11,13 +11,17 @@
11 11 "parentOrigin": [0.5, 0.5, 0.5],
12 12 "widthResizePolicy":"FILL_TO_PARENT",
13 13 "heightResizePolicy":"DIMENSION_DEPENDENCY",
14   - "effect": "Ripple2D",
15 14 "image": {
16   - "filename": "{DEMO_IMAGE_DIR}gallery-medium-25.jpg",
17   - "width": 400,
18   - "height": 400,
19   - "loadPolicy": "IMMEDIATE",
20   - "releasePolicy": "NEVER"
  15 + "url": "{DEMO_IMAGE_DIR}gallery-medium-25.jpg",
  16 + "desiredWidth": 400,
  17 + "desiredHeight": 400,
  18 + "shader": {
  19 + "fragmentShader": "precision mediump float;\nuniform sampler2D sTexture;\nuniform vec4 uColor;\nuniform float uAmplitude;\nuniform float uTime;\nvarying vec2 vTexCoord;\nvoid main()\n{\n highp vec2 pos = -1.0 + 2.0 * vTexCoord;\n highp float len = length(pos);\n highp vec2 texCoord = vTexCoord + pos/len * sin( len * 12.0 - uTime * 4.0 ) * uAmplitude;\n gl_FragColor = texture2D(sTexture, texCoord) * uColor;}\n\n"
  20 + }
  21 + },
  22 + "animatableProperties": {
  23 + "uAmplitude": 0.02,
  24 + "uTime": 0.0
21 25 },
22 26 "signals": [
23 27 {
... ... @@ -28,7 +32,6 @@
28 32 ]
29 33 }
30 34 ],
31   - "paths": {},
32 35 "animations": {
33 36 "Animation_1": {
34 37 "loop":true,
... ... @@ -46,21 +49,5 @@
46 49 }
47 50 ]
48 51 }
49   - },
50   - "shaderEffects": {
51   - "Ripple2D": {
52   - "program": {
53   - "vertexPrefix": "",
54   - "vertex": "void main(void)\n{\n gl_Position = uMvpMatrix * vec4(aPosition, 1.0);\n vTexCoord = mix( sTextureRect.xy, sTextureRect.zw, aTexCoord );\n}\n\n",
55   - "fragmentPrefix": "",
56   - "fragment": "precision mediump float;\nuniform float uAmplitude; // 0.02; (< 1)\nuniform float uTime;\nvoid main()\n{\n highp vec2 textureSize = sTextureRect.zw - sTextureRect.xy;\n highp vec2 pos = -1.0 + 2.0 * vTexCoord.st/textureSize;\n highp float len = length(pos);\n highp vec2 texCoord = vTexCoord.st/textureSize + pos/len * sin( len * 12.0 - uTime * 4.0 ) * uAmplitude; \n gl_FragColor = texture2D(sTexture, texCoord) * uColor;\n}\n\n\n",
57   - "geometryType": "GEOMETRY_TYPE_IMAGE"
58   - },
59   - "geometryHints": "HINT_NONE",
60   - "gridDensity": 0,
61   - "loop": true,
62   - "uAmplitude": 0.02,
63   - "uTime": 0.0
64   - }
65 52 }
66 53 }
... ...
resources/scripts/table-view.json
... ... @@ -63,34 +63,34 @@
63 63 },
64 64 "actors": [{
65 65 "name":"gallery1",
66   - "type":"ImageActor",
  66 + "type":"ImageView",
67 67 "heightResizePolicy":"FILL_TO_PARENT",
68 68 "image": {
69   - "filename": "{DEMO_IMAGE_DIR}gallery-small-1.jpg"
  69 + "url": "{DEMO_IMAGE_DIR}gallery-small-1.jpg"
70 70 },
71   - "customProperties": { // properties registered dynamically
  71 + "properties": { // properties registered dynamically
72 72 "cellIndex": [0,0], // property to specify the top-left cell this child occupies
73 73 "rowSpan":4, // property to specify how many rows this child occupies, if not set, default value is 1
74 74 "columnSpan":1 // property to specify how many columns this child occupies, if nor set, defualt cvalue is 1
75 75 }
76 76 },{
77 77 "name":"gallery2",
78   - "type":"ImageActor",
  78 + "type":"ImageView",
79 79 "heightResizePolicy":"FILL_TO_PARENT",
80 80 "image": {
81   - "filename": "{DEMO_IMAGE_DIR}gallery-small-2.jpg"
  81 + "url": "{DEMO_IMAGE_DIR}gallery-small-2.jpg"
82 82 },
83   - "customProperties": { // properties registered dynamically
  83 + "properties": { // properties registered dynamically
84 84 "cellIndex": [0,1],
85 85 "cellHorizontalAlignment": "right" // property to specify how to align horizontally inside the cells, if not set, default value is 'left'
86 86 }
87 87 },{
88 88 "name":"gallery3",
89   - "type":"ImageActor",
  89 + "type":"ImageView",
90 90 "image": {
91   - "filename": "{DEMO_IMAGE_DIR}gallery-small-3.jpg"
  91 + "url": "{DEMO_IMAGE_DIR}gallery-small-3.jpg"
92 92 },
93   - "customProperties": {
  93 + "properties": {
94 94 "cellIndex":[1,1],
95 95 "rowSpan":3,
96 96 "cellHorizontalAlignment": "left",// property to specify how to align horizontally inside the cells, if not set, default value is 'left'
... ... @@ -98,23 +98,23 @@
98 98 }
99 99 }, {
100 100 "name":"gallery4",
101   - "type":"ImageActor",
  101 + "type":"ImageView",
102 102 "widthResizePolicy":"FILL_TO_PARENT",
103 103 "image": {
104   - "filename": "{DEMO_IMAGE_DIR}gallery-small-4.jpg"
  104 + "url": "{DEMO_IMAGE_DIR}gallery-small-4.jpg"
105 105 },
106   - "customProperties": {
  106 + "properties": {
107 107 "cellIndex":[2,2]
108 108 }
109 109 }, {
110 110 "name":"gallery5",
111   - "type":"ImageActor",
  111 + "type":"ImageView",
112 112 "widthResizePolicy":"FILL_TO_PARENT",
113 113 "heightResizePolicy":"FILL_TO_PARENT",
114 114 "image": {
115   - "filename": "{DEMO_IMAGE_DIR}gallery-small-5.jpg"
  115 + "url": "{DEMO_IMAGE_DIR}gallery-small-5.jpg"
116 116 },
117   - "customProperties": {
  117 + "properties": {
118 118 "cellIndex":[3,2],
119 119 "columnSpan": 2
120 120 }
... ...
shared/view.h
... ... @@ -20,7 +20,6 @@
20 20  
21 21 #include <dali-toolkit/dali-toolkit.h>
22 22 #include <dali-toolkit/devel-api/controls/tool-bar/tool-bar.h>
23   -#include <dali-toolkit/devel-api/styling/style-manager.h>
24 23  
25 24  
26 25 namespace DemoHelper
... ...