From 708a5e016f973900a20a885914d3b70741fa80d9 Mon Sep 17 00:00:00 2001 From: Joogab Yun Date: Tue, 1 Sep 2020 18:03:51 +0900 Subject: [PATCH] Revert "Updates following rename of PropertyBuffer" This reverts commit 854befec5ae3367a3be14000c82c832746a5c967. --- 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, 70 insertions(+), 69 deletions(-) diff --git a/examples/animated-shapes/animated-shapes-example.cpp b/examples/animated-shapes/animated-shapes-example.cpp index 7e865ce..b7454ba 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::VertexBuffer vertexBuffer = Dali::VertexBuffer::New( vertexFormat ); + Dali::PropertyBuffer vertexBuffer = Dali::PropertyBuffer::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::VertexBuffer vertexBuffer = Dali::VertexBuffer::New( vertexFormat ); + Dali::PropertyBuffer vertexBuffer = Dali::PropertyBuffer::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::VertexBuffer vertexBuffer = Dali::VertexBuffer::New( vertexFormat ); + Dali::PropertyBuffer vertexBuffer = Dali::PropertyBuffer::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 c12abd1..677152e 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 = VertexBuffer::New( curveVertexFormat ); + mCurveVertices = PropertyBuffer::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( VertexBuffer vertexBuffer ) + Actor CreateControlLine( PropertyBuffer 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 = VertexBuffer::New( lineVertexFormat ); - mLine2Vertices = VertexBuffer::New( lineVertexFormat ); + mLine1Vertices = PropertyBuffer::New( lineVertexFormat ); + mLine2Vertices = PropertyBuffer::New( lineVertexFormat ); mControlLine1 = CreateControlLine( mLine1Vertices ); mControlLine2 = CreateControlLine( mLine2Vertices ); @@ -595,9 +595,9 @@ private: Timer mTimer; Animation mDragAnimation; Animation mBezierAnimation; - VertexBuffer mCurveVertices; - VertexBuffer mLine1Vertices; - VertexBuffer mLine2Vertices; + PropertyBuffer mCurveVertices; + PropertyBuffer mLine1Vertices; + PropertyBuffer mLine2Vertices; Vector2 mRelativeDragPoint; Vector2 mLastControlPointPosition1; Vector2 mLastControlPointPosition2; diff --git a/examples/contact-cards/clipped-image.cpp b/examples/contact-cards/clipped-image.cpp index fad71e0..a4adbd3 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; - VertexBuffer circleVertices = VertexBuffer::New( circleVertexFormat ); + PropertyBuffer circleVertices = PropertyBuffer::New( circleVertexFormat ); circleVertices.SetData( circleBuffer, vertexCount ); // Create the Quad Geometry @@ -176,7 +176,7 @@ Geometry& CreateGeometry() Property::Map vertexFormat; vertexFormat["aPositionQuad"] = Property::VECTOR2; - VertexBuffer quadVertices2 = VertexBuffer::New( vertexFormat ); + PropertyBuffer quadVertices2 = PropertyBuffer::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 a06f3f1..8e8324a 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); } - VertexBuffer vertexBuffer = VertexBuffer::New( Property::Map() + PropertyBuffer vertexBuffer = PropertyBuffer::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. - VertexBuffer vertexBuffer = VertexBuffer::New(Property::Map() + PropertyBuffer vertexBuffer = PropertyBuffer::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 24bfb1c..3e6a585 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::VertexBuffer::New( Dali::Property::Map(). - Add( "aPosition", Dali::Property::VECTOR3 ). - Add( "aNormal", Dali::Property::VECTOR3 ). - Add( "aTexCoord", Dali::Property::VECTOR2 ) - ); + mVertexBuffer = Dali::PropertyBuffer::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 af72750..0c38e0a 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 VertexBuffer + * Such data is ready to be used as GL buffer so it can be copied directly into the PropertyBuffer * 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::VertexBuffer mVertexBuffer; + Dali::PropertyBuffer mVertexBuffer; ModelHeader mHeader; diff --git a/examples/line-mesh/line-mesh-example.cpp b/examples/line-mesh/line-mesh-example.cpp index a088797..ff3aace 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; - VertexBuffer pentagonVertices = VertexBuffer::New( pentagonVertexFormat ); + PropertyBuffer pentagonVertices = PropertyBuffer::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 35bbc39..af8662c 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; - VertexBuffer initialPositionVertices = VertexBuffer::New( initialPositionVertexFormat ); + PropertyBuffer initialPositionVertices = PropertyBuffer::New( initialPositionVertexFormat ); initialPositionVertices.SetData( quad, numberOfVertices ); Property::Map finalPositionVertexFormat; finalPositionVertexFormat["aFinalPos"] = Property::VECTOR2; - VertexBuffer finalPositionVertices = VertexBuffer::New( finalPositionVertexFormat ); + PropertyBuffer finalPositionVertices = PropertyBuffer::New( finalPositionVertexFormat ); finalPositionVertices.SetData( cat, numberOfVertices ); Property::Map colorVertexFormat; colorVertexFormat["aColor"] = Property::VECTOR3; - VertexBuffer colorVertices = VertexBuffer::New( colorVertexFormat ); + PropertyBuffer colorVertices = PropertyBuffer::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 4547dad..0eae70b 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; - VertexBuffer positionVertices = VertexBuffer::New( positionVertexFormat ); + PropertyBuffer positionVertices = PropertyBuffer::New( positionVertexFormat ); positionVertices.SetData( vertices, numberOfVertices ); // Textures Property::Map textureVertexFormat; textureVertexFormat["aTexture"] = Property::VECTOR2; - VertexBuffer textureVertices = VertexBuffer::New( textureVertexFormat ); + PropertyBuffer textureVertices = PropertyBuffer::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 43cd963..e66ecde 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; - VertexBuffer positionVertices = VertexBuffer::New( positionVertexFormat ); + PropertyBuffer positionVertices = PropertyBuffer::New( positionVertexFormat ); positionVertices.SetData( vertices, numberOfVertices ); // Textures Property::Map textureVertexFormat; textureVertexFormat["aTexture"] = Property::VECTOR2; - VertexBuffer textureVertices = VertexBuffer::New( textureVertexFormat ); + PropertyBuffer textureVertices = PropertyBuffer::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 e18971a..312a07b 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; - VertexBuffer polyhedraVertices = VertexBuffer::New( polyhedraVertexFormat ); + PropertyBuffer polyhedraVertices = PropertyBuffer::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 551d824..0660bec 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; - VertexBuffer vertexBuffer = VertexBuffer::New( vertexFormat ); + PropertyBuffer vertexBuffer = PropertyBuffer::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 bb93f27..4f04401 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 = VertexBuffer::New( Property::Map() + auto vertexBuffer = PropertyBuffer::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 42db09d..804e784 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; - VertexBuffer surfaceVertices = VertexBuffer::New( vertexFormat ); + PropertyBuffer surfaceVertices = PropertyBuffer::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 d159f61..e9004db 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; - VertexBuffer surfaceVertices = VertexBuffer::New( vertexFormat ); + PropertyBuffer surfaceVertices = PropertyBuffer::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 9886838..7d89a77 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 ); - VertexBuffer vertexBuffer = VertexBuffer::New( property ); + PropertyBuffer vertexBuffer = PropertyBuffer::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 d3296d2..a6bf5e3 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 ) } }; - VertexBuffer vertexBuffer = VertexBuffer::New( Property::Map() - .Add( "aPosition", Property::VECTOR3 ) ); + PropertyBuffer vertexBuffer = PropertyBuffer::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 82ffa6a..bb21c9c 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; - VertexBuffer positionBuffer = VertexBuffer::New( positionMap ); + PropertyBuffer positionBuffer = PropertyBuffer::New( positionMap ); positionBuffer.SetData( positions.Begin(), positions.Count() ); Property::Map normalMap; normalMap["aNormal"] = Property::VECTOR3; - VertexBuffer normalBuffer = VertexBuffer::New( normalMap ); + PropertyBuffer normalBuffer = PropertyBuffer::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; - VertexBuffer tangentBuffer = VertexBuffer::New( tangentMap ); + PropertyBuffer tangentBuffer = PropertyBuffer::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; - VertexBuffer texCoordBuffer = VertexBuffer::New( textCoordMap ); + PropertyBuffer texCoordBuffer = PropertyBuffer::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 3153d04..9b4260f 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 }, }; - VertexBuffer vertexBuffer = VertexBuffer::New( Property::Map() + PropertyBuffer vertexBuffer = PropertyBuffer::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 d50a4f0..1f421ad 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 ) }; - VertexBuffer vertexBuffer = VertexBuffer::New( Property::Map() - .Add( "aPosition", Property::VECTOR2 ) ); + PropertyBuffer vertexBuffer = PropertyBuffer::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 046fc71..e3133ca 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 ) - VertexBuffer vertexBuffer = VertexBuffer::New( vertexFormat ); + PropertyBuffer vertexBuffer = PropertyBuffer::New( vertexFormat ); vertexBuffer.SetData( vertices.data(), vertices.size() ); // create geometry @@ -238,7 +238,7 @@ public: Property::Map vertexFormat; vertexFormat["aPosition"] = Property::VECTOR2; - VertexBuffer vertexBuffer = VertexBuffer::New( vertexFormat ); + PropertyBuffer vertexBuffer = PropertyBuffer::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 45f5617..db94cfe 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 ) }, }; - VertexBuffer vertexBuffer = VertexBuffer::New( Property::Map() - .Add( "aPosition", Property::VECTOR3 ) - .Add( "aTexCoord", Property::VECTOR2 ) ); + PropertyBuffer vertexBuffer = PropertyBuffer::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 ) } }; - VertexBuffer vertexBuffer = VertexBuffer::New( Property::Map() - .Add( "aPosition", Property::VECTOR3 ) ); + PropertyBuffer vertexBuffer = PropertyBuffer::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 3aa55da..be22567 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 ) }, }; - VertexBuffer vertexBuffer = VertexBuffer::New( Property::Map() - .Add( "aPosition", Property::VECTOR3 ) - .Add( "aTexCoord", Property::VECTOR2 ) ); + PropertyBuffer vertexBuffer = PropertyBuffer::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 f983c14..c69f323 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 ) }; - VertexBuffer vertexBuffer = VertexBuffer::New( Property::Map() - .Add( "aPosition", Property::VECTOR2 ) ); + PropertyBuffer vertexBuffer = PropertyBuffer::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 f6f99b8..8135fd3 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); - VertexBuffer vertexBuffer = VertexBuffer::New(property); + PropertyBuffer vertexBuffer = PropertyBuffer::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 be899be..a1444fa 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; - VertexBuffer vertexBuffer = VertexBuffer::New( vertexFormat ); - vertexBuffer.SetData( &vertices[0], vertices.size() ); + PropertyBuffer propertyBuffer = PropertyBuffer::New( vertexFormat ); + propertyBuffer.SetData( &vertices[0], vertices.size() ); Geometry geometry = Geometry::New(); - geometry.AddVertexBuffer( vertexBuffer ); + geometry.AddVertexBuffer( propertyBuffer ); geometry.SetIndexBuffer( &faces[0], faces.size() ); geometry.SetType( Geometry::TRIANGLES ); @@ -558,3 +558,4 @@ int DALI_EXPORT_API main( int argc, char **argv ) application.MainLoop(); return 0; } + diff --git a/shared/utility.h b/shared/utility.h index 8295b23..7c31dff 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::VertexBuffer vertexBuffer; + Dali::PropertyBuffer 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::VertexBuffer::New( vertexFormat ); + vertexBuffer = Dali::PropertyBuffer::New( vertexFormat ); vertexBuffer.SetData( data, 4u ); //Create the geometry -- 2.7.4