Commit a284a43f0bb9f45e37809d9778d3c774a5169d50
Committed by
Gerrit Code Review
Merge "Updates following rename of PropertyBuffer" into devel/master
Showing
27 changed files
with
69 additions
and
70 deletions
examples/animated-shapes/animated-shapes-example.cpp
| ... | ... | @@ -195,7 +195,7 @@ public: |
| 195 | 195 | //Create a vertex buffer for vertex positions and texture coordinates |
| 196 | 196 | Dali::Property::Map vertexFormat; |
| 197 | 197 | vertexFormat["aCoefficient"] = Dali::Property::VECTOR3; |
| 198 | - Dali::PropertyBuffer vertexBuffer = Dali::PropertyBuffer::New( vertexFormat ); | |
| 198 | + Dali::VertexBuffer vertexBuffer = Dali::VertexBuffer::New( vertexFormat ); | |
| 199 | 199 | vertexBuffer.SetData( vertexData, sizeof(vertexData)/sizeof(vertexData[0])); |
| 200 | 200 | |
| 201 | 201 | //Create the geometry |
| ... | ... | @@ -287,7 +287,7 @@ public: |
| 287 | 287 | //Create a vertex buffer for vertex positions and texture coordinates |
| 288 | 288 | Dali::Property::Map vertexFormat; |
| 289 | 289 | vertexFormat["aCoefficient"] = Dali::Property::VECTOR3; |
| 290 | - Dali::PropertyBuffer vertexBuffer = Dali::PropertyBuffer::New( vertexFormat ); | |
| 290 | + Dali::VertexBuffer vertexBuffer = Dali::VertexBuffer::New( vertexFormat ); | |
| 291 | 291 | vertexBuffer.SetData( vertexData, sizeof(vertexData)/sizeof(vertexData[0])); |
| 292 | 292 | |
| 293 | 293 | //Create the geometry |
| ... | ... | @@ -388,7 +388,7 @@ public: |
| 388 | 388 | //Create a vertex buffer for vertex positions and texture coordinates |
| 389 | 389 | Dali::Property::Map vertexFormat; |
| 390 | 390 | vertexFormat["aCoefficient"] = Dali::Property::VECTOR3; |
| 391 | - Dali::PropertyBuffer vertexBuffer = Dali::PropertyBuffer::New( vertexFormat ); | |
| 391 | + Dali::VertexBuffer vertexBuffer = Dali::VertexBuffer::New( vertexFormat ); | |
| 392 | 392 | vertexBuffer.SetData( vertexData, sizeof(vertexData)/sizeof(vertexData[0])); |
| 393 | 393 | |
| 394 | 394 | //Create the geometry | ... | ... |
examples/bezier-curve/bezier-curve-example.cpp
| ... | ... | @@ -300,7 +300,7 @@ public: |
| 300 | 300 | |
| 301 | 301 | Property::Map curveVertexFormat; |
| 302 | 302 | curveVertexFormat["aPosition"] = Property::VECTOR2; |
| 303 | - mCurveVertices = PropertyBuffer::New( curveVertexFormat ); | |
| 303 | + mCurveVertices = VertexBuffer::New( curveVertexFormat ); | |
| 304 | 304 | Vector2 vertexData[2] = { Vector2(-0.5f, 0.5f), Vector2( 0.5f, -0.5f ) }; |
| 305 | 305 | mCurveVertices.SetData( vertexData, 2 ); |
| 306 | 306 | |
| ... | ... | @@ -334,7 +334,7 @@ public: |
| 334 | 334 | return actor; |
| 335 | 335 | } |
| 336 | 336 | |
| 337 | - Actor CreateControlLine( PropertyBuffer vertexBuffer ) | |
| 337 | + Actor CreateControlLine( VertexBuffer vertexBuffer ) | |
| 338 | 338 | { |
| 339 | 339 | Actor line = Actor::New(); |
| 340 | 340 | line.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS ); |
| ... | ... | @@ -364,8 +364,8 @@ public: |
| 364 | 364 | |
| 365 | 365 | Property::Map lineVertexFormat; |
| 366 | 366 | lineVertexFormat["aPosition"] = Property::VECTOR2; |
| 367 | - mLine1Vertices = PropertyBuffer::New( lineVertexFormat ); | |
| 368 | - mLine2Vertices = PropertyBuffer::New( lineVertexFormat ); | |
| 367 | + mLine1Vertices = VertexBuffer::New( lineVertexFormat ); | |
| 368 | + mLine2Vertices = VertexBuffer::New( lineVertexFormat ); | |
| 369 | 369 | |
| 370 | 370 | mControlLine1 = CreateControlLine( mLine1Vertices ); |
| 371 | 371 | mControlLine2 = CreateControlLine( mLine2Vertices ); |
| ... | ... | @@ -595,9 +595,9 @@ private: |
| 595 | 595 | Timer mTimer; |
| 596 | 596 | Animation mDragAnimation; |
| 597 | 597 | Animation mBezierAnimation; |
| 598 | - PropertyBuffer mCurveVertices; | |
| 599 | - PropertyBuffer mLine1Vertices; | |
| 600 | - PropertyBuffer mLine2Vertices; | |
| 598 | + VertexBuffer mCurveVertices; | |
| 599 | + VertexBuffer mLine1Vertices; | |
| 600 | + VertexBuffer mLine2Vertices; | |
| 601 | 601 | Vector2 mRelativeDragPoint; |
| 602 | 602 | Vector2 mLastControlPointPosition1; |
| 603 | 603 | Vector2 mLastControlPointPosition2; | ... | ... |
examples/contact-cards/clipped-image.cpp
| ... | ... | @@ -131,7 +131,7 @@ Geometry& CreateGeometry() |
| 131 | 131 | |
| 132 | 132 | Property::Map circleVertexFormat; |
| 133 | 133 | circleVertexFormat["aPositionCircle"] = Property::VECTOR2; |
| 134 | - PropertyBuffer circleVertices = PropertyBuffer::New( circleVertexFormat ); | |
| 134 | + VertexBuffer circleVertices = VertexBuffer::New( circleVertexFormat ); | |
| 135 | 135 | circleVertices.SetData( circleBuffer, vertexCount ); |
| 136 | 136 | |
| 137 | 137 | // Create the Quad Geometry |
| ... | ... | @@ -176,7 +176,7 @@ Geometry& CreateGeometry() |
| 176 | 176 | |
| 177 | 177 | Property::Map vertexFormat; |
| 178 | 178 | vertexFormat["aPositionQuad"] = Property::VECTOR2; |
| 179 | - PropertyBuffer quadVertices2 = PropertyBuffer::New( vertexFormat ); | |
| 179 | + VertexBuffer quadVertices2 = VertexBuffer::New( vertexFormat ); | |
| 180 | 180 | quadVertices2.SetData( quadBuffer, vertexCount ); |
| 181 | 181 | |
| 182 | 182 | // Create the geometry object itself | ... | ... |
examples/deferred-shading/deferred-shading.cpp
| ... | ... | @@ -64,7 +64,7 @@ in vec3 aNormal; |
| 64 | 64 | out vec4 vPosition; |
| 65 | 65 | out vec3 vNormal; |
| 66 | 66 | |
| 67 | -vec4 Map(vec4 v) // projection space -> texture | |
| 67 | +vec4 Map(vec4 v) // projection space -> texture | |
| 68 | 68 | { |
| 69 | 69 | return vec4(v.xyz / (2.f * v.w) + vec3(.5f), (v.w - NEAR) * INV_DEPTH); |
| 70 | 70 | } |
| ... | ... | @@ -149,7 +149,7 @@ uniform vec3 uDepth_InvDepth_Near;\n) |
| 149 | 149 | // Light source uniforms |
| 150 | 150 | struct Light |
| 151 | 151 | { |
| 152 | - vec3 position; // view space | |
| 152 | + vec3 position; // view space | |
| 153 | 153 | float radius; |
| 154 | 154 | vec3 color; |
| 155 | 155 | }; |
| ... | ... | @@ -160,7 +160,7 @@ in vec2 vUv; |
| 160 | 160 | |
| 161 | 161 | out vec4 oColor; |
| 162 | 162 | |
| 163 | -vec4 Unmap(vec4 m) // texture -> projection | |
| 163 | +vec4 Unmap(vec4 m) // texture -> projection | |
| 164 | 164 | { |
| 165 | 165 | m.w = m.w * DEPTH + NEAR; |
| 166 | 166 | m.xyz = (m.xyz - vec3(.5)) * (2.f * m.w); |
| ... | ... | @@ -180,10 +180,10 @@ vec3 CalculateLighting(vec3 pos, vec3 normal) |
| 180 | 180 | rel /= distance; |
| 181 | 181 | |
| 182 | 182 | float a = uLights[i].radius / (kAttenuationConst + kAttenuationLinear * distance + |
| 183 | - kAttenuationQuadratic * distance * distance); // attenuation | |
| 183 | + kAttenuationQuadratic * distance * distance); // attenuation | |
| 184 | 184 | |
| 185 | - float l = max(0.f, dot(normal, rel)); // lambertian | |
| 186 | - float s = pow(max(0.f, dot(viewDirRefl, rel)), 256.f); // specular | |
| 185 | + float l = max(0.f, dot(normal, rel)); // lambertian | |
| 186 | + float s = pow(max(0.f, dot(viewDirRefl, rel)), 256.f); // specular | |
| 187 | 187 | |
| 188 | 188 | light += (uLights[i].color * (l + s)) * a; |
| 189 | 189 | } |
| ... | ... | @@ -324,7 +324,7 @@ Geometry CreateTexturedQuadGeometry(bool flipV) |
| 324 | 324 | std::swap(vertexData[1].aTexCoord, vertexData[3].aTexCoord); |
| 325 | 325 | } |
| 326 | 326 | |
| 327 | - PropertyBuffer vertexBuffer = PropertyBuffer::New( Property::Map() | |
| 327 | + VertexBuffer vertexBuffer = VertexBuffer::New( Property::Map() | |
| 328 | 328 | .Add( "aPosition", Property::VECTOR3 ) |
| 329 | 329 | .Add( "aTexCoord", Property::VECTOR2 ) ); |
| 330 | 330 | vertexBuffer.SetData( vertexData, std::extent<decltype(vertexData)>::value ); |
| ... | ... | @@ -402,7 +402,7 @@ Geometry CreateOctahedron(bool invertNormals) |
| 402 | 402 | } |
| 403 | 403 | |
| 404 | 404 | // Configure property buffers and create geometry. |
| 405 | - PropertyBuffer vertexBuffer = PropertyBuffer::New(Property::Map() | |
| 405 | + VertexBuffer vertexBuffer = VertexBuffer::New(Property::Map() | |
| 406 | 406 | .Add("aPosition", Property::VECTOR3) |
| 407 | 407 | .Add("aNormal", Property::VECTOR3)); |
| 408 | 408 | vertexBuffer.SetData(vertexData, std::extent<decltype(vertexData)>::value); | ... | ... |
examples/fpp-game/game-model.cpp
| ... | ... | @@ -45,11 +45,11 @@ GameModel::GameModel( const char *filename ) |
| 45 | 45 | mHeader = *(reinterpret_cast<ModelHeader*>( bytes.data() + bytes.size()/2 )); |
| 46 | 46 | } |
| 47 | 47 | |
| 48 | - mVertexBuffer = Dali::PropertyBuffer::New( Dali::Property::Map(). | |
| 49 | - Add( "aPosition", Dali::Property::VECTOR3 ). | |
| 50 | - Add( "aNormal", Dali::Property::VECTOR3 ). | |
| 51 | - Add( "aTexCoord", Dali::Property::VECTOR2 ) | |
| 52 | - ); | |
| 48 | + mVertexBuffer = Dali::VertexBuffer::New( Dali::Property::Map(). | |
| 49 | + Add( "aPosition", Dali::Property::VECTOR3 ). | |
| 50 | + Add( "aNormal", Dali::Property::VECTOR3 ). | |
| 51 | + Add( "aTexCoord", Dali::Property::VECTOR2 ) | |
| 52 | + ); | |
| 53 | 53 | |
| 54 | 54 | mVertexBuffer.SetData( bytes.data() + mHeader.dataBeginOffset, mHeader.vertexBufferSize/mHeader.vertexStride ); |
| 55 | 55 | ... | ... |
examples/fpp-game/game-model.h
| ... | ... | @@ -19,7 +19,7 @@ |
| 19 | 19 | */ |
| 20 | 20 | |
| 21 | 21 | #include <dali/public-api/rendering/geometry.h> |
| 22 | -#include <dali/public-api/rendering/property-buffer.h> | |
| 22 | +#include <dali/public-api/rendering/vertex-buffer.h> | |
| 23 | 23 | |
| 24 | 24 | #include <inttypes.h> |
| 25 | 25 | |
| ... | ... | @@ -44,7 +44,7 @@ struct ModelHeader |
| 44 | 44 | /** |
| 45 | 45 | * @brief The GameModel class |
| 46 | 46 | * GameModel represents model geometry. It loads model data from external model file ( .mod file ). |
| 47 | - * Such data is ready to be used as GL buffer so it can be copied directly into the PropertyBuffer | |
| 47 | + * Such data is ready to be used as GL buffer so it can be copied directly into the VertexBuffer | |
| 48 | 48 | * object. |
| 49 | 49 | * |
| 50 | 50 | * Model file is multi-architecture so can be loaded on little and big endian architectures |
| ... | ... | @@ -85,7 +85,7 @@ public: |
| 85 | 85 | private: |
| 86 | 86 | |
| 87 | 87 | Dali::Geometry mGeometry; |
| 88 | - Dali::PropertyBuffer mVertexBuffer; | |
| 88 | + Dali::VertexBuffer mVertexBuffer; | |
| 89 | 89 | |
| 90 | 90 | ModelHeader mHeader; |
| 91 | 91 | ... | ... |
examples/line-mesh/line-mesh-example.cpp
| ... | ... | @@ -95,7 +95,7 @@ Geometry CreateGeometry() |
| 95 | 95 | pentagonVertexFormat["aPosition1"] = Property::VECTOR2; |
| 96 | 96 | pentagonVertexFormat["aPosition2"] = Property::VECTOR2; |
| 97 | 97 | pentagonVertexFormat["aColor"] = Property::VECTOR3; |
| 98 | - PropertyBuffer pentagonVertices = PropertyBuffer::New( pentagonVertexFormat ); | |
| 98 | + VertexBuffer pentagonVertices = VertexBuffer::New( pentagonVertexFormat ); | |
| 99 | 99 | pentagonVertices.SetData(pentagonVertexData, 5); |
| 100 | 100 | |
| 101 | 101 | ... | ... |
examples/mesh-morph/mesh-morph-example.cpp
| ... | ... | @@ -218,17 +218,17 @@ Geometry CreateGeometry() |
| 218 | 218 | |
| 219 | 219 | Property::Map initialPositionVertexFormat; |
| 220 | 220 | initialPositionVertexFormat["aInitPos"] = Property::VECTOR2; |
| 221 | - PropertyBuffer initialPositionVertices = PropertyBuffer::New( initialPositionVertexFormat ); | |
| 221 | + VertexBuffer initialPositionVertices = VertexBuffer::New( initialPositionVertexFormat ); | |
| 222 | 222 | initialPositionVertices.SetData( quad, numberOfVertices ); |
| 223 | 223 | |
| 224 | 224 | Property::Map finalPositionVertexFormat; |
| 225 | 225 | finalPositionVertexFormat["aFinalPos"] = Property::VECTOR2; |
| 226 | - PropertyBuffer finalPositionVertices = PropertyBuffer::New( finalPositionVertexFormat ); | |
| 226 | + VertexBuffer finalPositionVertices = VertexBuffer::New( finalPositionVertexFormat ); | |
| 227 | 227 | finalPositionVertices.SetData( cat, numberOfVertices ); |
| 228 | 228 | |
| 229 | 229 | Property::Map colorVertexFormat; |
| 230 | 230 | colorVertexFormat["aColor"] = Property::VECTOR3; |
| 231 | - PropertyBuffer colorVertices = PropertyBuffer::New( colorVertexFormat ); | |
| 231 | + VertexBuffer colorVertices = VertexBuffer::New( colorVertexFormat ); | |
| 232 | 232 | colorVertices.SetData( colors, numberOfVertices ); |
| 233 | 233 | |
| 234 | 234 | // Create the geometry object | ... | ... |
examples/metaball-explosion/metaball-explosion-example.cpp
| ... | ... | @@ -400,13 +400,13 @@ Geometry MetaballExplosionController::CreateGeometry( bool aspectMappedTexture ) |
| 400 | 400 | // Vertices |
| 401 | 401 | Property::Map positionVertexFormat; |
| 402 | 402 | positionVertexFormat["aPosition"] = Property::VECTOR2; |
| 403 | - PropertyBuffer positionVertices = PropertyBuffer::New( positionVertexFormat ); | |
| 403 | + VertexBuffer positionVertices = VertexBuffer::New( positionVertexFormat ); | |
| 404 | 404 | positionVertices.SetData( vertices, numberOfVertices ); |
| 405 | 405 | |
| 406 | 406 | // Textures |
| 407 | 407 | Property::Map textureVertexFormat; |
| 408 | 408 | textureVertexFormat["aTexture"] = Property::VECTOR2; |
| 409 | - PropertyBuffer textureVertices = PropertyBuffer::New( textureVertexFormat ); | |
| 409 | + VertexBuffer textureVertices = VertexBuffer::New( textureVertexFormat ); | |
| 410 | 410 | textureVertices.SetData( textures, numberOfVertices ); |
| 411 | 411 | |
| 412 | 412 | // Indices | ... | ... |
examples/metaball-refrac/metaball-refrac-example.cpp
| ... | ... | @@ -374,13 +374,13 @@ Geometry MetaballRefracController::CreateGeometry( bool aspectMappedTexture ) |
| 374 | 374 | // Vertices |
| 375 | 375 | Property::Map positionVertexFormat; |
| 376 | 376 | positionVertexFormat["aPosition"] = Property::VECTOR2; |
| 377 | - PropertyBuffer positionVertices = PropertyBuffer::New( positionVertexFormat ); | |
| 377 | + VertexBuffer positionVertices = VertexBuffer::New( positionVertexFormat ); | |
| 378 | 378 | positionVertices.SetData( vertices, numberOfVertices ); |
| 379 | 379 | |
| 380 | 380 | // Textures |
| 381 | 381 | Property::Map textureVertexFormat; |
| 382 | 382 | textureVertexFormat["aTexture"] = Property::VECTOR2; |
| 383 | - PropertyBuffer textureVertices = PropertyBuffer::New( textureVertexFormat ); | |
| 383 | + VertexBuffer textureVertices = VertexBuffer::New( textureVertexFormat ); | |
| 384 | 384 | textureVertices.SetData( textures, numberOfVertices ); |
| 385 | 385 | |
| 386 | 386 | // Indices | ... | ... |
examples/point-mesh/point-mesh-example.cpp
| ... | ... | @@ -98,7 +98,7 @@ Geometry CreateGeometry() |
| 98 | 98 | Property::Map polyhedraVertexFormat; |
| 99 | 99 | polyhedraVertexFormat["aPosition"] = Property::VECTOR2; |
| 100 | 100 | polyhedraVertexFormat["aHue"] = Property::FLOAT; |
| 101 | - PropertyBuffer polyhedraVertices = PropertyBuffer::New( polyhedraVertexFormat ); | |
| 101 | + VertexBuffer polyhedraVertices = VertexBuffer::New( polyhedraVertexFormat ); | |
| 102 | 102 | polyhedraVertices.SetData( polyhedraVertexData, numSides ); |
| 103 | 103 | |
| 104 | 104 | // Create the geometry object | ... | ... |
examples/ray-marching/ray-marching-example.cpp
| ... | ... | @@ -168,7 +168,7 @@ public: |
| 168 | 168 | |
| 169 | 169 | Property::Map vertexFormat; |
| 170 | 170 | vertexFormat["aPosition"] = Property::VECTOR2; |
| 171 | - PropertyBuffer vertexBuffer = PropertyBuffer::New( vertexFormat ); | |
| 171 | + VertexBuffer vertexBuffer = VertexBuffer::New( vertexFormat ); | |
| 172 | 172 | |
| 173 | 173 | const float P( 0.5f ); |
| 174 | 174 | const Vector2 vertices[] = { | ... | ... |
examples/reflection-demo/reflection-example.cpp
| ... | ... | @@ -256,7 +256,7 @@ ModelPtr CreateModel( |
| 256 | 256 | /** |
| 257 | 257 | * Create matching property buffer |
| 258 | 258 | */ |
| 259 | - auto vertexBuffer = PropertyBuffer::New( Property::Map() | |
| 259 | + auto vertexBuffer = VertexBuffer::New( Property::Map() | |
| 260 | 260 | .Add("aPosition", Property::VECTOR3 ) |
| 261 | 261 | .Add("aNormal", Property::VECTOR3) |
| 262 | 262 | .Add("aTexCoord", Property::VECTOR2) | ... | ... |
examples/refraction-effect/refraction-effect-example.cpp
| ... | ... | @@ -458,7 +458,7 @@ private: |
| 458 | 458 | vertexFormat["aPosition"] = Property::VECTOR3; |
| 459 | 459 | vertexFormat["aNormal"] = Property::VECTOR3; |
| 460 | 460 | vertexFormat["aTexCoord"] = Property::VECTOR2; |
| 461 | - PropertyBuffer surfaceVertices = PropertyBuffer::New( vertexFormat ); | |
| 461 | + VertexBuffer surfaceVertices = VertexBuffer::New( vertexFormat ); | |
| 462 | 462 | surfaceVertices.SetData( &vertices[0], vertices.size() ); |
| 463 | 463 | |
| 464 | 464 | Geometry surface = Geometry::New(); | ... | ... |
examples/renderer-stencil/renderer-stencil-example.cpp
| ... | ... | @@ -460,7 +460,7 @@ private: |
| 460 | 460 | vertexFormat[NORMAL] = Property::VECTOR3; |
| 461 | 461 | vertexFormat[TEXTURE] = Property::VECTOR2; |
| 462 | 462 | |
| 463 | - PropertyBuffer surfaceVertices = PropertyBuffer::New( vertexFormat ); | |
| 463 | + VertexBuffer surfaceVertices = VertexBuffer::New( vertexFormat ); | |
| 464 | 464 | surfaceVertices.SetData( &vertices[0u], vertices.Size() ); |
| 465 | 465 | |
| 466 | 466 | Geometry geometry = Geometry::New(); | ... | ... |
examples/rendering-basic-light/rendering-basic-light-example.cpp
| ... | ... | @@ -308,7 +308,7 @@ public: |
| 308 | 308 | property.Insert( "aPosition", Property::VECTOR3 ); |
| 309 | 309 | property.Insert( "aNormal", Property::VECTOR3 ); |
| 310 | 310 | |
| 311 | - PropertyBuffer vertexBuffer = PropertyBuffer::New( property ); | |
| 311 | + VertexBuffer vertexBuffer = VertexBuffer::New( property ); | |
| 312 | 312 | |
| 313 | 313 | vertexBuffer.SetData( vertices, sizeof(vertices) / sizeof(Vertex) ); |
| 314 | 314 | ... | ... |
examples/rendering-basic-pbr/model-skybox.cpp
| ... | ... | @@ -183,8 +183,8 @@ Geometry ModelSkybox::CreateGeometry() |
| 183 | 183 | { Vector3( 1.0f, -1.0f, 1.0f ) } |
| 184 | 184 | }; |
| 185 | 185 | |
| 186 | - PropertyBuffer vertexBuffer = PropertyBuffer::New( Property::Map() | |
| 187 | - .Add( "aPosition", Property::VECTOR3 ) ); | |
| 186 | + VertexBuffer vertexBuffer = VertexBuffer::New( Property::Map() | |
| 187 | + .Add( "aPosition", Property::VECTOR3 ) ); | |
| 188 | 188 | vertexBuffer.SetData( skyboxVertices, sizeof(skyboxVertices) / sizeof(Vertex) ); |
| 189 | 189 | |
| 190 | 190 | geometry = Geometry::New(); | ... | ... |
examples/rendering-basic-pbr/obj-loader.cpp
| ... | ... | @@ -617,12 +617,12 @@ Geometry ObjLoader::CreateGeometry( int objectProperties, bool useSoftNormals ) |
| 617 | 617 | |
| 618 | 618 | Property::Map positionMap; |
| 619 | 619 | positionMap["aPosition"] = Property::VECTOR3; |
| 620 | - PropertyBuffer positionBuffer = PropertyBuffer::New( positionMap ); | |
| 620 | + VertexBuffer positionBuffer = VertexBuffer::New( positionMap ); | |
| 621 | 621 | positionBuffer.SetData( positions.Begin(), positions.Count() ); |
| 622 | 622 | |
| 623 | 623 | Property::Map normalMap; |
| 624 | 624 | normalMap["aNormal"] = Property::VECTOR3; |
| 625 | - PropertyBuffer normalBuffer = PropertyBuffer::New( normalMap ); | |
| 625 | + VertexBuffer normalBuffer = VertexBuffer::New( normalMap ); | |
| 626 | 626 | normalBuffer.SetData( normals.Begin(), normals.Count() ); |
| 627 | 627 | |
| 628 | 628 | surface.AddVertexBuffer( positionBuffer ); |
| ... | ... | @@ -633,7 +633,7 @@ Geometry ObjLoader::CreateGeometry( int objectProperties, bool useSoftNormals ) |
| 633 | 633 | { |
| 634 | 634 | Property::Map tangentMap; |
| 635 | 635 | tangentMap["aTangent"] = Property::VECTOR3; |
| 636 | - PropertyBuffer tangentBuffer = PropertyBuffer::New( tangentMap ); | |
| 636 | + VertexBuffer tangentBuffer = VertexBuffer::New( tangentMap ); | |
| 637 | 637 | tangentBuffer.SetData( tangents.Begin(), tangents.Count() ); |
| 638 | 638 | |
| 639 | 639 | surface.AddVertexBuffer( tangentBuffer ); |
| ... | ... | @@ -644,7 +644,7 @@ Geometry ObjLoader::CreateGeometry( int objectProperties, bool useSoftNormals ) |
| 644 | 644 | { |
| 645 | 645 | Property::Map textCoordMap; |
| 646 | 646 | textCoordMap["aTexCoord"] = Property::VECTOR2; |
| 647 | - PropertyBuffer texCoordBuffer = PropertyBuffer::New( textCoordMap ); | |
| 647 | + VertexBuffer texCoordBuffer = VertexBuffer::New( textCoordMap ); | |
| 648 | 648 | texCoordBuffer.SetData( textures.Begin(), textures.Count() ); |
| 649 | 649 | |
| 650 | 650 | surface.AddVertexBuffer( texCoordBuffer ); | ... | ... |
examples/rendering-cube/rendering-cube.cpp
| ... | ... | @@ -187,7 +187,7 @@ public: |
| 187 | 187 | { Vector3( -1.0f, 1.0f, 1.0f ), COLOR2 }, |
| 188 | 188 | }; |
| 189 | 189 | |
| 190 | - PropertyBuffer vertexBuffer = PropertyBuffer::New( Property::Map() | |
| 190 | + VertexBuffer vertexBuffer = VertexBuffer::New( Property::Map() | |
| 191 | 191 | .Add( "aPosition", Property::VECTOR3 ) |
| 192 | 192 | .Add( "aColor", Property::VECTOR3 ) ); |
| 193 | 193 | vertexBuffer.SetData( vertices, sizeof(vertices) / sizeof(Vertex) ); | ... | ... |
examples/rendering-line/rendering-line.cpp
| ... | ... | @@ -133,8 +133,8 @@ public: |
| 133 | 133 | Vector2( 1.0f, 1.0f ) |
| 134 | 134 | }; |
| 135 | 135 | |
| 136 | - PropertyBuffer vertexBuffer = PropertyBuffer::New( Property::Map() | |
| 137 | - .Add( "aPosition", Property::VECTOR2 ) ); | |
| 136 | + VertexBuffer vertexBuffer = VertexBuffer::New( Property::Map() | |
| 137 | + .Add( "aPosition", Property::VECTOR2 ) ); | |
| 138 | 138 | vertexBuffer.SetData( vertices, sizeof(vertices) / sizeof(Vector2) ); |
| 139 | 139 | |
| 140 | 140 | mGeometry = Geometry::New(); | ... | ... |
examples/rendering-radial-progress/radial-progress.cpp
| ... | ... | @@ -188,7 +188,7 @@ public: |
| 188 | 188 | vertexFormat[ "aPosition" ] = Property::VECTOR3; |
| 189 | 189 | |
| 190 | 190 | // describe vertex format ( only 2-dimensional positions ) |
| 191 | - PropertyBuffer vertexBuffer = PropertyBuffer::New( vertexFormat ); | |
| 191 | + VertexBuffer vertexBuffer = VertexBuffer::New( vertexFormat ); | |
| 192 | 192 | vertexBuffer.SetData( vertices.data(), vertices.size() ); |
| 193 | 193 | |
| 194 | 194 | // create geometry |
| ... | ... | @@ -238,7 +238,7 @@ public: |
| 238 | 238 | |
| 239 | 239 | Property::Map vertexFormat; |
| 240 | 240 | vertexFormat["aPosition"] = Property::VECTOR2; |
| 241 | - PropertyBuffer vertexBuffer = PropertyBuffer::New( vertexFormat ); | |
| 241 | + VertexBuffer vertexBuffer = VertexBuffer::New( vertexFormat ); | |
| 242 | 242 | |
| 243 | 243 | const float P( 0.5f ); |
| 244 | 244 | const Vector2 vertices[] = { | ... | ... |
examples/rendering-skybox/rendering-skybox.cpp
| ... | ... | @@ -272,9 +272,9 @@ public: |
| 272 | 272 | { Vector3( -1.0f, 1.0f, 1.0f ), Vector2( 0.0, 0.0 ) }, |
| 273 | 273 | }; |
| 274 | 274 | |
| 275 | - PropertyBuffer vertexBuffer = PropertyBuffer::New( Property::Map() | |
| 276 | - .Add( "aPosition", Property::VECTOR3 ) | |
| 277 | - .Add( "aTexCoord", Property::VECTOR2 ) ); | |
| 275 | + VertexBuffer vertexBuffer = VertexBuffer::New( Property::Map() | |
| 276 | + .Add( "aPosition", Property::VECTOR3 ) | |
| 277 | + .Add( "aTexCoord", Property::VECTOR2 ) ); | |
| 278 | 278 | vertexBuffer.SetData( vertices, sizeof(vertices) / sizeof(Vertex) ); |
| 279 | 279 | |
| 280 | 280 | // create indices |
| ... | ... | @@ -362,8 +362,8 @@ public: |
| 362 | 362 | { Vector3( 1.0f, -1.0f, 1.0f ) } |
| 363 | 363 | }; |
| 364 | 364 | |
| 365 | - PropertyBuffer vertexBuffer = PropertyBuffer::New( Property::Map() | |
| 366 | - .Add( "aPosition", Property::VECTOR3 ) ); | |
| 365 | + VertexBuffer vertexBuffer = VertexBuffer::New( Property::Map() | |
| 366 | + .Add( "aPosition", Property::VECTOR3 ) ); | |
| 367 | 367 | vertexBuffer.SetData( skyboxVertices, sizeof(skyboxVertices) / sizeof(Vertex) ); |
| 368 | 368 | |
| 369 | 369 | mSkyboxGeometry = Geometry::New(); | ... | ... |
examples/rendering-textured-cube/rendering-textured-cube.cpp
| ... | ... | @@ -187,9 +187,9 @@ public: |
| 187 | 187 | { Vector3( -1.0f, 1.0f, 1.0f ), Vector2( 0.0, 0.0 ) }, |
| 188 | 188 | }; |
| 189 | 189 | |
| 190 | - PropertyBuffer vertexBuffer = PropertyBuffer::New( Property::Map() | |
| 191 | - .Add( "aPosition", Property::VECTOR3 ) | |
| 192 | - .Add( "aTexCoord", Property::VECTOR2 ) ); | |
| 190 | + VertexBuffer vertexBuffer = VertexBuffer::New( Property::Map() | |
| 191 | + .Add( "aPosition", Property::VECTOR3 ) | |
| 192 | + .Add( "aTexCoord", Property::VECTOR2 ) ); | |
| 193 | 193 | vertexBuffer.SetData( vertices, sizeof(vertices) / sizeof(Vertex) ); |
| 194 | 194 | |
| 195 | 195 | // create indices | ... | ... |
examples/rendering-triangle/rendering-triangle.cpp
| ... | ... | @@ -134,8 +134,8 @@ public: |
| 134 | 134 | Vector2( -1.0f, 1.0f ) |
| 135 | 135 | }; |
| 136 | 136 | |
| 137 | - PropertyBuffer vertexBuffer = PropertyBuffer::New( Property::Map() | |
| 138 | - .Add( "aPosition", Property::VECTOR2 ) ); | |
| 137 | + VertexBuffer vertexBuffer = VertexBuffer::New( Property::Map() | |
| 138 | + .Add( "aPosition", Property::VECTOR2 ) ); | |
| 139 | 139 | vertexBuffer.SetData( vertices, sizeof(vertices) / sizeof(Vector2) ); |
| 140 | 140 | |
| 141 | 141 | mGeometry = Geometry::New(); | ... | ... |
examples/simple-text-renderer/simple-text-renderer-example.cpp
| ... | ... | @@ -95,7 +95,7 @@ Renderer CreateRenderer() |
| 95 | 95 | Property::Map property; |
| 96 | 96 | property.Add("aPosition", Property::VECTOR2).Add("aTexCoord", Property::VECTOR2); |
| 97 | 97 | |
| 98 | - PropertyBuffer vertexBuffer = PropertyBuffer::New(property); | |
| 98 | + VertexBuffer vertexBuffer = VertexBuffer::New(property); | |
| 99 | 99 | |
| 100 | 100 | vertexBuffer.SetData(vertices, sizeof(vertices) / sizeof(Vertex)); |
| 101 | 101 | ... | ... |
examples/sparkle/sparkle-effect-example.cpp
| ... | ... | @@ -153,11 +153,11 @@ private: |
| 153 | 153 | vertexFormat["aParticlePath4"] = Property::VECTOR2; |
| 154 | 154 | vertexFormat["aParticlePath5"] = Property::VECTOR2; |
| 155 | 155 | |
| 156 | - PropertyBuffer propertyBuffer = PropertyBuffer::New( vertexFormat ); | |
| 157 | - propertyBuffer.SetData( &vertices[0], vertices.size() ); | |
| 156 | + VertexBuffer vertexBuffer = VertexBuffer::New( vertexFormat ); | |
| 157 | + vertexBuffer.SetData( &vertices[0], vertices.size() ); | |
| 158 | 158 | |
| 159 | 159 | Geometry geometry = Geometry::New(); |
| 160 | - geometry.AddVertexBuffer( propertyBuffer ); | |
| 160 | + geometry.AddVertexBuffer( vertexBuffer ); | |
| 161 | 161 | geometry.SetIndexBuffer( &faces[0], faces.size() ); |
| 162 | 162 | geometry.SetType( Geometry::TRIANGLES ); |
| 163 | 163 | |
| ... | ... | @@ -558,4 +558,3 @@ int DALI_EXPORT_API main( int argc, char **argv ) |
| 558 | 558 | application.MainLoop(); |
| 559 | 559 | return 0; |
| 560 | 560 | } |
| 561 | - | ... | ... |
shared/utility.h
| ... | ... | @@ -63,13 +63,13 @@ Dali::Geometry CreateTexturedQuad() |
| 63 | 63 | { Dali::Vector2( -0.5f, 0.5f ), Dali::Vector2( 0.0f, 1.0f ) }, |
| 64 | 64 | { Dali::Vector2( 0.5f, 0.5f ), Dali::Vector2( 1.0f, 1.0f ) }}; |
| 65 | 65 | |
| 66 | - Dali::PropertyBuffer vertexBuffer; | |
| 66 | + Dali::VertexBuffer vertexBuffer; | |
| 67 | 67 | Dali::Property::Map vertexFormat; |
| 68 | 68 | vertexFormat["aPosition"] = Dali::Property::VECTOR2; |
| 69 | 69 | vertexFormat["aTexCoord"] = Dali::Property::VECTOR2; |
| 70 | 70 | |
| 71 | 71 | //Create a vertex buffer for vertex positions and texture coordinates |
| 72 | - vertexBuffer = Dali::PropertyBuffer::New( vertexFormat ); | |
| 72 | + vertexBuffer = Dali::VertexBuffer::New( vertexFormat ); | |
| 73 | 73 | vertexBuffer.SetData( data, 4u ); |
| 74 | 74 | |
| 75 | 75 | //Create the geometry | ... | ... |