From 854befec5ae3367a3be14000c82c832746a5c967 Mon Sep 17 00:00:00 2001 From: David Steele Date: Tue, 25 Aug 2020 11:42:06 +0100 Subject: [PATCH] Updates following rename of PropertyBuffer Change-Id: I33cebb3f17db6a72385c7e63aaf32685ee8748b2 --- examples/animated-shapes/animated-shapes-example.cpp | 6 +++--- examples/bezier-curve/bezier-curve-example.cpp | 14 +++++++------- examples/contact-cards/clipped-image.cpp | 4 ++-- examples/deferred-shading/deferred-shading.cpp | 16 ++++++++-------- examples/fpp-game/game-model.cpp | 10 +++++----- examples/fpp-game/game-model.h | 6 +++--- examples/line-mesh/line-mesh-example.cpp | 2 +- examples/mesh-morph/mesh-morph-example.cpp | 6 +++--- .../metaball-explosion/metaball-explosion-example.cpp | 4 ++-- examples/metaball-refrac/metaball-refrac-example.cpp | 4 ++-- examples/point-mesh/point-mesh-example.cpp | 2 +- examples/ray-marching/ray-marching-example.cpp | 2 +- examples/reflection-demo/reflection-example.cpp | 2 +- examples/refraction-effect/refraction-effect-example.cpp | 2 +- examples/renderer-stencil/renderer-stencil-example.cpp | 2 +- .../rendering-basic-light-example.cpp | 2 +- examples/rendering-basic-pbr/model-skybox.cpp | 4 ++-- examples/rendering-basic-pbr/obj-loader.cpp | 8 ++++---- examples/rendering-cube/rendering-cube.cpp | 2 +- examples/rendering-line/rendering-line.cpp | 4 ++-- examples/rendering-radial-progress/radial-progress.cpp | 4 ++-- examples/rendering-skybox/rendering-skybox.cpp | 10 +++++----- .../rendering-textured-cube/rendering-textured-cube.cpp | 6 +++--- examples/rendering-triangle/rendering-triangle.cpp | 4 ++-- .../simple-text-renderer-example.cpp | 2 +- examples/sparkle/sparkle-effect-example.cpp | 7 +++---- shared/utility.h | 4 ++-- 27 files changed, 69 insertions(+), 70 deletions(-) diff --git a/examples/animated-shapes/animated-shapes-example.cpp b/examples/animated-shapes/animated-shapes-example.cpp index 59871ef..b139a75 100644 --- a/examples/animated-shapes/animated-shapes-example.cpp +++ b/examples/animated-shapes/animated-shapes-example.cpp @@ -195,7 +195,7 @@ public: //Create a vertex buffer for vertex positions and texture coordinates Dali::Property::Map vertexFormat; vertexFormat["aCoefficient"] = Dali::Property::VECTOR3; - Dali::PropertyBuffer vertexBuffer = Dali::PropertyBuffer::New( vertexFormat ); + Dali::VertexBuffer vertexBuffer = Dali::VertexBuffer::New( vertexFormat ); vertexBuffer.SetData( vertexData, sizeof(vertexData)/sizeof(vertexData[0])); //Create the geometry @@ -287,7 +287,7 @@ public: //Create a vertex buffer for vertex positions and texture coordinates Dali::Property::Map vertexFormat; vertexFormat["aCoefficient"] = Dali::Property::VECTOR3; - Dali::PropertyBuffer vertexBuffer = Dali::PropertyBuffer::New( vertexFormat ); + Dali::VertexBuffer vertexBuffer = Dali::VertexBuffer::New( vertexFormat ); vertexBuffer.SetData( vertexData, sizeof(vertexData)/sizeof(vertexData[0])); //Create the geometry @@ -388,7 +388,7 @@ public: //Create a vertex buffer for vertex positions and texture coordinates Dali::Property::Map vertexFormat; vertexFormat["aCoefficient"] = Dali::Property::VECTOR3; - Dali::PropertyBuffer vertexBuffer = Dali::PropertyBuffer::New( vertexFormat ); + Dali::VertexBuffer vertexBuffer = Dali::VertexBuffer::New( vertexFormat ); vertexBuffer.SetData( vertexData, sizeof(vertexData)/sizeof(vertexData[0])); //Create the geometry diff --git a/examples/bezier-curve/bezier-curve-example.cpp b/examples/bezier-curve/bezier-curve-example.cpp index 677152e..c12abd1 100644 --- a/examples/bezier-curve/bezier-curve-example.cpp +++ b/examples/bezier-curve/bezier-curve-example.cpp @@ -300,7 +300,7 @@ public: Property::Map curveVertexFormat; curveVertexFormat["aPosition"] = Property::VECTOR2; - mCurveVertices = PropertyBuffer::New( curveVertexFormat ); + mCurveVertices = VertexBuffer::New( curveVertexFormat ); Vector2 vertexData[2] = { Vector2(-0.5f, 0.5f), Vector2( 0.5f, -0.5f ) }; mCurveVertices.SetData( vertexData, 2 ); @@ -334,7 +334,7 @@ public: return actor; } - Actor CreateControlLine( PropertyBuffer vertexBuffer ) + Actor CreateControlLine( VertexBuffer vertexBuffer ) { Actor line = Actor::New(); line.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS ); @@ -364,8 +364,8 @@ public: Property::Map lineVertexFormat; lineVertexFormat["aPosition"] = Property::VECTOR2; - mLine1Vertices = PropertyBuffer::New( lineVertexFormat ); - mLine2Vertices = PropertyBuffer::New( lineVertexFormat ); + mLine1Vertices = VertexBuffer::New( lineVertexFormat ); + mLine2Vertices = VertexBuffer::New( lineVertexFormat ); mControlLine1 = CreateControlLine( mLine1Vertices ); mControlLine2 = CreateControlLine( mLine2Vertices ); @@ -595,9 +595,9 @@ private: Timer mTimer; Animation mDragAnimation; Animation mBezierAnimation; - PropertyBuffer mCurveVertices; - PropertyBuffer mLine1Vertices; - PropertyBuffer mLine2Vertices; + VertexBuffer mCurveVertices; + VertexBuffer mLine1Vertices; + VertexBuffer mLine2Vertices; Vector2 mRelativeDragPoint; Vector2 mLastControlPointPosition1; Vector2 mLastControlPointPosition2; diff --git a/examples/contact-cards/clipped-image.cpp b/examples/contact-cards/clipped-image.cpp index a4adbd3..fad71e0 100644 --- a/examples/contact-cards/clipped-image.cpp +++ b/examples/contact-cards/clipped-image.cpp @@ -131,7 +131,7 @@ Geometry& CreateGeometry() Property::Map circleVertexFormat; circleVertexFormat["aPositionCircle"] = Property::VECTOR2; - PropertyBuffer circleVertices = PropertyBuffer::New( circleVertexFormat ); + VertexBuffer circleVertices = VertexBuffer::New( circleVertexFormat ); circleVertices.SetData( circleBuffer, vertexCount ); // Create the Quad Geometry @@ -176,7 +176,7 @@ Geometry& CreateGeometry() Property::Map vertexFormat; vertexFormat["aPositionQuad"] = Property::VECTOR2; - PropertyBuffer quadVertices2 = PropertyBuffer::New( vertexFormat ); + VertexBuffer quadVertices2 = VertexBuffer::New( vertexFormat ); quadVertices2.SetData( quadBuffer, vertexCount ); // Create the geometry object itself diff --git a/examples/deferred-shading/deferred-shading.cpp b/examples/deferred-shading/deferred-shading.cpp index 8e8324a..a06f3f1 100644 --- a/examples/deferred-shading/deferred-shading.cpp +++ b/examples/deferred-shading/deferred-shading.cpp @@ -64,7 +64,7 @@ in vec3 aNormal; out vec4 vPosition; out vec3 vNormal; -vec4 Map(vec4 v) // projection space -> texture +vec4 Map(vec4 v) // projection space -> texture { return vec4(v.xyz / (2.f * v.w) + vec3(.5f), (v.w - NEAR) * INV_DEPTH); } @@ -149,7 +149,7 @@ uniform vec3 uDepth_InvDepth_Near;\n) // Light source uniforms struct Light { - vec3 position; // view space + vec3 position; // view space float radius; vec3 color; }; @@ -160,7 +160,7 @@ in vec2 vUv; out vec4 oColor; -vec4 Unmap(vec4 m) // texture -> projection +vec4 Unmap(vec4 m) // texture -> projection { m.w = m.w * DEPTH + NEAR; m.xyz = (m.xyz - vec3(.5)) * (2.f * m.w); @@ -180,10 +180,10 @@ vec3 CalculateLighting(vec3 pos, vec3 normal) rel /= distance; float a = uLights[i].radius / (kAttenuationConst + kAttenuationLinear * distance + - kAttenuationQuadratic * distance * distance); // attenuation + kAttenuationQuadratic * distance * distance); // attenuation - float l = max(0.f, dot(normal, rel)); // lambertian - float s = pow(max(0.f, dot(viewDirRefl, rel)), 256.f); // specular + float l = max(0.f, dot(normal, rel)); // lambertian + float s = pow(max(0.f, dot(viewDirRefl, rel)), 256.f); // specular light += (uLights[i].color * (l + s)) * a; } @@ -324,7 +324,7 @@ Geometry CreateTexturedQuadGeometry(bool flipV) std::swap(vertexData[1].aTexCoord, vertexData[3].aTexCoord); } - PropertyBuffer vertexBuffer = PropertyBuffer::New( Property::Map() + VertexBuffer vertexBuffer = VertexBuffer::New( Property::Map() .Add( "aPosition", Property::VECTOR3 ) .Add( "aTexCoord", Property::VECTOR2 ) ); vertexBuffer.SetData( vertexData, std::extent::value ); @@ -402,7 +402,7 @@ Geometry CreateOctahedron(bool invertNormals) } // Configure property buffers and create geometry. - PropertyBuffer vertexBuffer = PropertyBuffer::New(Property::Map() + VertexBuffer vertexBuffer = VertexBuffer::New(Property::Map() .Add("aPosition", Property::VECTOR3) .Add("aNormal", Property::VECTOR3)); vertexBuffer.SetData(vertexData, std::extent::value); diff --git a/examples/fpp-game/game-model.cpp b/examples/fpp-game/game-model.cpp index 3e6a585..24bfb1c 100644 --- a/examples/fpp-game/game-model.cpp +++ b/examples/fpp-game/game-model.cpp @@ -45,11 +45,11 @@ GameModel::GameModel( const char *filename ) mHeader = *(reinterpret_cast( bytes.data() + bytes.size()/2 )); } - mVertexBuffer = Dali::PropertyBuffer::New( Dali::Property::Map(). - Add( "aPosition", Dali::Property::VECTOR3 ). - Add( "aNormal", Dali::Property::VECTOR3 ). - Add( "aTexCoord", Dali::Property::VECTOR2 ) - ); + mVertexBuffer = Dali::VertexBuffer::New( Dali::Property::Map(). + Add( "aPosition", Dali::Property::VECTOR3 ). + Add( "aNormal", Dali::Property::VECTOR3 ). + Add( "aTexCoord", Dali::Property::VECTOR2 ) + ); mVertexBuffer.SetData( bytes.data() + mHeader.dataBeginOffset, mHeader.vertexBufferSize/mHeader.vertexStride ); diff --git a/examples/fpp-game/game-model.h b/examples/fpp-game/game-model.h index 0c38e0a..af72750 100644 --- a/examples/fpp-game/game-model.h +++ b/examples/fpp-game/game-model.h @@ -19,7 +19,7 @@ */ #include -#include +#include #include @@ -44,7 +44,7 @@ struct ModelHeader /** * @brief The GameModel class * GameModel represents model geometry. It loads model data from external model file ( .mod file ). - * Such data is ready to be used as GL buffer so it can be copied directly into the PropertyBuffer + * Such data is ready to be used as GL buffer so it can be copied directly into the VertexBuffer * object. * * Model file is multi-architecture so can be loaded on little and big endian architectures @@ -85,7 +85,7 @@ public: private: Dali::Geometry mGeometry; - Dali::PropertyBuffer mVertexBuffer; + Dali::VertexBuffer mVertexBuffer; ModelHeader mHeader; diff --git a/examples/line-mesh/line-mesh-example.cpp b/examples/line-mesh/line-mesh-example.cpp index ff3aace..a088797 100644 --- a/examples/line-mesh/line-mesh-example.cpp +++ b/examples/line-mesh/line-mesh-example.cpp @@ -95,7 +95,7 @@ Geometry CreateGeometry() pentagonVertexFormat["aPosition1"] = Property::VECTOR2; pentagonVertexFormat["aPosition2"] = Property::VECTOR2; pentagonVertexFormat["aColor"] = Property::VECTOR3; - PropertyBuffer pentagonVertices = PropertyBuffer::New( pentagonVertexFormat ); + VertexBuffer pentagonVertices = VertexBuffer::New( pentagonVertexFormat ); pentagonVertices.SetData(pentagonVertexData, 5); diff --git a/examples/mesh-morph/mesh-morph-example.cpp b/examples/mesh-morph/mesh-morph-example.cpp index af8662c..35bbc39 100644 --- a/examples/mesh-morph/mesh-morph-example.cpp +++ b/examples/mesh-morph/mesh-morph-example.cpp @@ -218,17 +218,17 @@ Geometry CreateGeometry() Property::Map initialPositionVertexFormat; initialPositionVertexFormat["aInitPos"] = Property::VECTOR2; - PropertyBuffer initialPositionVertices = PropertyBuffer::New( initialPositionVertexFormat ); + VertexBuffer initialPositionVertices = VertexBuffer::New( initialPositionVertexFormat ); initialPositionVertices.SetData( quad, numberOfVertices ); Property::Map finalPositionVertexFormat; finalPositionVertexFormat["aFinalPos"] = Property::VECTOR2; - PropertyBuffer finalPositionVertices = PropertyBuffer::New( finalPositionVertexFormat ); + VertexBuffer finalPositionVertices = VertexBuffer::New( finalPositionVertexFormat ); finalPositionVertices.SetData( cat, numberOfVertices ); Property::Map colorVertexFormat; colorVertexFormat["aColor"] = Property::VECTOR3; - PropertyBuffer colorVertices = PropertyBuffer::New( colorVertexFormat ); + VertexBuffer colorVertices = VertexBuffer::New( colorVertexFormat ); colorVertices.SetData( colors, numberOfVertices ); // Create the geometry object diff --git a/examples/metaball-explosion/metaball-explosion-example.cpp b/examples/metaball-explosion/metaball-explosion-example.cpp index 0eae70b..4547dad 100644 --- a/examples/metaball-explosion/metaball-explosion-example.cpp +++ b/examples/metaball-explosion/metaball-explosion-example.cpp @@ -400,13 +400,13 @@ Geometry MetaballExplosionController::CreateGeometry( bool aspectMappedTexture ) // Vertices Property::Map positionVertexFormat; positionVertexFormat["aPosition"] = Property::VECTOR2; - PropertyBuffer positionVertices = PropertyBuffer::New( positionVertexFormat ); + VertexBuffer positionVertices = VertexBuffer::New( positionVertexFormat ); positionVertices.SetData( vertices, numberOfVertices ); // Textures Property::Map textureVertexFormat; textureVertexFormat["aTexture"] = Property::VECTOR2; - PropertyBuffer textureVertices = PropertyBuffer::New( textureVertexFormat ); + VertexBuffer textureVertices = VertexBuffer::New( textureVertexFormat ); textureVertices.SetData( textures, numberOfVertices ); // Indices diff --git a/examples/metaball-refrac/metaball-refrac-example.cpp b/examples/metaball-refrac/metaball-refrac-example.cpp index e66ecde..43cd963 100644 --- a/examples/metaball-refrac/metaball-refrac-example.cpp +++ b/examples/metaball-refrac/metaball-refrac-example.cpp @@ -374,13 +374,13 @@ Geometry MetaballRefracController::CreateGeometry( bool aspectMappedTexture ) // Vertices Property::Map positionVertexFormat; positionVertexFormat["aPosition"] = Property::VECTOR2; - PropertyBuffer positionVertices = PropertyBuffer::New( positionVertexFormat ); + VertexBuffer positionVertices = VertexBuffer::New( positionVertexFormat ); positionVertices.SetData( vertices, numberOfVertices ); // Textures Property::Map textureVertexFormat; textureVertexFormat["aTexture"] = Property::VECTOR2; - PropertyBuffer textureVertices = PropertyBuffer::New( textureVertexFormat ); + VertexBuffer textureVertices = VertexBuffer::New( textureVertexFormat ); textureVertices.SetData( textures, numberOfVertices ); // Indices diff --git a/examples/point-mesh/point-mesh-example.cpp b/examples/point-mesh/point-mesh-example.cpp index 312a07b..e18971a 100644 --- a/examples/point-mesh/point-mesh-example.cpp +++ b/examples/point-mesh/point-mesh-example.cpp @@ -98,7 +98,7 @@ Geometry CreateGeometry() Property::Map polyhedraVertexFormat; polyhedraVertexFormat["aPosition"] = Property::VECTOR2; polyhedraVertexFormat["aHue"] = Property::FLOAT; - PropertyBuffer polyhedraVertices = PropertyBuffer::New( polyhedraVertexFormat ); + VertexBuffer polyhedraVertices = VertexBuffer::New( polyhedraVertexFormat ); polyhedraVertices.SetData( polyhedraVertexData, numSides ); // Create the geometry object diff --git a/examples/ray-marching/ray-marching-example.cpp b/examples/ray-marching/ray-marching-example.cpp index 0660bec..551d824 100644 --- a/examples/ray-marching/ray-marching-example.cpp +++ b/examples/ray-marching/ray-marching-example.cpp @@ -168,7 +168,7 @@ public: Property::Map vertexFormat; vertexFormat["aPosition"] = Property::VECTOR2; - PropertyBuffer vertexBuffer = PropertyBuffer::New( vertexFormat ); + VertexBuffer vertexBuffer = VertexBuffer::New( vertexFormat ); const float P( 0.5f ); const Vector2 vertices[] = { diff --git a/examples/reflection-demo/reflection-example.cpp b/examples/reflection-demo/reflection-example.cpp index 4f04401..bb93f27 100644 --- a/examples/reflection-demo/reflection-example.cpp +++ b/examples/reflection-demo/reflection-example.cpp @@ -256,7 +256,7 @@ ModelPtr CreateModel( /** * Create matching property buffer */ - auto vertexBuffer = PropertyBuffer::New( Property::Map() + auto vertexBuffer = VertexBuffer::New( Property::Map() .Add("aPosition", Property::VECTOR3 ) .Add("aNormal", Property::VECTOR3) .Add("aTexCoord", Property::VECTOR2) diff --git a/examples/refraction-effect/refraction-effect-example.cpp b/examples/refraction-effect/refraction-effect-example.cpp index 804e784..42db09d 100644 --- a/examples/refraction-effect/refraction-effect-example.cpp +++ b/examples/refraction-effect/refraction-effect-example.cpp @@ -458,7 +458,7 @@ private: vertexFormat["aPosition"] = Property::VECTOR3; vertexFormat["aNormal"] = Property::VECTOR3; vertexFormat["aTexCoord"] = Property::VECTOR2; - PropertyBuffer surfaceVertices = PropertyBuffer::New( vertexFormat ); + VertexBuffer surfaceVertices = VertexBuffer::New( vertexFormat ); surfaceVertices.SetData( &vertices[0], vertices.size() ); Geometry surface = Geometry::New(); diff --git a/examples/renderer-stencil/renderer-stencil-example.cpp b/examples/renderer-stencil/renderer-stencil-example.cpp index e9004db..d159f61 100644 --- a/examples/renderer-stencil/renderer-stencil-example.cpp +++ b/examples/renderer-stencil/renderer-stencil-example.cpp @@ -460,7 +460,7 @@ private: vertexFormat[NORMAL] = Property::VECTOR3; vertexFormat[TEXTURE] = Property::VECTOR2; - PropertyBuffer surfaceVertices = PropertyBuffer::New( vertexFormat ); + VertexBuffer surfaceVertices = VertexBuffer::New( vertexFormat ); surfaceVertices.SetData( &vertices[0u], vertices.Size() ); Geometry geometry = Geometry::New(); diff --git a/examples/rendering-basic-light/rendering-basic-light-example.cpp b/examples/rendering-basic-light/rendering-basic-light-example.cpp index 7d89a77..9886838 100644 --- a/examples/rendering-basic-light/rendering-basic-light-example.cpp +++ b/examples/rendering-basic-light/rendering-basic-light-example.cpp @@ -308,7 +308,7 @@ public: property.Insert( "aPosition", Property::VECTOR3 ); property.Insert( "aNormal", Property::VECTOR3 ); - PropertyBuffer vertexBuffer = PropertyBuffer::New( property ); + VertexBuffer vertexBuffer = VertexBuffer::New( property ); vertexBuffer.SetData( vertices, sizeof(vertices) / sizeof(Vertex) ); diff --git a/examples/rendering-basic-pbr/model-skybox.cpp b/examples/rendering-basic-pbr/model-skybox.cpp index a6bf5e3..d3296d2 100644 --- a/examples/rendering-basic-pbr/model-skybox.cpp +++ b/examples/rendering-basic-pbr/model-skybox.cpp @@ -183,8 +183,8 @@ Geometry ModelSkybox::CreateGeometry() { Vector3( 1.0f, -1.0f, 1.0f ) } }; - PropertyBuffer vertexBuffer = PropertyBuffer::New( Property::Map() - .Add( "aPosition", Property::VECTOR3 ) ); + VertexBuffer vertexBuffer = VertexBuffer::New( Property::Map() + .Add( "aPosition", Property::VECTOR3 ) ); vertexBuffer.SetData( skyboxVertices, sizeof(skyboxVertices) / sizeof(Vertex) ); geometry = Geometry::New(); diff --git a/examples/rendering-basic-pbr/obj-loader.cpp b/examples/rendering-basic-pbr/obj-loader.cpp index bb21c9c..82ffa6a 100644 --- a/examples/rendering-basic-pbr/obj-loader.cpp +++ b/examples/rendering-basic-pbr/obj-loader.cpp @@ -617,12 +617,12 @@ Geometry ObjLoader::CreateGeometry( int objectProperties, bool useSoftNormals ) Property::Map positionMap; positionMap["aPosition"] = Property::VECTOR3; - PropertyBuffer positionBuffer = PropertyBuffer::New( positionMap ); + VertexBuffer positionBuffer = VertexBuffer::New( positionMap ); positionBuffer.SetData( positions.Begin(), positions.Count() ); Property::Map normalMap; normalMap["aNormal"] = Property::VECTOR3; - PropertyBuffer normalBuffer = PropertyBuffer::New( normalMap ); + VertexBuffer normalBuffer = VertexBuffer::New( normalMap ); normalBuffer.SetData( normals.Begin(), normals.Count() ); surface.AddVertexBuffer( positionBuffer ); @@ -633,7 +633,7 @@ Geometry ObjLoader::CreateGeometry( int objectProperties, bool useSoftNormals ) { Property::Map tangentMap; tangentMap["aTangent"] = Property::VECTOR3; - PropertyBuffer tangentBuffer = PropertyBuffer::New( tangentMap ); + VertexBuffer tangentBuffer = VertexBuffer::New( tangentMap ); tangentBuffer.SetData( tangents.Begin(), tangents.Count() ); surface.AddVertexBuffer( tangentBuffer ); @@ -644,7 +644,7 @@ Geometry ObjLoader::CreateGeometry( int objectProperties, bool useSoftNormals ) { Property::Map textCoordMap; textCoordMap["aTexCoord"] = Property::VECTOR2; - PropertyBuffer texCoordBuffer = PropertyBuffer::New( textCoordMap ); + VertexBuffer texCoordBuffer = VertexBuffer::New( textCoordMap ); texCoordBuffer.SetData( textures.Begin(), textures.Count() ); surface.AddVertexBuffer( texCoordBuffer ); diff --git a/examples/rendering-cube/rendering-cube.cpp b/examples/rendering-cube/rendering-cube.cpp index 9b4260f..3153d04 100644 --- a/examples/rendering-cube/rendering-cube.cpp +++ b/examples/rendering-cube/rendering-cube.cpp @@ -187,7 +187,7 @@ public: { Vector3( -1.0f, 1.0f, 1.0f ), COLOR2 }, }; - PropertyBuffer vertexBuffer = PropertyBuffer::New( Property::Map() + VertexBuffer vertexBuffer = VertexBuffer::New( Property::Map() .Add( "aPosition", Property::VECTOR3 ) .Add( "aColor", Property::VECTOR3 ) ); vertexBuffer.SetData( vertices, sizeof(vertices) / sizeof(Vertex) ); diff --git a/examples/rendering-line/rendering-line.cpp b/examples/rendering-line/rendering-line.cpp index 1f421ad..d50a4f0 100644 --- a/examples/rendering-line/rendering-line.cpp +++ b/examples/rendering-line/rendering-line.cpp @@ -133,8 +133,8 @@ public: Vector2( 1.0f, 1.0f ) }; - PropertyBuffer vertexBuffer = PropertyBuffer::New( Property::Map() - .Add( "aPosition", Property::VECTOR2 ) ); + VertexBuffer vertexBuffer = VertexBuffer::New( Property::Map() + .Add( "aPosition", Property::VECTOR2 ) ); vertexBuffer.SetData( vertices, sizeof(vertices) / sizeof(Vector2) ); mGeometry = Geometry::New(); diff --git a/examples/rendering-radial-progress/radial-progress.cpp b/examples/rendering-radial-progress/radial-progress.cpp index e3133ca..046fc71 100644 --- a/examples/rendering-radial-progress/radial-progress.cpp +++ b/examples/rendering-radial-progress/radial-progress.cpp @@ -188,7 +188,7 @@ public: vertexFormat[ "aPosition" ] = Property::VECTOR3; // describe vertex format ( only 2-dimensional positions ) - PropertyBuffer vertexBuffer = PropertyBuffer::New( vertexFormat ); + VertexBuffer vertexBuffer = VertexBuffer::New( vertexFormat ); vertexBuffer.SetData( vertices.data(), vertices.size() ); // create geometry @@ -238,7 +238,7 @@ public: Property::Map vertexFormat; vertexFormat["aPosition"] = Property::VECTOR2; - PropertyBuffer vertexBuffer = PropertyBuffer::New( vertexFormat ); + VertexBuffer vertexBuffer = VertexBuffer::New( vertexFormat ); const float P( 0.5f ); const Vector2 vertices[] = { diff --git a/examples/rendering-skybox/rendering-skybox.cpp b/examples/rendering-skybox/rendering-skybox.cpp index db94cfe..45f5617 100644 --- a/examples/rendering-skybox/rendering-skybox.cpp +++ b/examples/rendering-skybox/rendering-skybox.cpp @@ -272,9 +272,9 @@ public: { Vector3( -1.0f, 1.0f, 1.0f ), Vector2( 0.0, 0.0 ) }, }; - PropertyBuffer vertexBuffer = PropertyBuffer::New( Property::Map() - .Add( "aPosition", Property::VECTOR3 ) - .Add( "aTexCoord", Property::VECTOR2 ) ); + VertexBuffer vertexBuffer = VertexBuffer::New( Property::Map() + .Add( "aPosition", Property::VECTOR3 ) + .Add( "aTexCoord", Property::VECTOR2 ) ); vertexBuffer.SetData( vertices, sizeof(vertices) / sizeof(Vertex) ); // create indices @@ -362,8 +362,8 @@ public: { Vector3( 1.0f, -1.0f, 1.0f ) } }; - PropertyBuffer vertexBuffer = PropertyBuffer::New( Property::Map() - .Add( "aPosition", Property::VECTOR3 ) ); + VertexBuffer vertexBuffer = VertexBuffer::New( Property::Map() + .Add( "aPosition", Property::VECTOR3 ) ); vertexBuffer.SetData( skyboxVertices, sizeof(skyboxVertices) / sizeof(Vertex) ); mSkyboxGeometry = Geometry::New(); diff --git a/examples/rendering-textured-cube/rendering-textured-cube.cpp b/examples/rendering-textured-cube/rendering-textured-cube.cpp index be22567..3aa55da 100644 --- a/examples/rendering-textured-cube/rendering-textured-cube.cpp +++ b/examples/rendering-textured-cube/rendering-textured-cube.cpp @@ -187,9 +187,9 @@ public: { Vector3( -1.0f, 1.0f, 1.0f ), Vector2( 0.0, 0.0 ) }, }; - PropertyBuffer vertexBuffer = PropertyBuffer::New( Property::Map() - .Add( "aPosition", Property::VECTOR3 ) - .Add( "aTexCoord", Property::VECTOR2 ) ); + VertexBuffer vertexBuffer = VertexBuffer::New( Property::Map() + .Add( "aPosition", Property::VECTOR3 ) + .Add( "aTexCoord", Property::VECTOR2 ) ); vertexBuffer.SetData( vertices, sizeof(vertices) / sizeof(Vertex) ); // create indices diff --git a/examples/rendering-triangle/rendering-triangle.cpp b/examples/rendering-triangle/rendering-triangle.cpp index c69f323..f983c14 100644 --- a/examples/rendering-triangle/rendering-triangle.cpp +++ b/examples/rendering-triangle/rendering-triangle.cpp @@ -134,8 +134,8 @@ public: Vector2( -1.0f, 1.0f ) }; - PropertyBuffer vertexBuffer = PropertyBuffer::New( Property::Map() - .Add( "aPosition", Property::VECTOR2 ) ); + VertexBuffer vertexBuffer = VertexBuffer::New( Property::Map() + .Add( "aPosition", Property::VECTOR2 ) ); vertexBuffer.SetData( vertices, sizeof(vertices) / sizeof(Vector2) ); mGeometry = Geometry::New(); diff --git a/examples/simple-text-renderer/simple-text-renderer-example.cpp b/examples/simple-text-renderer/simple-text-renderer-example.cpp index 8135fd3..f6f99b8 100644 --- a/examples/simple-text-renderer/simple-text-renderer-example.cpp +++ b/examples/simple-text-renderer/simple-text-renderer-example.cpp @@ -95,7 +95,7 @@ Renderer CreateRenderer() Property::Map property; property.Add("aPosition", Property::VECTOR2).Add("aTexCoord", Property::VECTOR2); - PropertyBuffer vertexBuffer = PropertyBuffer::New(property); + VertexBuffer vertexBuffer = VertexBuffer::New(property); vertexBuffer.SetData(vertices, sizeof(vertices) / sizeof(Vertex)); diff --git a/examples/sparkle/sparkle-effect-example.cpp b/examples/sparkle/sparkle-effect-example.cpp index a1444fa..be899be 100644 --- a/examples/sparkle/sparkle-effect-example.cpp +++ b/examples/sparkle/sparkle-effect-example.cpp @@ -153,11 +153,11 @@ private: vertexFormat["aParticlePath4"] = Property::VECTOR2; vertexFormat["aParticlePath5"] = Property::VECTOR2; - PropertyBuffer propertyBuffer = PropertyBuffer::New( vertexFormat ); - propertyBuffer.SetData( &vertices[0], vertices.size() ); + VertexBuffer vertexBuffer = VertexBuffer::New( vertexFormat ); + vertexBuffer.SetData( &vertices[0], vertices.size() ); Geometry geometry = Geometry::New(); - geometry.AddVertexBuffer( propertyBuffer ); + geometry.AddVertexBuffer( vertexBuffer ); geometry.SetIndexBuffer( &faces[0], faces.size() ); geometry.SetType( Geometry::TRIANGLES ); @@ -558,4 +558,3 @@ int DALI_EXPORT_API main( int argc, char **argv ) application.MainLoop(); return 0; } - diff --git a/shared/utility.h b/shared/utility.h index 7c31dff..8295b23 100644 --- a/shared/utility.h +++ b/shared/utility.h @@ -63,13 +63,13 @@ Dali::Geometry CreateTexturedQuad() { Dali::Vector2( -0.5f, 0.5f ), Dali::Vector2( 0.0f, 1.0f ) }, { Dali::Vector2( 0.5f, 0.5f ), Dali::Vector2( 1.0f, 1.0f ) }}; - Dali::PropertyBuffer vertexBuffer; + Dali::VertexBuffer vertexBuffer; Dali::Property::Map vertexFormat; vertexFormat["aPosition"] = Dali::Property::VECTOR2; vertexFormat["aTexCoord"] = Dali::Property::VECTOR2; //Create a vertex buffer for vertex positions and texture coordinates - vertexBuffer = Dali::PropertyBuffer::New( vertexFormat ); + vertexBuffer = Dali::VertexBuffer::New( vertexFormat ); vertexBuffer.SetData( data, 4u ); //Create the geometry -- 2.7.4