utc-Dali-PixelData.cpp
utc-Dali-Processors.cpp
utc-Dali-PropertyArray.cpp
- utc-Dali-PropertyBuffer.cpp
utc-Dali-PropertyMap.cpp
utc-Dali-PropertyNotification.cpp
utc-Dali-PropertyTypes.cpp
utc-Dali-Vector2.cpp
utc-Dali-Vector3.cpp
utc-Dali-Vector4.cpp
+ utc-Dali-VertexBuffer.cpp
utc-Dali-WeakHandle.cpp
utc-Dali-WheelEvent.cpp
)
return textureSet;
}
-PropertyBuffer CreatePropertyBuffer()
+VertexBuffer CreateVertexBuffer()
{
Property::Map texturedQuadVertexFormat;
texturedQuadVertexFormat["aPosition"] = Property::VECTOR2;
texturedQuadVertexFormat["aVertexCoord"] = Property::VECTOR2;
- PropertyBuffer vertexData = PropertyBuffer::New( texturedQuadVertexFormat );
+ VertexBuffer vertexData = VertexBuffer::New( texturedQuadVertexFormat );
return vertexData;
}
Geometry CreateQuadGeometry(void)
{
- PropertyBuffer vertexData = CreatePropertyBuffer();
+ VertexBuffer vertexData = CreateVertexBuffer();
const float halfQuadSize = .5f;
struct TexturedQuadVertex { Vector2 position; Vector2 textureCoordinates; };
TexturedQuadVertex texturedQuadVertexData[4] = {
TextureSet CreateTextureSet();
TextureSet CreateTextureSet( Texture texture );
Geometry CreateQuadGeometry();
-PropertyBuffer CreatePropertyBuffer();
+VertexBuffer CreateVertexBuffer();
}
struct TexturedQuadVertex { Vector2 position; Vector2 textureCoordinates; };
-PropertyBuffer CreateVertexBuffer( const std::string& aPosition, const std::string& aTexCoord )
+VertexBuffer CreateVertexBuffer( const std::string& aPosition, const std::string& aTexCoord )
{
const float halfQuadSize = .5f;
TexturedQuadVertex texturedQuadVertexData[4] = {
vertexFormat[aPosition] = Property::VECTOR2;
vertexFormat[aTexCoord] = Property::VECTOR2;
- PropertyBuffer vertexData = PropertyBuffer::New( vertexFormat );
+ VertexBuffer vertexData = VertexBuffer::New( vertexFormat );
vertexData.SetData( texturedQuadVertexData, 4 );
return vertexData;
DALI_TEST_EQUALS( 1, geometry.GetBaseObject().ReferenceCount(), TEST_LOCATION );
DALI_TEST_EQUALS( 0u, geometry.GetNumberOfVertexBuffers(), TEST_LOCATION );
- PropertyBuffer vertexBuffer = CreateVertexBuffer("aPosition", "aTexCoord" );
+ VertexBuffer vertexBuffer = CreateVertexBuffer("aPosition", "aTexCoord" );
geometry.AddVertexBuffer( vertexBuffer );
DALI_TEST_EQUALS( 1u, geometry.GetNumberOfVertexBuffers(), TEST_LOCATION );
DALI_TEST_EQUALS( 1, geometry.GetBaseObject().ReferenceCount(), TEST_LOCATION );
DALI_TEST_EQUALS( 0u, geometry.GetNumberOfVertexBuffers(), TEST_LOCATION );
- PropertyBuffer vertexBuffer = CreateVertexBuffer("aPosition", "aTexCoord" );
+ VertexBuffer vertexBuffer = CreateVertexBuffer("aPosition", "aTexCoord" );
geometry.AddVertexBuffer( vertexBuffer );
DALI_TEST_EQUALS( 1u, geometry.GetNumberOfVertexBuffers(), TEST_LOCATION );
tet_infoline("Test AddVertexBuffer");
- PropertyBuffer vertexBuffer1 = CreateVertexBuffer("aPosition1", "aTexCoord1" );
+ VertexBuffer vertexBuffer1 = CreateVertexBuffer("aPosition1", "aTexCoord1" );
Geometry geometry = Geometry::New();
geometry.AddVertexBuffer( vertexBuffer1 );
// add the second vertex buffer
application.GetGlAbstraction().ResetBufferDataCalls();
- PropertyBuffer vertexBuffer2 = CreateVertexBuffer( "aPosition2", "aTexCoord2" );
+ VertexBuffer vertexBuffer2 = CreateVertexBuffer( "aPosition2", "aTexCoord2" );
geometry.AddVertexBuffer( vertexBuffer2 );
application.SendNotification();
application.Render(0);
TestApplication application;
tet_infoline("Test GetNumberOfVertexBuffers");
- PropertyBuffer vertexBuffer1 = CreateVertexBuffer("aPosition1", "aTexCoord1" );
- PropertyBuffer vertexBuffer2 = CreateVertexBuffer("aPosition2", "aTexCoord2" );
- PropertyBuffer vertexBuffer3 = CreateVertexBuffer("aPosition3", "aTexCoord3" );
+ VertexBuffer vertexBuffer1 = CreateVertexBuffer("aPosition1", "aTexCoord1" );
+ VertexBuffer vertexBuffer2 = CreateVertexBuffer("aPosition2", "aTexCoord2" );
+ VertexBuffer vertexBuffer3 = CreateVertexBuffer("aPosition3", "aTexCoord3" );
Geometry geometry = Geometry::New();
geometry.AddVertexBuffer( vertexBuffer1 );
tet_infoline("Test RemoveVertexBuffer");
- PropertyBuffer vertexBuffer1 = CreateVertexBuffer("aPosition1", "aTexCoord1" );
- PropertyBuffer vertexBuffer2 = CreateVertexBuffer("aPosition2", "aTexCoord2" );
+ VertexBuffer vertexBuffer1 = CreateVertexBuffer("aPosition1", "aTexCoord1" );
+ VertexBuffer vertexBuffer2 = CreateVertexBuffer("aPosition2", "aTexCoord2" );
Geometry geometry = Geometry::New();
geometry.AddVertexBuffer( vertexBuffer1 );
tet_infoline("Test SetIndexBuffer");
- PropertyBuffer vertexBuffer = CreateVertexBuffer("aPosition", "aTexCoord" );
+ VertexBuffer vertexBuffer = CreateVertexBuffer("aPosition", "aTexCoord" );
Geometry geometry = Geometry::New();
geometry.AddVertexBuffer( vertexBuffer );
tet_infoline("Test SetType and GetType: without index buffer");
unsigned int numVertex = 4u;
- PropertyBuffer vertexBuffer = CreateVertexBuffer("aPosition", "aTexCoord" );
+ VertexBuffer vertexBuffer = CreateVertexBuffer("aPosition", "aTexCoord" );
Geometry geometry = Geometry::New();
geometry.AddVertexBuffer( vertexBuffer );
unsigned int numVertex = 4u;
unsigned int numIndex = 6u; // 6 unsigned short
- PropertyBuffer vertexBuffer = CreateVertexBuffer("aPosition", "aTexCoord" );
+ VertexBuffer vertexBuffer = CreateVertexBuffer("aPosition", "aTexCoord" );
Geometry geometry = Geometry::New();
Dali::Geometry instance;
try
{
- Dali::PropertyBuffer arg1;
+ Dali::VertexBuffer arg1;
instance.AddVertexBuffer(arg1);
DALI_TEST_CHECK(false); // Should not get here
}
*
* Check rendered vertex buffer is the right size for the initial property buffer
*
- * Check PropertyBuffer set via SetData can be read thru property system
- * Check PropertyBuffer property setters / getters
- * Check vertex PropertyBuffer set via properties renders as expected
- * Check Index propertyBuffer set via properties renders as expected
+ * Check VertexBuffer set via SetData renders as expected
+ * Check IndexBuffer set via properties renders as expected
*
* Check geometry type renders correctly as the matching GL draw call and type
*
};
Property::Map vertexFormat;
vertexFormat["aPosition"] = Property::VECTOR2;
- PropertyBuffer vertexBuffer = PropertyBuffer::New( vertexFormat );
+ VertexBuffer vertexBuffer = VertexBuffer::New( vertexFormat );
vertexBuffer.SetData( shapes, sizeof(shapes)/sizeof(shapes[0]));
// --------------------------------------------------------------------------
#include <mesh-builder.h>
-void propertyBuffer_test_startup(void)
+void vertexBuffer_test_startup(void)
{
test_return_value = TET_UNDEF;
}
-void propertyBuffer_test_cleanup(void)
+void vertexBuffer_test_cleanup(void)
{
test_return_value = TET_PASS;
}
-int UtcDaliPropertyBufferNew01(void)
+int UtcDaliVertexBufferNew01(void)
{
TestApplication application;
texturedQuadVertexFormat["aPosition"] = Property::VECTOR2;
texturedQuadVertexFormat["aVertexCoord"] = Property::VECTOR2;
- PropertyBuffer propertyBuffer = PropertyBuffer::New( texturedQuadVertexFormat );
+ VertexBuffer vertexBuffer = VertexBuffer::New( texturedQuadVertexFormat );
- DALI_TEST_EQUALS( (bool)propertyBuffer, true, TEST_LOCATION );
+ DALI_TEST_EQUALS( (bool)vertexBuffer, true, TEST_LOCATION );
END_TEST;
}
-int UtcDaliPropertyBufferNew02(void)
+int UtcDaliVertexBufferNew02(void)
{
TestApplication application;
- PropertyBuffer propertyBuffer;
- DALI_TEST_EQUALS( (bool)propertyBuffer, false, TEST_LOCATION );
+ VertexBuffer vertexBuffer;
+ DALI_TEST_EQUALS( (bool)vertexBuffer, false, TEST_LOCATION );
END_TEST;
}
-int UtcDaliPropertyBufferDownCast01(void)
+int UtcDaliVertexBufferDownCast01(void)
{
TestApplication application;
texturedQuadVertexFormat["aPosition"] = Property::VECTOR2;
texturedQuadVertexFormat["aVertexCoord"] = Property::VECTOR2;
- PropertyBuffer propertyBuffer = PropertyBuffer::New( texturedQuadVertexFormat );
+ VertexBuffer vertexBuffer = VertexBuffer::New( texturedQuadVertexFormat );
- BaseHandle handle(propertyBuffer);
- PropertyBuffer propertyBuffer2 = PropertyBuffer::DownCast(handle);
- DALI_TEST_EQUALS( (bool)propertyBuffer2, true, TEST_LOCATION );
+ BaseHandle handle(vertexBuffer);
+ VertexBuffer vertexBuffer2 = VertexBuffer::DownCast(handle);
+ DALI_TEST_EQUALS( (bool)vertexBuffer2, true, TEST_LOCATION );
END_TEST;
}
-int UtcDaliPropertyBufferDownCast02(void)
+int UtcDaliVertexBufferDownCast02(void)
{
TestApplication application;
Handle handle = Handle::New(); // Create a custom object
- PropertyBuffer propertyBuffer = PropertyBuffer::DownCast(handle);
- DALI_TEST_EQUALS( (bool)propertyBuffer, false, TEST_LOCATION );
+ VertexBuffer vertexBuffer = VertexBuffer::DownCast(handle);
+ DALI_TEST_EQUALS( (bool)vertexBuffer, false, TEST_LOCATION );
END_TEST;
}
-int UtcDaliPropertyBufferCopyConstructor(void)
+int UtcDaliVertexBufferCopyConstructor(void)
{
TestApplication application;
- PropertyBuffer propertyBuffer = CreatePropertyBuffer();
+ VertexBuffer vertexBuffer = CreateVertexBuffer();
- PropertyBuffer propertyBufferCopy(propertyBuffer);
+ VertexBuffer vertexBufferCopy(vertexBuffer);
- DALI_TEST_EQUALS( (bool)propertyBufferCopy, true, TEST_LOCATION );
- DALI_TEST_EQUALS( propertyBufferCopy.GetSize(), 0u, TEST_LOCATION );
+ DALI_TEST_EQUALS( (bool)vertexBufferCopy, true, TEST_LOCATION );
+ DALI_TEST_EQUALS( vertexBufferCopy.GetSize(), 0u, TEST_LOCATION );
END_TEST;
}
-int UtcDaliPropertyBufferAssignmentOperator(void)
+int UtcDaliVertexBufferAssignmentOperator(void)
{
TestApplication application;
- PropertyBuffer propertyBuffer = CreatePropertyBuffer();
+ VertexBuffer vertexBuffer = CreateVertexBuffer();
- PropertyBuffer propertyBuffer2;
- DALI_TEST_EQUALS( (bool)propertyBuffer2, false, TEST_LOCATION );
+ VertexBuffer vertexBuffer2;
+ DALI_TEST_EQUALS( (bool)vertexBuffer2, false, TEST_LOCATION );
- propertyBuffer2 = propertyBuffer;
- DALI_TEST_EQUALS( (bool)propertyBuffer2, true, TEST_LOCATION );
- DALI_TEST_EQUALS( propertyBuffer2.GetSize(), 0u, TEST_LOCATION );
+ vertexBuffer2 = vertexBuffer;
+ DALI_TEST_EQUALS( (bool)vertexBuffer2, true, TEST_LOCATION );
+ DALI_TEST_EQUALS( vertexBuffer2.GetSize(), 0u, TEST_LOCATION );
END_TEST;
}
-int UtcDaliPropertyBufferMoveConstructor(void)
+int UtcDaliVertexBufferMoveConstructor(void)
{
TestApplication application;
- PropertyBuffer propertyBuffer = CreatePropertyBuffer();
- DALI_TEST_CHECK( propertyBuffer );
- DALI_TEST_EQUALS( 1, propertyBuffer.GetBaseObject().ReferenceCount(), TEST_LOCATION );
- DALI_TEST_EQUALS( 0u, propertyBuffer.GetSize(), TEST_LOCATION );
+ VertexBuffer vertexBuffer = CreateVertexBuffer();
+ DALI_TEST_CHECK( vertexBuffer );
+ DALI_TEST_EQUALS( 1, vertexBuffer.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+ DALI_TEST_EQUALS( 0u, vertexBuffer.GetSize(), TEST_LOCATION );
- PropertyBuffer move = std::move( propertyBuffer );
+ VertexBuffer move = std::move( vertexBuffer );
DALI_TEST_CHECK( move );
DALI_TEST_EQUALS( 1, move.GetBaseObject().ReferenceCount(), TEST_LOCATION );
DALI_TEST_EQUALS( 0u, move.GetSize(), TEST_LOCATION );
- DALI_TEST_CHECK( !propertyBuffer );
+ DALI_TEST_CHECK( !vertexBuffer );
END_TEST;
}
-int UtcDaliPropertyBufferMoveAssignment(void)
+int UtcDaliVertexBufferMoveAssignment(void)
{
TestApplication application;
- PropertyBuffer propertyBuffer = CreatePropertyBuffer();
- DALI_TEST_CHECK( propertyBuffer );
- DALI_TEST_EQUALS( 1, propertyBuffer.GetBaseObject().ReferenceCount(), TEST_LOCATION );
- DALI_TEST_EQUALS( 0u, propertyBuffer.GetSize(), TEST_LOCATION );
+ VertexBuffer vertexBuffer = CreateVertexBuffer();
+ DALI_TEST_CHECK( vertexBuffer );
+ DALI_TEST_EQUALS( 1, vertexBuffer.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+ DALI_TEST_EQUALS( 0u, vertexBuffer.GetSize(), TEST_LOCATION );
- PropertyBuffer move;
- move = std::move( propertyBuffer );
+ VertexBuffer move;
+ move = std::move( vertexBuffer );
DALI_TEST_CHECK( move );
DALI_TEST_EQUALS( 1, move.GetBaseObject().ReferenceCount(), TEST_LOCATION );
DALI_TEST_EQUALS( 0u, move.GetSize(), TEST_LOCATION );
- DALI_TEST_CHECK( !propertyBuffer );
+ DALI_TEST_CHECK( !vertexBuffer );
END_TEST;
}
-int UtcDaliPropertyBufferSetData01(void)
+int UtcDaliVertexBufferSetData01(void)
{
TestApplication application;
texturedQuadVertexFormat["aVertexCoord"] = Property::VECTOR2;
{
- PropertyBuffer propertyBuffer = PropertyBuffer::New( texturedQuadVertexFormat );
- DALI_TEST_EQUALS( (bool)propertyBuffer, true, TEST_LOCATION );
+ VertexBuffer vertexBuffer = VertexBuffer::New( texturedQuadVertexFormat );
+ DALI_TEST_EQUALS( (bool)vertexBuffer, true, TEST_LOCATION );
const float halfQuadSize = .5f;
struct TexturedQuadVertex { Vector2 position; Vector2 textureCoordinates; };
{ Vector2(-halfQuadSize, halfQuadSize), Vector2(0.f, 1.f) },
{ Vector2( halfQuadSize, halfQuadSize), Vector2(1.f, 1.f) } };
- propertyBuffer.SetData( texturedQuadVertexData, 4 );
+ vertexBuffer.SetData( texturedQuadVertexData, 4 );
Geometry geometry = Geometry::New();
- geometry.AddVertexBuffer( propertyBuffer );
+ geometry.AddVertexBuffer( vertexBuffer );
Shader shader = CreateShader();
Renderer renderer = Renderer::New(geometry, shader);
END_TEST;
}
-int UtcDaliPropertyBufferSetData02(void)
+int UtcDaliVertexBufferSetData02(void)
{
TestApplication application;
texturedQuadVertexFormat["aPosition"] = Property::VECTOR2;
texturedQuadVertexFormat["aVertexCoord"] = Property::VECTOR2;
- PropertyBuffer propertyBuffer = PropertyBuffer::New( texturedQuadVertexFormat );
- DALI_TEST_EQUALS( (bool)propertyBuffer, true, TEST_LOCATION );
+ VertexBuffer vertexBuffer = VertexBuffer::New( texturedQuadVertexFormat );
+ DALI_TEST_EQUALS( (bool)vertexBuffer, true, TEST_LOCATION );
const float halfQuadSize = .5f;
struct TexturedQuadVertex { Vector2 position; Vector2 textureCoordinates; };
{ Vector2(-halfQuadSize, halfQuadSize), Vector2(0.f, 1.f) },
{ Vector2( halfQuadSize, halfQuadSize), Vector2(1.f, 1.f) } };
- propertyBuffer.SetData( texturedQuadVertexData, 4 );
+ vertexBuffer.SetData( texturedQuadVertexData, 4 );
Geometry geometry = Geometry::New();
- geometry.AddVertexBuffer( propertyBuffer );
+ geometry.AddVertexBuffer( vertexBuffer );
Shader shader = CreateShader();
Renderer renderer = Renderer::New(geometry, shader);
DALI_TEST_EQUALS( bufferDataCalls[0], sizeof(texturedQuadVertexData), TEST_LOCATION );
}
- // Re-upload the data on the propertyBuffer
- propertyBuffer.SetData( texturedQuadVertexData, 4 );
+ // Re-upload the data on the vertexBuffer
+ vertexBuffer.SetData( texturedQuadVertexData, 4 );
application.SendNotification();
application.Render(0);
END_TEST;
}
-int UtcDaliPropertyBufferInvalidTypeN(void)
+int UtcDaliVertexBufferInvalidTypeN(void)
{
TestApplication application;
try
{
- PropertyBuffer propertyBuffer = PropertyBuffer::New( texturedQuadVertexFormat );
+ VertexBuffer vertexBuffer = VertexBuffer::New( texturedQuadVertexFormat );
tet_result(TET_FAIL);
}
catch ( Dali::DaliException& e )
{
- DALI_TEST_ASSERT( e, "Property::Type not supported in PropertyBuffer", TEST_LOCATION );
+ DALI_TEST_ASSERT( e, "Property::Type not supported in VertexBuffer", TEST_LOCATION );
}
END_TEST;
}
-int UtcDaliPropertyBufferSetDataNegative(void)
+int UtcDaliVertexBufferSetDataNegative(void)
{
TestApplication application;
- Dali::PropertyBuffer instance;
+ Dali::VertexBuffer instance;
try
{
void* arg1(nullptr);
END_TEST;
}
-int UtcDaliPropertyBufferGetSizeNegative(void)
+int UtcDaliVertexBufferGetSizeNegative(void)
{
TestApplication application;
- Dali::PropertyBuffer instance;
+ Dali::VertexBuffer instance;
try
{
instance.GetSize();
#include <dali/internal/update/rendering/scene-graph-renderer.h>
#include <dali/internal/render/renderers/render-geometry.h>
-#include <dali/internal/render/renderers/render-property-buffer.h>
+#include <dali/internal/render/renderers/render-vertex-buffer.h>
#include <dali/internal/render/renderers/render-renderer.h>
#include <dali/internal/render/renderers/render-sampler.h>
#include <dali/internal/update/render-tasks/scene-graph-camera.h>
sizeof( Internal::Geometry ) +
sizeof( Internal::Render::Geometry) );
const std::size_t PROPERTY_BUFFER_MEMORY_SIZE(
- sizeof( Internal::PropertyBuffer ) +
- sizeof( Internal::Render::PropertyBuffer ) );
+ sizeof( Internal::VertexBuffer ) +
+ sizeof( Internal::Render::VertexBuffer ) );
const std::size_t TEXTURE_SET_MEMORY_SIZE(
sizeof( Internal::TextureSet ) +
sizeof( Internal::SceneGraph::TextureSet ) );
/*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
return geometry;
}
-uint32_t Geometry::AddVertexBuffer( PropertyBuffer& vertexBuffer )
+uint32_t Geometry::AddVertexBuffer( VertexBuffer& vertexBuffer )
{
mVertexBuffers.push_back( &vertexBuffer );
SceneGraph::AttachVertexBufferMessage( mEventThreadServices.GetUpdateManager(), *mRenderObject, *vertexBuffer.GetRenderObject() );
void Geometry::RemoveVertexBuffer( uint32_t index )
{
- const Render::PropertyBuffer& renderPropertyBuffer = static_cast<const Render::PropertyBuffer&>( *(mVertexBuffers[index]->GetRenderObject()) );
- SceneGraph::RemoveVertexBufferMessage( mEventThreadServices.GetUpdateManager(), *mRenderObject, renderPropertyBuffer );
+ const Render::VertexBuffer& renderVertexBuffer = static_cast<const Render::VertexBuffer&>( *(mVertexBuffers[index]->GetRenderObject()) );
+ SceneGraph::RemoveVertexBufferMessage( mEventThreadServices.GetUpdateManager(), *mRenderObject, renderVertexBuffer );
mVertexBuffers.erase( mVertexBuffers.begin() + index );
}
#define DALI_INTERNAL_GEOMETRY_H
/*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
#include <dali/internal/event/common/connectable.h> // Dali::Internal::Connectable
#include <dali/internal/event/common/object-connector.h> // Dali::Internal::ObjectConnector
#include <dali/internal/event/common/object-impl.h> // Dali::Internal::Object
-#include <dali/internal/event/common/property-buffer-impl.h> // Dali::Internal::PropertyBuffer
+#include <dali/internal/event/rendering/vertex-buffer-impl.h> // Dali::Internal::VertexBuffer
#include <dali/internal/render/renderers/render-geometry.h>
namespace Dali
/**
* @copydoc Dali::Geometry::AddVertexBuffer()
*/
- uint32_t AddVertexBuffer( PropertyBuffer& vertexBuffer );
+ uint32_t AddVertexBuffer( VertexBuffer& vertexBuffer );
/**
* @copydoc Dali::Geometry::GetNumberOfVertexBuffers()
EventThreadServices& mEventThreadServices; ///<Used to send messages to the render thread via update thread
Render::Geometry* mRenderObject;
- std::vector<PropertyBufferPtr> mVertexBuffers; ///< Vector of intrusive pointers to vertex buffers
+ std::vector<VertexBufferPtr> mVertexBuffers; ///< Vector of intrusive pointers to vertex buffers
Dali::Geometry::Type mType; ///< Geometry type (cached)
};
#include <dali/public-api/common/intrusive-ptr.h> // Dali::IntrusivePtr
#include <dali/public-api/rendering/texture-set.h> // Dali::TextureSet
#include <dali/internal/event/common/object-impl.h> // Dali::Internal::Object
-#include <dali/internal/event/common/property-buffer-impl.h> // Dali::Internal::PropertyBuffer
#include <dali/internal/event/rendering/sampler-impl.h> // Dali::Internal::Sampler
-#include <dali/internal/event/rendering/texture-impl.h> // Dali::Internal::Texture
#include <dali/internal/event/rendering/shader-impl.h> // Dali::Internal::Shader
+#include <dali/internal/event/rendering/texture-impl.h> // Dali::Internal::Texture
+
namespace Dali
{
/*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*/
// CLASS HEADER
-#include <dali/internal/event/common/property-buffer-impl.h>
+#include <dali/internal/event/rendering/vertex-buffer-impl.h>
// INTERNAL INCLUDES
-#include <dali/public-api/rendering/property-buffer.h>
+#include <dali/public-api/rendering/vertex-buffer.h>
#include <dali/internal/update/manager/update-manager.h>
#if defined (ANDROID) || defined(WIN32)
} // unnamed namespace
-PropertyBufferPtr PropertyBuffer::New( Dali::Property::Map& format )
+VertexBufferPtr VertexBuffer::New( Dali::Property::Map& format )
{
DALI_ASSERT_ALWAYS( format.Count() && "Format cannot be empty." );
- PropertyBufferPtr propertyBuffer( new PropertyBuffer() );
- propertyBuffer->Initialize( format );
+ VertexBufferPtr vertexBuffer( new VertexBuffer() );
+ vertexBuffer->Initialize( format );
- return propertyBuffer;
+ return vertexBuffer;
}
-void PropertyBuffer::SetData( const void* data, uint32_t size )
+void VertexBuffer::SetData( const void* data, uint32_t size )
{
mSize = size; // size is the number of elements
uint32_t bufferSize = mBufferFormatSize * mSize;
// create a new DALi vector to store the buffer data
- // the heap allocated vector will end up being owned by Render::PropertyBuffer
+ // the heap allocated vector will end up being owned by Render::VertexBuffer
OwnerPointer< Vector<uint8_t> > bufferCopy = new Dali::Vector<uint8_t>();
bufferCopy->Resize( bufferSize );
std::copy( source, source + bufferSize, destination );
// Ownership of the bufferCopy is passed to the message ( uses an owner pointer )
- SceneGraph::SetPropertyBufferData( mEventThreadServices.GetUpdateManager(), *mRenderObject, bufferCopy, mSize );
+ SceneGraph::SetVertexBufferData( mEventThreadServices.GetUpdateManager(), *mRenderObject, bufferCopy, mSize );
}
-uint32_t PropertyBuffer::GetSize() const
+uint32_t VertexBuffer::GetSize() const
{
return mSize;
}
-const Render::PropertyBuffer* PropertyBuffer::GetRenderObject() const
+const Render::VertexBuffer* VertexBuffer::GetRenderObject() const
{
return mRenderObject;
}
-PropertyBuffer::~PropertyBuffer()
+VertexBuffer::~VertexBuffer()
{
if( EventThreadServices::IsCoreRunning() && mRenderObject)
{
- SceneGraph::RemovePropertyBuffer( mEventThreadServices.GetUpdateManager(), *mRenderObject );
+ SceneGraph::RemoveVertexBuffer( mEventThreadServices.GetUpdateManager(), *mRenderObject );
}
}
-PropertyBuffer::PropertyBuffer()
+VertexBuffer::VertexBuffer()
: mEventThreadServices( EventThreadServices::Get() ),
mRenderObject( NULL ),
mBufferFormatSize( 0 ),
{
}
-void PropertyBuffer::Initialize( Dali::Property::Map& formatMap )
+void VertexBuffer::Initialize( Dali::Property::Map& formatMap )
{
- mRenderObject = new Render::PropertyBuffer();
- OwnerPointer< Render::PropertyBuffer > transferOwnership( mRenderObject );
- SceneGraph::AddPropertyBuffer( mEventThreadServices.GetUpdateManager(), transferOwnership );
+ mRenderObject = new Render::VertexBuffer();
+ OwnerPointer< Render::VertexBuffer > transferOwnership( mRenderObject );
+ SceneGraph::AddVertexBuffer( mEventThreadServices.GetUpdateManager(), transferOwnership );
uint32_t numComponents = static_cast<uint32_t>( formatMap.Count() );
// Create the format
- OwnerPointer< Render::PropertyBuffer::Format> format = new Render::PropertyBuffer::Format();
+ OwnerPointer< Render::VertexBuffer::Format> format = new Render::VertexBuffer::Format();
format->components.resize( numComponents );
uint32_t currentAlignment = 0u;
( type == Property::ARRAY ) ||
( type == Property::MAP ) )
{
- DALI_ABORT( "Property::Type not supported in PropertyBuffer" );
+ DALI_ABORT( "Property::Type not supported in VertexBuffer" );
}
uint32_t elementSize = GetPropertyImplementationSize( type );
uint32_t elementAlignment = GetPropertyImplementationAlignment( type );
mBufferFormatSize = format->size;
- SceneGraph::SetPropertyBufferFormat(mEventThreadServices.GetUpdateManager(), *mRenderObject, format );
+ SceneGraph::SetVertexBufferFormat(mEventThreadServices.GetUpdateManager(), *mRenderObject, format );
}
uint32_t GetPropertyImplementationSize( Property::Type& propertyType )
-#ifndef DALI_INTERNAL_PROPERTY_BUFFER_H
-#define DALI_INTERNAL_PROPERTY_BUFFER_H
+#ifndef DALI_INTERNAL_VERTEX_BUFFER_H
+#define DALI_INTERNAL_VERTEX_BUFFER_H
/*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
#include <dali/public-api/object/base-object.h>
#include <dali/public-api/object/property-map.h> // Dali::Property::Map
#include <dali/internal/event/common/event-thread-services.h>
-#include <dali/internal/render/renderers/render-property-buffer.h>
+#include <dali/internal/render/renderers/render-vertex-buffer.h>
namespace Dali
{
namespace Internal
{
-class PropertyBuffer;
-typedef IntrusivePtr<PropertyBuffer> PropertyBufferPtr;
+class VertexBuffer;
+typedef IntrusivePtr<VertexBuffer> VertexBufferPtr;
/**
- * PropertyBuffer is an object that contains an array of structures of values that
+ * VertexBuffer is an object that contains an array of structures of values that
* can be accessed as properties.
*/
-class PropertyBuffer : public BaseObject
+class VertexBuffer : public BaseObject
{
public:
/**
* @copydoc PropertBuffer::New()
*/
- static PropertyBufferPtr New( Dali::Property::Map& format );
+ static VertexBufferPtr New( Dali::Property::Map& format );
/**
* @copydoc PropertBuffer::SetData()
public: // Default property extensions from Object
/**
- * @brief Get the render thread side of the PropertyBuffer
+ * @brief Get the render thread side of the VertexBuffer
*
- * @return The render thread side of this PropertyBuffer
+ * @return The render thread side of this VertexBuffer
*/
- const Render::PropertyBuffer* GetRenderObject() const;
+ const Render::VertexBuffer* GetRenderObject() const;
protected:
/**
* @brief Destructor
*/
- ~PropertyBuffer();
+ ~VertexBuffer();
private: // implementation
/**
* @brief Default constructor
*/
- PropertyBuffer();
+ VertexBuffer();
/**
* Second stage initialization
void Initialize( Dali::Property::Map& format );
private: // unimplemented methods
- PropertyBuffer( const PropertyBuffer& );
- PropertyBuffer& operator=( const PropertyBuffer& );
+ VertexBuffer( const VertexBuffer& );
+ VertexBuffer& operator=( const VertexBuffer& );
private: // data
EventThreadServices& mEventThreadServices; ///<Used to send messages to the render thread via update thread
- Render::PropertyBuffer* mRenderObject; ///<Render side object
+ Render::VertexBuffer* mRenderObject; ///<Render side object
uint32_t mBufferFormatSize;
uint32_t mSize; ///< Number of elements in the buffer
};
*/
template<Property::Type type> struct PropertyImplementationType
{
- // typedef ... Type; not defined, only support types declared bellow
+ // typedef ... Type; not defined, only support types declared below
};
template<> struct PropertyImplementationType< Property::BOOLEAN > { typedef bool Type; };
template<> struct PropertyImplementationType< Property::FLOAT > { typedef float Type; };
} // namespace Internal
// Helpers for public-api forwarding methods
-inline Internal::PropertyBuffer& GetImplementation(Dali::PropertyBuffer& handle)
+inline Internal::VertexBuffer& GetImplementation(Dali::VertexBuffer& handle)
{
- DALI_ASSERT_ALWAYS(handle && "PropertyBuffer handle is empty");
+ DALI_ASSERT_ALWAYS(handle && "VertexBuffer handle is empty");
BaseObject& object = handle.GetBaseObject();
- return static_cast<Internal::PropertyBuffer&>(object);
+ return static_cast<Internal::VertexBuffer&>(object);
}
-inline const Internal::PropertyBuffer& GetImplementation(const Dali::PropertyBuffer& handle)
+inline const Internal::VertexBuffer& GetImplementation(const Dali::VertexBuffer& handle)
{
- DALI_ASSERT_ALWAYS(handle && "PropertyBuffer handle is empty");
+ DALI_ASSERT_ALWAYS(handle && "VertexBuffer handle is empty");
const BaseObject& object = handle.GetBaseObject();
- return static_cast<const Internal::PropertyBuffer&>(object);
+ return static_cast<const Internal::VertexBuffer&>(object);
}
} // namespace Dali
-#endif // DALI_INTERNAL_PROPERTY_BUFFER_H
+#endif // DALI_INTERNAL_VERTEX_BUFFER_H
${internal_src_dir}/event/common/object-impl.cpp
${internal_src_dir}/event/common/object-registry-impl.cpp
${internal_src_dir}/event/common/projection.cpp
- ${internal_src_dir}/event/common/property-buffer-impl.cpp
${internal_src_dir}/event/common/property-conditions-impl.cpp
${internal_src_dir}/event/common/property-metadata.cpp
${internal_src_dir}/event/common/property-notification-impl.cpp
${internal_src_dir}/event/rendering/renderer-impl.cpp
${internal_src_dir}/event/rendering/sampler-impl.cpp
${internal_src_dir}/event/rendering/shader-impl.cpp
+ ${internal_src_dir}/event/rendering/vertex-buffer-impl.cpp
${internal_src_dir}/event/size-negotiation/memory-pool-relayout-container.cpp
${internal_src_dir}/event/size-negotiation/relayout-controller-impl.cpp
${internal_src_dir}/render/queue/render-queue.cpp
${internal_src_dir}/render/renderers/render-frame-buffer.cpp
${internal_src_dir}/render/renderers/render-geometry.cpp
- ${internal_src_dir}/render/renderers/render-property-buffer.cpp
+ ${internal_src_dir}/render/renderers/render-vertex-buffer.cpp
${internal_src_dir}/render/renderers/render-renderer.cpp
${internal_src_dir}/render/renderers/render-texture.cpp
${internal_src_dir}/render/shaders/program.cpp
OwnerContainer< Render::Sampler* > samplerContainer; ///< List of owned samplers
OwnerContainer< Render::Texture* > textureContainer; ///< List of owned textures
OwnerContainer< Render::FrameBuffer* > frameBufferContainer; ///< List of owned framebuffers
- OwnerContainer< Render::PropertyBuffer* > propertyBufferContainer; ///< List of owned property buffers
+ OwnerContainer< Render::VertexBuffer* > vertexBufferContainer; ///< List of owned vertex buffers
OwnerContainer< Render::Geometry* > geometryContainer; ///< List of owned Geometries
bool lastFrameWasRendered; ///< Keeps track of the last frame being rendered due to having render instructions
frameBuffer->AttachDepthStencilTexture( mImpl->context, texture, mipmapLevel );
}
-void RenderManager::AddPropertyBuffer( OwnerPointer< Render::PropertyBuffer >& propertyBuffer )
+void RenderManager::AddVertexBuffer( OwnerPointer< Render::VertexBuffer >& vertexBuffer )
{
- mImpl->propertyBufferContainer.PushBack( propertyBuffer.Release() );
+ mImpl->vertexBufferContainer.PushBack( vertexBuffer.Release() );
}
-void RenderManager::RemovePropertyBuffer( Render::PropertyBuffer* propertyBuffer )
+void RenderManager::RemoveVertexBuffer( Render::VertexBuffer* vertexBuffer )
{
- mImpl->propertyBufferContainer.EraseObject( propertyBuffer );
+ mImpl->vertexBufferContainer.EraseObject( vertexBuffer );
}
-void RenderManager::SetPropertyBufferFormat( Render::PropertyBuffer* propertyBuffer, OwnerPointer< Render::PropertyBuffer::Format>& format )
+void RenderManager::SetVertexBufferFormat( Render::VertexBuffer* vertexBuffer, OwnerPointer< Render::VertexBuffer::Format>& format )
{
- propertyBuffer->SetFormat( format.Release() );
+ vertexBuffer->SetFormat( format.Release() );
}
-void RenderManager::SetPropertyBufferData( Render::PropertyBuffer* propertyBuffer, OwnerPointer< Vector<uint8_t> >& data, uint32_t size )
+void RenderManager::SetVertexBufferData( Render::VertexBuffer* vertexBuffer, OwnerPointer< Vector<uint8_t> >& data, uint32_t size )
{
- propertyBuffer->SetData( data.Release(), size );
+ vertexBuffer->SetData( data.Release(), size );
}
void RenderManager::SetIndexBuffer( Render::Geometry* geometry, Dali::Vector<uint16_t>& indices )
mImpl->geometryContainer.EraseObject( geometry );
}
-void RenderManager::AttachVertexBuffer( Render::Geometry* geometry, Render::PropertyBuffer* propertyBuffer )
+void RenderManager::AttachVertexBuffer( Render::Geometry* geometry, Render::VertexBuffer* vertexBuffer )
{
DALI_ASSERT_DEBUG( NULL != geometry );
{
if ( iter == geometry )
{
- iter->AddPropertyBuffer( propertyBuffer );
+ iter->AddVertexBuffer( vertexBuffer );
break;
}
}
}
-void RenderManager::RemoveVertexBuffer( Render::Geometry* geometry, Render::PropertyBuffer* propertyBuffer )
+void RenderManager::RemoveVertexBuffer( Render::Geometry* geometry, Render::VertexBuffer* vertexBuffer )
{
DALI_ASSERT_DEBUG( NULL != geometry );
{
if ( iter == geometry )
{
- iter->RemovePropertyBuffer( propertyBuffer );
+ iter->RemoveVertexBuffer( vertexBuffer );
break;
}
}
#include <dali/public-api/math/rect.h>
#include <dali/integration-api/core-enumerations.h>
#include <dali/internal/common/shader-saver.h>
-#include <dali/internal/render/gl-resources/gpu-buffer.h>
-#include <dali/internal/render/renderers/render-property-buffer.h>
#include <dali/internal/event/rendering/texture-impl.h>
+#include <dali/internal/render/gl-resources/gpu-buffer.h>
+#include <dali/internal/render/renderers/render-vertex-buffer.h>
namespace Dali
{
class RenderInstruction;
class RenderInstructionContainer;
class Shader;
-class PropertyBufferDataProvider;
class Scene;
/**
/**
* Add a property buffer to the render manager.
- * @param[in] propertyBuffer The property buffer to add.
+ * @param[in] vertexBuffer The property buffer to add.
* @post propertBuffer is owned by RenderManager
*/
- void AddPropertyBuffer( OwnerPointer< Render::PropertyBuffer >& propertyBuffer );
+ void AddVertexBuffer( OwnerPointer< Render::VertexBuffer >& vertexBuffer );
/**
* Remove a property buffer from the render manager.
- * @param[in] propertyBuffer The property buffer to remove.
- * @post propertyBuffer is destroyed.
+ * @param[in] vertexBuffer The property buffer to remove.
+ * @post vertexBuffer is destroyed.
*/
- void RemovePropertyBuffer( Render::PropertyBuffer* propertyBuffer );
+ void RemoveVertexBuffer( Render::VertexBuffer* vertexBuffer );
/**
* Add a geometry to the render manager.
/**
* Adds a property buffer to a geometry from the render manager.
* @param[in] geometry The geometry
- * @param[in] propertyBuffer The property buffer to remove.
+ * @param[in] vertexBuffer The property buffer to remove.
*/
- void AttachVertexBuffer( Render::Geometry* geometry, Render::PropertyBuffer* propertyBuffer );
+ void AttachVertexBuffer( Render::Geometry* geometry, Render::VertexBuffer* vertexBuffer );
/**
* Remove a property buffer from a Render::Geometry from the render manager.
* @param[in] geometry The geometry
- * @param[in] propertyBuffer The property buffer to remove.
+ * @param[in] vertexBuffer The property buffer to remove.
* @post property buffer is destroyed.
*/
- void RemoveVertexBuffer( Render::Geometry* geometry, Render::PropertyBuffer* propertyBuffer );
+ void RemoveVertexBuffer( Render::Geometry* geometry, Render::VertexBuffer* vertexBuffer );
/**
* Sets the format of an existing property buffer
- * @param[in] propertyBuffer The property buffer.
+ * @param[in] vertexBuffer The property buffer.
* @param[in] format The new format of the buffer
*/
- void SetPropertyBufferFormat( Render::PropertyBuffer* propertyBuffer, OwnerPointer< Render::PropertyBuffer::Format>& format );
+ void SetVertexBufferFormat( Render::VertexBuffer* vertexBuffer, OwnerPointer< Render::VertexBuffer::Format>& format );
/**
* Sets the data of an existing property buffer
- * @param[in] propertyBuffer The property buffer.
+ * @param[in] vertexBuffer The property buffer.
* @param[in] data The new data of the buffer
* @param[in] size The new size of the buffer
*/
- void SetPropertyBufferData( Render::PropertyBuffer* propertyBuffer, OwnerPointer< Vector<uint8_t> >& data, uint32_t size );
+ void SetVertexBufferData( Render::VertexBuffer* vertexBuffer, OwnerPointer< Vector<uint8_t> >& data, uint32_t size );
/**
* Sets the data for the index buffer of an existing geometry
+++ /dev/null
-#ifndef DALI_INTERNAL_SCENE_GRAPH_PROPERTY_BUFFER_DATA_PROVIDER_H
-#define DALI_INTERNAL_SCENE_GRAPH_PROPERTY_BUFFER_DATA_PROVIDER_H
-
-/*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-// EXTERNAL INCLUDES
-#include <string>
-
-// INTERNAL INCLUDES
-#include <dali/public-api/object/property.h>
-#include <dali/internal/common/buffer-index.h>
-
-namespace Dali
-{
-namespace Internal
-{
-namespace SceneGraph
-{
-
-class PropertyBufferDataProvider
-{
-public:
-
- /**
- * Type for the data contained in the buffer
- */
- typedef Dali::Vector< char > BufferType;
-
-public:
- /**
- * Constructor
- */
- PropertyBufferDataProvider()
- {
- }
-
- /**
- * Get the number of attributes
- * @param[in] bufferIndex Index to access double buffered values
- * @return the number of attributes
- */
- virtual unsigned int GetAttributeCount( BufferIndex bufferIndex ) const = 0;
-
- /**
- * Get the name of an attribute
- * @param[in] bufferIndex Index to access double buffered values
- * @param[in] index Index of the attribute
- * @return the name of the attribute
- */
- virtual const std::string& GetAttributeName( BufferIndex bufferIndex, unsigned int index ) const = 0;
-
- /**
- * Get the byte size of an attribute
- * @param[in] bufferIndex Index to access double buffered values
- * @param[in] index Index of the attribute
- * @return the byte size of the attribute
- */
- virtual size_t GetAttributeSize( BufferIndex bufferIndex, unsigned int index ) const = 0;
-
- /**
- * Get the type of an attribute
- * @param[in] bufferIndex Index to access double buffered values
- * @param[in] index Index of the attribute
- * @return the type of the attribute
- */
- virtual Property::Type GetAttributeType( BufferIndex bufferIndex, unsigned int index ) const = 0;
-
- /**
- * Get the byte offset of an attribute
- * @param[in] bufferIndex Index to access double buffered values
- * @param[in] index Index of the attribute
- * @return the byte offset of the attribute
- */
- virtual size_t GetAttributeOffset( BufferIndex bufferIndex, unsigned int index ) const = 0;
-
- /**
- * Get the property buffer data
- * @param[in] bufferIndex Index to access double buffered values
- * @return the property buffer's data array
- */
- virtual const BufferType& GetData( BufferIndex bufferIndex ) const = 0;
-
- /**
- * Get the size of the property buffer in bytes
- * @param[in] bufferIndex Index to access double buffered values
- * @return the size in bytes
- */
- virtual size_t GetDataSize( BufferIndex bufferIndex ) const = 0;
-
- /**
- * Get the size of an element of the buffer in bytes
- * @param[in] bufferIndex Index to access double buffered values
- * @return the element size in bytes
- */
- virtual size_t GetElementSize( BufferIndex bufferIndex ) const = 0;
-
- /**
- * Get the number of elements
- * @param[in] bufferIndex Index to access double buffered values
- * @return the number of elements
- */
- virtual unsigned int GetElementCount( BufferIndex bufferIndex ) const = 0;
-
- /**
- * Get Id of the GPU buffer associated with this propertyBuffer
- * @param[in] bufferIndex Index to access double buffered values
- * @return the Id
- */
- virtual unsigned int GetGpuBufferId( BufferIndex bufferIndex ) const = 0;
-
- /**
- * Checks if data in the PropertyBuffer has changed repect previous frame
- * @param[in] bufferIndex Index to access double buffered values
- * @return true if data has changed, false otherwise
- */
- virtual bool HasDataChanged( BufferIndex bufferIndex ) const = 0;
-
-protected:
- /**
- * No deletion through this interface
- */
- virtual ~PropertyBufferDataProvider()
- {
- }
-};
-
-} // namespace SceneGraph
-} // namespace Internal
-} // namespace Dali
-
-#endif // DALI_INTERNAL_SCENE_GRAPH_PROPERTY_BUFFER_DATA_PROVIDER_H
#define DALI_INTERNAL_SCENE_GRAPH_RENDER_DATA_PROVIDER_H
/*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
#include <dali/public-api/common/vector-wrapper.h>
#include <dali/public-api/rendering/renderer.h>
#include <dali/internal/render/data-providers/node-data-provider.h>
-#include <dali/internal/render/data-providers/property-buffer-data-provider.h>
#include <dali/internal/render/data-providers/uniform-map-data-provider.h>
#include <dali/internal/render/renderers/render-sampler.h>
#include <dali/internal/render/renderers/render-texture.h>
namespace SceneGraph
{
-class PropertyBuffer;
class Shader;
class Renderer;
class RenderDataProvider
{
public:
- typedef Dali::Vector< const PropertyBufferDataProvider* > VertexBuffers;
typedef std::vector< Render::Sampler* > Samplers;
/**
/*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
#include <dali/internal/common/buffer-index.h>
#include <dali/internal/render/gl-resources/context.h>
#include <dali/internal/render/gl-resources/gpu-buffer.h>
-#include <dali/internal/render/renderers/render-property-buffer.h>
+#include <dali/internal/render/renderers/render-vertex-buffer.h>
#include <dali/internal/render/shaders/program.h>
namespace Dali
{
}
-void Geometry::AddPropertyBuffer( Render::PropertyBuffer* propertyBuffer )
+void Geometry::AddVertexBuffer( Render::VertexBuffer* vertexBuffer )
{
- mVertexBuffers.PushBack( propertyBuffer );
+ mVertexBuffers.PushBack( vertexBuffer );
mAttributesChanged = true;
}
mIndicesChanged = true;
}
-void Geometry::RemovePropertyBuffer( const Render::PropertyBuffer* propertyBuffer )
+void Geometry::RemoveVertexBuffer( const Render::VertexBuffer* vertexBuffer )
{
const auto&& end = mVertexBuffers.End();
for( auto&& iter = mVertexBuffers.Begin(); iter != end; ++iter )
{
- if( *iter == propertyBuffer )
+ if( *iter == vertexBuffer )
{
- //This will delete the gpu buffer associated to the RenderPropertyBuffer if there is one
+ //This will delete the gpu buffer associated to the RenderVertexBuffer if there is one
mVertexBuffers.Remove( iter );
mAttributesChanged = true;
break;
#define DALI_INTERNAL_RENDER_GEOMETRY_H
/*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
namespace Render
{
-class PropertyBuffer;
+class VertexBuffer;
/**
* This class encapsulates the GPU buffers. It is used to upload vertex data
/**
* Adds a property buffer to the geometry
- * @param[in] dataProvider The PropertyBuffer data provider
+ * @param[in] dataProvider The VertexBuffer data provider
*/
- void AddPropertyBuffer( Render::PropertyBuffer* propertyBuffer );
+ void AddVertexBuffer( Render::VertexBuffer* vertexBuffer );
/**
* Set the data for the index buffer to be used by the geometry
void SetIndexBuffer( Dali::Vector<uint16_t>& indices );
/**
- * Removes a PropertyBuffer from the geometry
- * @param[in] propertyBuffer The property buffer to be removed
+ * Removes a VertexBuffer from the geometry
+ * @param[in] vertexBuffer The property buffer to be removed
*/
- void RemovePropertyBuffer( const Render::PropertyBuffer* propertyBuffer );
+ void RemoveVertexBuffer( const Render::VertexBuffer* vertexBuffer );
/**
* Gets the attribute locations on the shader for the attributes defined in the geometry RenderBuffers
private:
- // PropertyBuffers
- Vector< Render::PropertyBuffer* > mVertexBuffers;
+ // VertexBuffers
+ Vector< Render::VertexBuffer* > mVertexBuffers;
Dali::Vector< uint16_t > mIndices;
OwnerPointer< GpuBuffer > mIndexBuffer;
/*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*
*/
-#include <dali/internal/render/renderers/render-property-buffer.h>
-#include <dali/internal/event/common/property-buffer-impl.h> // Dali::Internal::PropertyBuffer
+#include <dali/internal/render/renderers/render-vertex-buffer.h>
+#include <dali/internal/event/rendering/vertex-buffer-impl.h> // Dali::Internal::VertexBuffer
namespace
{
namespace Render
{
-PropertyBuffer::PropertyBuffer()
+VertexBuffer::VertexBuffer()
:mFormat(NULL),
mData(NULL),
mGpuBuffer(NULL),
{
}
-PropertyBuffer::~PropertyBuffer()
+VertexBuffer::~VertexBuffer()
{
}
-void PropertyBuffer::SetFormat( PropertyBuffer::Format* format )
+void VertexBuffer::SetFormat( VertexBuffer::Format* format )
{
mFormat = format;
mDataChanged = true;
}
-void PropertyBuffer::SetData( Dali::Vector<uint8_t>* data, uint32_t size )
+void VertexBuffer::SetData( Dali::Vector<uint8_t>* data, uint32_t size )
{
mData = data;
mSize = size;
mDataChanged = true;
}
-bool PropertyBuffer::Update( Context& context )
+bool VertexBuffer::Update( Context& context )
{
if( !mData || !mFormat || !mSize )
{
return true;
}
-void PropertyBuffer::BindBuffer( Context& context, GpuBuffer::Target target )
+void VertexBuffer::BindBuffer( Context& context, GpuBuffer::Target target )
{
if(mGpuBuffer)
{
}
}
-uint32_t PropertyBuffer::EnableVertexAttributes( Context& context, Vector<GLint>& vAttributeLocation, uint32_t locationBase )
+uint32_t VertexBuffer::EnableVertexAttributes( Context& context, Vector<GLint>& vAttributeLocation, uint32_t locationBase )
{
const uint32_t attributeCount = static_cast<uint32_t>( mFormat->components.size() );
-#ifndef DALI_INTERNAL_RENDER_PROPERTY_BUFFER_H
-#define DALI_INTERNAL_RENDER_PROPERTY_BUFFER_H
+#ifndef DALI_INTERNAL_RENDER_VERTEX_BUFFER_H
+#define DALI_INTERNAL_RENDER_VERTEX_BUFFER_H
/*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
namespace Render
{
-class PropertyBuffer
+class VertexBuffer
{
public:
};
/**
- * Structure that holds the meta-data of the format of PropertyBuffer.
+ * Structure that holds the meta-data of the format of VertexBuffer.
*/
struct Format
{
/**
* @brief Default constructor
*/
- PropertyBuffer();
+ VertexBuffer();
/**
* @brief Destructor
*/
- ~PropertyBuffer();
+ ~VertexBuffer();
/**
* @brief Set the format of the buffer
*
* This function takes ownership of the pointer
*
- * @param[in] format The format for the PropertyBuffer
+ * @param[in] format The format for the VertexBuffer
*/
- void SetFormat( PropertyBuffer::Format* format );
+ void SetFormat( VertexBuffer::Format* format );
/**
- * @brief Set the data of the PropertyBuffer
+ * @brief Set the data of the VertexBuffer
*
* This function takes ownership of the pointer
- * @param[in] data The new data of the PropertyBuffer
+ * @param[in] data The new data of the VertexBuffer
* @param[in] size The new size of the buffer
*/
void SetData( Dali::Vector<uint8_t>* data, uint32_t size );
return reinterpret_cast<T*>( &data->operator[]( 0 ) );
}
- inline const PropertyBuffer::Format* GetFormat() const
+ inline const VertexBuffer::Format* GetFormat() const
{
return mFormat.Get();
}
private:
- OwnerPointer< PropertyBuffer::Format > mFormat; ///< Format of the buffer
+ OwnerPointer< VertexBuffer::Format > mFormat; ///< Format of the buffer
OwnerPointer< Dali::Vector< uint8_t > > mData; ///< Data
- OwnerPointer< GpuBuffer > mGpuBuffer; ///< Pointer to the GpuBuffer associated with this RenderPropertyBuffer
+ OwnerPointer< GpuBuffer > mGpuBuffer; ///< Pointer to the GpuBuffer associated with this RenderVertexBuffer
uint32_t mSize; ///< Number of Elements in the buffer
bool mDataChanged; ///< Flag to know if data has changed in a frame
} // namespace Dali
-#endif // DALI_INTERNAL_RENDER_PROPERTY_BUFFER_H
+#endif // DALI_INTERNAL_RENDER_VERTEX_BUFFER_H
#define DALI_INTERNAL_SCENE_GRAPH_RENDER_MESSAGE_DISPATCHER_H
/*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
// INTERNAL INCLUDES
#include <dali/internal/update/common/scene-graph-buffers.h>
-#include <dali/internal/render/gl-resources/gpu-buffer.h>
#include <dali/internal/render/renderers/render-renderer.h>
-#include <dali/internal/render/renderers/render-property-buffer.h>
namespace Dali
{
{
class RenderTracker;
}
+
namespace SceneGraph
{
class RenderManager;
class RenderQueue;
-class PropertyBufferDataProvider;
+
/**
* A utility class for sending messages to the render-thread.
*/
#include <dali/internal/render/common/render-instruction-container.h>
#include <dali/internal/render/shaders/scene-graph-shader.h>
#include <dali/internal/render/renderers/render-renderer.h>
-#include <dali/internal/render/renderers/render-property-buffer.h>
#include <dali/internal/update/nodes/scene-graph-layer.h>
namespace
new (slot) DerivedType( &mImpl->renderManager, &RenderManager::SetWrapMode, sampler, rWrapMode, sWrapMode, tWrapMode );
}
-void UpdateManager::AddPropertyBuffer( OwnerPointer< Render::PropertyBuffer >& propertyBuffer )
+void UpdateManager::AddVertexBuffer( OwnerPointer< Render::VertexBuffer >& vertexBuffer )
{
// Message has ownership of format while in transit from update -> render
- typedef MessageValue1< RenderManager, OwnerPointer< Render::PropertyBuffer > > DerivedType;
+ typedef MessageValue1< RenderManager, OwnerPointer< Render::VertexBuffer > > DerivedType;
// Reserve some memory inside the render queue
uint32_t* slot = mImpl->renderQueue.ReserveMessageSlot( mSceneGraphBuffers.GetUpdateBufferIndex(), sizeof( DerivedType ) );
// Construct message in the render queue memory; note that delete should not be called on the return value
- new (slot) DerivedType( &mImpl->renderManager, &RenderManager::AddPropertyBuffer, propertyBuffer );
+ new (slot) DerivedType( &mImpl->renderManager, &RenderManager::AddVertexBuffer, vertexBuffer );
}
-void UpdateManager::RemovePropertyBuffer( Render::PropertyBuffer* propertyBuffer )
+void UpdateManager::RemoveVertexBuffer( Render::VertexBuffer* vertexBuffer )
{
- typedef MessageValue1< RenderManager, Render::PropertyBuffer* > DerivedType;
+ typedef MessageValue1< RenderManager, Render::VertexBuffer* > DerivedType;
// Reserve some memory inside the render queue
uint32_t* slot = mImpl->renderQueue.ReserveMessageSlot( mSceneGraphBuffers.GetUpdateBufferIndex(), sizeof( DerivedType ) );
// Construct message in the render queue memory; note that delete should not be called on the return value
- new (slot) DerivedType( &mImpl->renderManager, &RenderManager::RemovePropertyBuffer, propertyBuffer );
+ new (slot) DerivedType( &mImpl->renderManager, &RenderManager::RemoveVertexBuffer, vertexBuffer );
}
-void UpdateManager::SetPropertyBufferFormat( Render::PropertyBuffer* propertyBuffer, OwnerPointer< Render::PropertyBuffer::Format>& format )
+void UpdateManager::SetVertexBufferFormat( Render::VertexBuffer* vertexBuffer, OwnerPointer< Render::VertexBuffer::Format>& format )
{
// Message has ownership of format while in transit from update -> render
- typedef MessageValue2< RenderManager, Render::PropertyBuffer*, OwnerPointer< Render::PropertyBuffer::Format > > DerivedType;
+ typedef MessageValue2< RenderManager, Render::VertexBuffer*, OwnerPointer< Render::VertexBuffer::Format > > DerivedType;
// Reserve some memory inside the render queue
uint32_t* slot = mImpl->renderQueue.ReserveMessageSlot( mSceneGraphBuffers.GetUpdateBufferIndex(), sizeof( DerivedType ) );
// Construct message in the render queue memory; note that delete should not be called on the return value
- new (slot) DerivedType( &mImpl->renderManager, &RenderManager::SetPropertyBufferFormat, propertyBuffer, format );
+ new (slot) DerivedType( &mImpl->renderManager, &RenderManager::SetVertexBufferFormat, vertexBuffer, format );
}
-void UpdateManager::SetPropertyBufferData( Render::PropertyBuffer* propertyBuffer, OwnerPointer< Vector<uint8_t> >& data, uint32_t size )
+void UpdateManager::SetVertexBufferData( Render::VertexBuffer* vertexBuffer, OwnerPointer< Vector<uint8_t> >& data, uint32_t size )
{
// Message has ownership of format while in transit from update -> render
- typedef MessageValue3< RenderManager, Render::PropertyBuffer*, OwnerPointer< Dali::Vector<uint8_t> >, uint32_t > DerivedType;
+ typedef MessageValue3< RenderManager, Render::VertexBuffer*, OwnerPointer< Dali::Vector<uint8_t> >, uint32_t > DerivedType;
// Reserve some memory inside the render queue
uint32_t* slot = mImpl->renderQueue.ReserveMessageSlot( mSceneGraphBuffers.GetUpdateBufferIndex(), sizeof( DerivedType ) );
// Construct message in the render queue memory; note that delete should not be called on the return value
- new (slot) DerivedType( &mImpl->renderManager, &RenderManager::SetPropertyBufferData, propertyBuffer, data, size );
+ new (slot) DerivedType( &mImpl->renderManager, &RenderManager::SetVertexBufferData, vertexBuffer, data, size );
}
void UpdateManager::AddGeometry( OwnerPointer< Render::Geometry >& geometry )
new (slot) DerivedType( &mImpl->renderManager, geometry, indices );
}
-void UpdateManager::RemoveVertexBuffer( Render::Geometry* geometry, Render::PropertyBuffer* propertyBuffer )
+void UpdateManager::RemoveVertexBuffer( Render::Geometry* geometry, Render::VertexBuffer* vertexBuffer )
{
- typedef MessageValue2< RenderManager, Render::Geometry*, Render::PropertyBuffer* > DerivedType;
+ typedef MessageValue2< RenderManager, Render::Geometry*, Render::VertexBuffer* > DerivedType;
// Reserve some memory inside the render queue
uint32_t* slot = mImpl->renderQueue.ReserveMessageSlot( mSceneGraphBuffers.GetUpdateBufferIndex(), sizeof( DerivedType ) );
// Construct message in the render queue memory; note that delete should not be called on the return value
- new (slot) DerivedType( &mImpl->renderManager, &RenderManager::RemoveVertexBuffer, geometry, propertyBuffer );
+ new (slot) DerivedType( &mImpl->renderManager, &RenderManager::RemoveVertexBuffer, geometry, vertexBuffer );
}
-void UpdateManager::AttachVertexBuffer( Render::Geometry* geometry, Render::PropertyBuffer* propertyBuffer )
+void UpdateManager::AttachVertexBuffer( Render::Geometry* geometry, Render::VertexBuffer* vertexBuffer )
{
- typedef MessageValue2< RenderManager, Render::Geometry*, Render::PropertyBuffer* > DerivedType;
+ typedef MessageValue2< RenderManager, Render::Geometry*, Render::VertexBuffer* > DerivedType;
// Reserve some memory inside the render queue
uint32_t* slot = mImpl->renderQueue.ReserveMessageSlot( mSceneGraphBuffers.GetUpdateBufferIndex(), sizeof( DerivedType ) );
// Construct message in the render queue memory; note that delete should not be called on the return value
- new (slot) DerivedType( &mImpl->renderManager, &RenderManager::AttachVertexBuffer, geometry, propertyBuffer );
+ new (slot) DerivedType( &mImpl->renderManager, &RenderManager::AttachVertexBuffer, geometry, vertexBuffer );
}
void UpdateManager::AddTexture( OwnerPointer< Render::Texture >& texture )
#include <dali/internal/update/render-tasks/scene-graph-camera.h>
#include <dali/internal/update/render-tasks/scene-graph-render-task-list.h>
#include <dali/internal/render/shaders/scene-graph-shader.h> // for OwnerPointer< Shader >
-#include <dali/internal/render/renderers/render-property-buffer.h>
+#include <dali/internal/render/renderers/render-vertex-buffer.h>
#include <dali/internal/event/rendering/texture-impl.h>
namespace Dali
class RenderTaskList;
class RenderTaskProcessor;
class RenderQueue;
-class PropertyBuffer;
+class VertexBuffer;
struct NodeDepthPair
{
* @post Sends a message to RenderManager to add the property buffer.
* The property buffer will be owned by RenderManager
*/
- void AddPropertyBuffer( OwnerPointer< Render::PropertyBuffer >& propertryBuffer );
+ void AddVertexBuffer( OwnerPointer< Render::VertexBuffer >& propertryBuffer );
/**
- * Removes an existing PropertyBuffer from RenderManager
+ * Removes an existing VertexBuffer from RenderManager
* @param[in] propertryBuffer The property buffer to remove
* @post The property buffer will be destroyed in the render thread
*/
- void RemovePropertyBuffer( Render::PropertyBuffer* propertryBuffer );
+ void RemoveVertexBuffer( Render::VertexBuffer* propertryBuffer );
/**
* Sets the format of an existing property buffer
- * @param[in] propertyBuffer The property buffer.
+ * @param[in] vertexBuffer The property buffer.
* @param[in] format The new format of the buffer
* @post Sends a message to RenderManager to set the new format to the property buffer.
*/
- void SetPropertyBufferFormat( Render::PropertyBuffer* propertyBuffer, OwnerPointer< Render::PropertyBuffer::Format>& format );
+ void SetVertexBufferFormat( Render::VertexBuffer* vertexBuffer, OwnerPointer< Render::VertexBuffer::Format>& format );
/**
* Sets the data of an existing property buffer
- * @param[in] propertyBuffer The property buffer.
+ * @param[in] vertexBuffer The property buffer.
* @param[in] data The new data of the buffer
* @param[in] size The new size of the buffer
* @post Sends a message to RenderManager to set the new data to the property buffer.
*/
- void SetPropertyBufferData( Render::PropertyBuffer* propertyBuffer, OwnerPointer< Vector<uint8_t> >& data, uint32_t size );
+ void SetVertexBufferData( Render::VertexBuffer* vertexBuffer, OwnerPointer< Vector<uint8_t> >& data, uint32_t size );
/**
* Adds a geometry to the RenderManager
/**
* Adds a vertex buffer to a geometry
* @param[in] geometry The geometry
- * @param[in] propertyBuffer The property buffer
+ * @param[in] vertexBuffer The property buffer
*/
- void AttachVertexBuffer( Render::Geometry* geometry, Render::PropertyBuffer* propertyBuffer );
+ void AttachVertexBuffer( Render::Geometry* geometry, Render::VertexBuffer* vertexBuffer );
/**
* Removes a vertex buffer from a geometry
* @param[in] geometry The geometry
- * @param[in] propertyBuffer The property buffer
+ * @param[in] vertexBuffer The property buffer
*/
- void RemoveVertexBuffer( Render::Geometry* geometry, Render::PropertyBuffer* propertyBuffer );
+ void RemoveVertexBuffer( Render::Geometry* geometry, Render::VertexBuffer* vertexBuffer );
/**
* Adds a texture to the render manager
new (slot) LocalType( &manager, &UpdateManager::SetWrapMode, &sampler, rWrapMode, sWrapMode, tWrapMode );
}
-inline void AddPropertyBuffer( UpdateManager& manager, OwnerPointer< Render::PropertyBuffer >& propertyBuffer )
+inline void AddVertexBuffer( UpdateManager& manager, OwnerPointer< Render::VertexBuffer >& vertexBuffer )
{
- // Message has ownership of propertyBuffer while in transit from event -> update
- typedef MessageValue1< UpdateManager, OwnerPointer< Render::PropertyBuffer > > LocalType;
+ // Message has ownership of vertexBuffer while in transit from event -> update
+ typedef MessageValue1< UpdateManager, OwnerPointer< Render::VertexBuffer > > LocalType;
// Reserve some memory inside the message queue
uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
// Construct message in the message queue memory; note that delete should not be called on the return value
- new (slot) LocalType( &manager, &UpdateManager::AddPropertyBuffer, propertyBuffer );
+ new (slot) LocalType( &manager, &UpdateManager::AddVertexBuffer, vertexBuffer );
}
-inline void RemovePropertyBuffer( UpdateManager& manager, Render::PropertyBuffer& propertyBuffer )
+inline void RemoveVertexBuffer( UpdateManager& manager, Render::VertexBuffer& vertexBuffer )
{
- typedef MessageValue1< UpdateManager, Render::PropertyBuffer* > LocalType;
+ typedef MessageValue1< UpdateManager, Render::VertexBuffer* > LocalType;
// Reserve some memory inside the message queue
uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
// Construct message in the message queue memory; note that delete should not be called on the return value
- new (slot) LocalType( &manager, &UpdateManager::RemovePropertyBuffer, &propertyBuffer );
+ new (slot) LocalType( &manager, &UpdateManager::RemoveVertexBuffer, &vertexBuffer );
}
-inline void SetPropertyBufferFormat( UpdateManager& manager, Render::PropertyBuffer& propertyBuffer, OwnerPointer< Render::PropertyBuffer::Format>& format )
+inline void SetVertexBufferFormat( UpdateManager& manager, Render::VertexBuffer& vertexBuffer, OwnerPointer< Render::VertexBuffer::Format>& format )
{
- // Message has ownership of PropertyBuffer::Format while in transit from event -> update
- typedef MessageValue2< UpdateManager, Render::PropertyBuffer*, OwnerPointer< Render::PropertyBuffer::Format> > LocalType;
+ // Message has ownership of VertexBuffer::Format while in transit from event -> update
+ typedef MessageValue2< UpdateManager, Render::VertexBuffer*, OwnerPointer< Render::VertexBuffer::Format> > LocalType;
// Reserve some memory inside the message queue
uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
// Construct message in the message queue memory; note that delete should not be called on the return value
- new (slot) LocalType( &manager, &UpdateManager::SetPropertyBufferFormat, &propertyBuffer, format );
+ new (slot) LocalType( &manager, &UpdateManager::SetVertexBufferFormat, &vertexBuffer, format );
}
-inline void SetPropertyBufferData( UpdateManager& manager, Render::PropertyBuffer& propertyBuffer, OwnerPointer< Vector<uint8_t> >& data, uint32_t size )
+inline void SetVertexBufferData( UpdateManager& manager, Render::VertexBuffer& vertexBuffer, OwnerPointer< Vector<uint8_t> >& data, uint32_t size )
{
- // Message has ownership of PropertyBuffer data while in transit from event -> update
- typedef MessageValue3< UpdateManager, Render::PropertyBuffer*, OwnerPointer< Vector<uint8_t> >, uint32_t > LocalType;
+ // Message has ownership of VertexBuffer data while in transit from event -> update
+ typedef MessageValue3< UpdateManager, Render::VertexBuffer*, OwnerPointer< Vector<uint8_t> >, uint32_t > LocalType;
// Reserve some memory inside the message queue
uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
// Construct message in the message queue memory; note that delete should not be called on the return value
- new (slot) LocalType( &manager, &UpdateManager::SetPropertyBufferData, &propertyBuffer, data, size );
+ new (slot) LocalType( &manager, &UpdateManager::SetVertexBufferData, &vertexBuffer, data, size );
}
inline void AddGeometry( UpdateManager& manager, OwnerPointer< Render::Geometry >& geometry )
new (slot) LocalType( &manager, &UpdateManager::RemoveGeometry, &geometry );
}
-inline void AttachVertexBufferMessage( UpdateManager& manager, Render::Geometry& geometry, const Render::PropertyBuffer& vertexBuffer )
+inline void AttachVertexBufferMessage( UpdateManager& manager, Render::Geometry& geometry, const Render::VertexBuffer& vertexBuffer )
{
- typedef MessageValue2< UpdateManager, Render::Geometry*, Render::PropertyBuffer* > LocalType;
+ typedef MessageValue2< UpdateManager, Render::Geometry*, Render::VertexBuffer* > LocalType;
// Reserve some memory inside the message queue
uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
// Construct message in the message queue memory; note that delete should not be called on the return value
- new (slot) LocalType( &manager, &UpdateManager::AttachVertexBuffer, &geometry, const_cast<Render::PropertyBuffer*>(&vertexBuffer) );
+ new (slot) LocalType( &manager, &UpdateManager::AttachVertexBuffer, &geometry, const_cast<Render::VertexBuffer*>(&vertexBuffer) );
}
-inline void RemoveVertexBufferMessage( UpdateManager& manager, Render::Geometry& geometry, const Render::PropertyBuffer& vertexBuffer )
+inline void RemoveVertexBufferMessage( UpdateManager& manager, Render::Geometry& geometry, const Render::VertexBuffer& vertexBuffer )
{
- typedef MessageValue2< UpdateManager, Render::Geometry*, Render::PropertyBuffer* > LocalType;
+ typedef MessageValue2< UpdateManager, Render::Geometry*, Render::VertexBuffer* > LocalType;
// Reserve some memory inside the message queue
uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
// Construct message in the message queue memory; note that delete should not be called on the return value
- new (slot) LocalType( &manager, &UpdateManager::RemoveVertexBuffer, &geometry, const_cast<Render::PropertyBuffer*>(&vertexBuffer) );
+ new (slot) LocalType( &manager, &UpdateManager::RemoveVertexBuffer, &geometry, const_cast<Render::VertexBuffer*>(&vertexBuffer) );
}
// Custom message type for SetIndexBuffer() used to move data with Vector::Swap()
#include <dali/public-api/rendering/frame-buffer.h>
#include <dali/public-api/rendering/geometry.h>
-#include <dali/public-api/rendering/property-buffer.h>
#include <dali/public-api/rendering/renderer.h>
#include <dali/public-api/rendering/sampler.h>
#include <dali/public-api/rendering/shader.h>
#include <dali/public-api/rendering/texture.h>
#include <dali/public-api/rendering/texture-set.h>
+#include <dali/public-api/rendering/vertex-buffer.h>
#include <dali/public-api/signals/base-signal.h>
#include <dali/public-api/signals/callback.h>
${public_api_src_dir}/render-tasks/render-task-list.cpp
${public_api_src_dir}/rendering/frame-buffer.cpp
${public_api_src_dir}/rendering/geometry.cpp
- ${public_api_src_dir}/rendering/property-buffer.cpp
+ ${public_api_src_dir}/rendering/vertex-buffer.cpp
${public_api_src_dir}/rendering/texture.cpp
${public_api_src_dir}/rendering/texture-set.cpp
${public_api_src_dir}/rendering/renderer.cpp
SET( public_api_core_rendering_header_files
${public_api_src_dir}/rendering/frame-buffer.h
${public_api_src_dir}/rendering/geometry.h
- ${public_api_src_dir}/rendering/property-buffer.h
+ ${public_api_src_dir}/rendering/vertex-buffer.h
${public_api_src_dir}/rendering/texture.h
${public_api_src_dir}/rendering/texture-set.h
${public_api_src_dir}/rendering/renderer.h
Geometry& Geometry::operator=( Geometry&& rhs ) = default;
-std::size_t Geometry::AddVertexBuffer( PropertyBuffer& vertexBuffer )
+std::size_t Geometry::AddVertexBuffer( VertexBuffer& vertexBuffer )
{
DALI_ASSERT_ALWAYS( vertexBuffer && "VertexBuffer is not initialized ");
return GetImplementation(*this).AddVertexBuffer( GetImplementation( vertexBuffer ) );
// INTERNAL INCLUDES
#include <dali/public-api/object/handle.h> // Dali::Handle
#include <dali/public-api/object/property-index-ranges.h> // DEFAULT_DERIVED_HANDLE_PROPERTY_START_INDEX
-#include <dali/public-api/rendering/property-buffer.h> // Dali::PropertyBuffer
+#include <dali/public-api/rendering/vertex-buffer.h> // Dali::VertexBuffer
namespace Dali
{
Geometry& operator=( Geometry&& rhs );
/**
- * @brief Adds a PropertyBuffer to be used as source of geometry vertices.
+ * @brief Adds a VertexBuffer to be used as source of geometry vertices.
*
- * @SINCE_1_1.43
- * @param[in] vertexBuffer PropertyBuffer to be used as source of geometry vertices
+ * @SINCE_1_9.27
+ * @param[in] vertexBuffer VertexBuffer to be used as source of geometry vertices
* @return Index of the newly added buffer, can be used with RemoveVertexBuffer to remove
* this buffer if no longer required
*/
- std::size_t AddVertexBuffer( PropertyBuffer& vertexBuffer );
+ std::size_t AddVertexBuffer( VertexBuffer& vertexBuffer );
/**
* @brief Retrieves the number of vertex buffers that have been added to this geometry.
*
- * @SINCE_1_1.43
+ * @SINCE_1_9.27
* @return Number of vertex buffers that have been added to this geometry
*/
std::size_t GetNumberOfVertexBuffers() const;
* @brief Removes a vertex buffer.
* The index must be between 0 and GetNumberOfVertexBuffers().
*
- * @SINCE_1_1.43
+ * @SINCE_1_9.27
* @param[in] index Index to the vertex buffer to remove
*/
void RemoveVertexBuffer( std::size_t index );
+++ /dev/null
-/*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-// CLASS HEADER
-#include <dali/public-api/rendering/property-buffer.h>
-
-// INTERNAL INCLUDES
-#include <dali/public-api/object/property-map.h> // Dali::Property::Map
-#include <dali/internal/event/common/property-buffer-impl.h> // Dali::Internal::PropertyBuffer
-
-namespace Dali
-{
-
-PropertyBuffer PropertyBuffer::New( Dali::Property::Map& bufferFormat )
-{
- Internal::PropertyBufferPtr propertyBuffer = Internal::PropertyBuffer::New( bufferFormat );
-
- return PropertyBuffer( propertyBuffer.Get() );
-}
-
-PropertyBuffer::PropertyBuffer()
-{
-}
-
-PropertyBuffer::~PropertyBuffer()
-{
-}
-
-PropertyBuffer::PropertyBuffer( const PropertyBuffer& handle ) = default;
-
-PropertyBuffer PropertyBuffer::DownCast( BaseHandle handle )
-{
- return PropertyBuffer( dynamic_cast<Dali::Internal::PropertyBuffer*>(handle.GetObjectPtr()));
-}
-
-PropertyBuffer& PropertyBuffer::operator=( const PropertyBuffer& handle ) = default;
-
-PropertyBuffer::PropertyBuffer( PropertyBuffer&& rhs ) = default;
-
-PropertyBuffer& PropertyBuffer::operator=( PropertyBuffer&& rhs ) = default;
-
-void PropertyBuffer::SetData( const void* data, std::size_t size )
-{
- GetImplementation(*this).SetData( data, static_cast<uint32_t>( size ) ); // only support 4,294,967,295 bytes
-}
-
-std::size_t PropertyBuffer::GetSize() const
-{
- return GetImplementation(*this).GetSize();
-}
-
-
-PropertyBuffer::PropertyBuffer( Internal::PropertyBuffer* pointer )
-: BaseHandle( pointer )
-{
-}
-
-} // namespace Dali
--- /dev/null
+/*
+ * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+// CLASS HEADER
+#include <dali/public-api/rendering/vertex-buffer.h>
+
+// INTERNAL INCLUDES
+#include <dali/public-api/object/property-map.h> // Dali::Property::Map
+#include <dali/internal/event/rendering/vertex-buffer-impl.h> // Dali::Internal::VertexBuffer
+
+namespace Dali
+{
+
+VertexBuffer VertexBuffer::New( Dali::Property::Map& bufferFormat )
+{
+ Internal::VertexBufferPtr vertexBuffer = Internal::VertexBuffer::New( bufferFormat );
+
+ return VertexBuffer( vertexBuffer.Get() );
+}
+
+VertexBuffer::VertexBuffer()
+{
+}
+
+VertexBuffer::~VertexBuffer()
+{
+}
+
+VertexBuffer::VertexBuffer( const VertexBuffer& handle ) = default;
+
+VertexBuffer VertexBuffer::DownCast( BaseHandle handle )
+{
+ return VertexBuffer( dynamic_cast<Dali::Internal::VertexBuffer*>(handle.GetObjectPtr()));
+}
+
+VertexBuffer& VertexBuffer::operator=( const VertexBuffer& handle ) = default;
+
+VertexBuffer::VertexBuffer( VertexBuffer&& rhs ) = default;
+
+VertexBuffer& VertexBuffer::operator=( VertexBuffer&& rhs ) = default;
+
+void VertexBuffer::SetData( const void* data, std::size_t size )
+{
+ GetImplementation(*this).SetData( data, static_cast<uint32_t>( size ) ); // only support 4,294,967,295 bytes
+}
+
+std::size_t VertexBuffer::GetSize() const
+{
+ return GetImplementation(*this).GetSize();
+}
+
+
+VertexBuffer::VertexBuffer( Internal::VertexBuffer* pointer )
+: BaseHandle( pointer )
+{
+}
+
+} // namespace Dali
-#ifndef DALI_PROPERTY_BUFFER_H
-#define DALI_PROPERTY_BUFFER_H
+#ifndef DALI_VERTEX_BUFFER_H
+#define DALI_VERTEX_BUFFER_H
/*
* Copyright (c) 2020 Samsung Electronics Co., Ltd.
namespace Internal DALI_INTERNAL
{
-class PropertyBuffer;
+class VertexBuffer;
}
/**
- * @brief PropertyBuffer is a handle to an object that contains a buffer of structured properties.
+ * @brief VertexBuffer is a handle to an object that contains a buffer of structured data.
*
- * PropertyBuffers can be used to provide data to Geometry objects.
+ * VertexBuffers can be used to provide data to Geometry objects.
*
* Example:
*
* Property::Map texturedQuadVertexFormat;
* texturedQuadVertexFormat["aPosition"] = Property::VECTOR2;
* texturedQuadVertexFormat["aTexCoord"] = Property::VECTOR2;
- * PropertyBuffer texturedQuadVertices = PropertyBuffer::New( texturedQuadVertexFormat );
+ * VertexBuffer texturedQuadVertices = VertexBuffer::New( texturedQuadVertexFormat );
* texturedQuadVertices.SetData( texturedQuadVertexData, 4 );
*
* // Create indices
*
* @SINCE_1_1.43
*/
-class DALI_CORE_API PropertyBuffer : public BaseHandle
+class DALI_CORE_API VertexBuffer : public BaseHandle
{
public:
/**
- * @brief Creates a PropertyBuffer.
- * Static property buffers use less memory.
+ * @brief Creates a VertexBuffer.
*
- * @SINCE_1_1.43
+ * @SINCE_1_9.27
* @param[in] bufferFormat Map of names and types that describes the components of the buffer
- * @return Handle to a newly allocated PropertyBuffer
+ * @return Handle to a newly allocated VertexBuffer
*/
- static PropertyBuffer New( Dali::Property::Map& bufferFormat );
+ static VertexBuffer New( Dali::Property::Map& bufferFormat );
/**
* @brief Default constructor, creates an empty handle.
*
- * @SINCE_1_1.43
+ * @SINCE_1_9.27
*/
- PropertyBuffer();
+ VertexBuffer();
/**
* @brief Destructor.
*
- * @SINCE_1_1.43
+ * @SINCE_1_9.27
*/
- ~PropertyBuffer();
+ ~VertexBuffer();
/**
* @brief Copy constructor, creates a new handle to the same object.
*
- * @SINCE_1_1.43
+ * @SINCE_1_9.27
* @param[in] handle Handle to an object
*/
- PropertyBuffer( const PropertyBuffer& handle );
+ VertexBuffer( const VertexBuffer& handle );
/**
* @brief Downcasts to a property buffer handle.
* If not, a property buffer the returned property buffer handle is left uninitialized.
*
- * @SINCE_1_1.43
+ * @SINCE_1_9.27
* @param[in] handle Handle to an object
* @return Property buffer handle or an uninitialized handle
*/
- static PropertyBuffer DownCast( BaseHandle handle );
+ static VertexBuffer DownCast( BaseHandle handle );
/**
* @brief Assignment operator, changes this handle to point at the same object.
*
- * @SINCE_1_1.43
+ * @SINCE_1_9.27
* @param[in] handle Handle to an object
* @return Reference to the assigned object
*/
- PropertyBuffer& operator=( const PropertyBuffer& handle );
+ VertexBuffer& operator=( const VertexBuffer& handle );
/**
* @brief Move constructor.
*
- * @SINCE_1_9.22
+ * @SINCE_1_9.27
* @param[in] rhs A reference to the moved handle
*/
- PropertyBuffer( PropertyBuffer&& rhs );
+ VertexBuffer( VertexBuffer&& rhs );
/**
* @brief Move assignment operator.
*
- * @SINCE_1_9.22
+ * @SINCE_1_9.27
* @param[in] rhs A reference to the moved handle
* @return A reference to this handle
*/
- PropertyBuffer& operator=( PropertyBuffer&& rhs );
+ VertexBuffer& operator=( VertexBuffer&& rhs );
/**
* @brief Updates the whole buffer information.
* Dali::Vector2 uv;
* };
* Vertex vertices[ 10 ] = { ... };
- * propertyBuffer.SetData( vertices );
+ * vertexBuffer.SetData( vertices );
* </pre>
*
- * @SINCE_1_1.43
+ * @SINCE_1_9.27
* @param[in] data A pointer to the data that will be copied to the buffer
* @param[in] size Number of elements to expand or contract the buffer
*/
/**
* @brief Gets the number of elements in the buffer.
*
- * @SINCE_1_1.43
+ * @SINCE_1_9.27
* @return Number of elements to expand or contract the buffer
*/
std::size_t GetSize() const;
/**
* @brief The constructor.
* @note Not intended for application developers.
- * @SINCE_1_1.43
- * @param[in] pointer A pointer to a newly allocated PropertyBuffer
+ * @SINCE_1_9.27
+ * @param[in] pointer A pointer to a newly allocated VertexBuffer
*/
- explicit DALI_INTERNAL PropertyBuffer( Internal::PropertyBuffer* pointer );
+ explicit DALI_INTERNAL VertexBuffer( Internal::VertexBuffer* pointer );
};
/**
*/
} // namespace Dali
-#endif // DALI_PROPERTY_BUFFER_H
+#endif // DALI_VERTEX_BUFFER_H