vertexFormat[aPosition] = Property::VECTOR2;
vertexFormat[aTexCoord] = Property::VECTOR2;
- PropertyBuffer vertexData = PropertyBuffer::New( vertexFormat, 4 );
- vertexData.SetData(texturedQuadVertexData);
+ PropertyBuffer vertexData = PropertyBuffer::New( vertexFormat );
+ vertexData.SetData( texturedQuadVertexData, 4 );
return vertexData;
}
Property::Map indexFormat;
indexFormat["indices"] = Property::INTEGER;
- PropertyBuffer indices = PropertyBuffer::New( indexFormat, numberElements );
- indices.SetData(indexData);
+ PropertyBuffer indices = PropertyBuffer::New( indexFormat );
+ indices.SetData( indexData, numberElements );
return indices;
}
texturedQuadVertexFormat["aPosition"] = Property::VECTOR2;
texturedQuadVertexFormat["aVertexCoord"] = Property::VECTOR2;
- PropertyBuffer propertyBuffer = PropertyBuffer::New( texturedQuadVertexFormat, 4 );
+ PropertyBuffer propertyBuffer = PropertyBuffer::New( texturedQuadVertexFormat );
DALI_TEST_EQUALS( (bool)propertyBuffer, true, TEST_LOCATION );
END_TEST;
texturedQuadVertexFormat["aPosition"] = Property::VECTOR2;
texturedQuadVertexFormat["aVertexCoord"] = Property::VECTOR2;
- PropertyBuffer propertyBuffer = PropertyBuffer::New( texturedQuadVertexFormat, 4 );
+ PropertyBuffer propertyBuffer = PropertyBuffer::New( texturedQuadVertexFormat );
BaseHandle handle(propertyBuffer);
PropertyBuffer propertyBuffer2 = PropertyBuffer::DownCast(handle);
PropertyBuffer propertyBufferCopy(propertyBuffer);
DALI_TEST_EQUALS( (bool)propertyBufferCopy, true, TEST_LOCATION );
- DALI_TEST_EQUALS( propertyBufferCopy.GetSize(), 4u, TEST_LOCATION );
+ DALI_TEST_EQUALS( propertyBufferCopy.GetSize(), 0u, TEST_LOCATION );
END_TEST;
}
propertyBuffer2 = propertyBuffer;
DALI_TEST_EQUALS( (bool)propertyBuffer2, true, TEST_LOCATION );
- DALI_TEST_EQUALS( propertyBuffer2.GetSize(), 4u, TEST_LOCATION );
+ DALI_TEST_EQUALS( propertyBuffer2.GetSize(), 0u, TEST_LOCATION );
END_TEST;
}
texturedQuadVertexFormat["aPosition"] = Property::VECTOR2;
texturedQuadVertexFormat["aVertexCoord"] = Property::VECTOR2;
- PropertyBuffer propertyBuffer = PropertyBuffer::New( texturedQuadVertexFormat, 4 );
+ PropertyBuffer propertyBuffer = PropertyBuffer::New( texturedQuadVertexFormat );
DALI_TEST_EQUALS( (bool)propertyBuffer, true, TEST_LOCATION );
const float halfQuadSize = .5f;
{ Vector2(-halfQuadSize, halfQuadSize), Vector2(0.f, 1.f) },
{ Vector2( halfQuadSize, halfQuadSize), Vector2(1.f, 1.f) } };
- propertyBuffer.SetData( texturedQuadVertexData );
+ propertyBuffer.SetData( texturedQuadVertexData, 4 );
Geometry geometry = Geometry::New();
geometry.AddVertexBuffer( propertyBuffer );
texturedQuadVertexFormat["aPosition"] = Property::VECTOR2;
texturedQuadVertexFormat["aVertexCoord"] = Property::VECTOR2;
- PropertyBuffer propertyBuffer = PropertyBuffer::New( texturedQuadVertexFormat, 4 );
+ PropertyBuffer propertyBuffer = PropertyBuffer::New( texturedQuadVertexFormat );
DALI_TEST_EQUALS( (bool)propertyBuffer, true, TEST_LOCATION );
const float halfQuadSize = .5f;
{ Vector2(-halfQuadSize, halfQuadSize), Vector2(0.f, 1.f) },
{ Vector2( halfQuadSize, halfQuadSize), Vector2(1.f, 1.f) } };
- propertyBuffer.SetData( texturedQuadVertexData );
+ propertyBuffer.SetData( texturedQuadVertexData, 4 );
Geometry geometry = Geometry::New();
geometry.AddVertexBuffer( propertyBuffer );
}
// Re-upload the data on the propertyBuffer
- propertyBuffer.SetData( texturedQuadVertexData );
+ propertyBuffer.SetData( texturedQuadVertexData, 4 );
application.SendNotification();
application.Render(0);
END_TEST;
}
-
-int UtcDaliPropertyBufferSetGetSize01(void)
-{
- TestApplication application;
-
- Property::Map texturedQuadVertexFormat;
- texturedQuadVertexFormat["aPosition"] = Property::VECTOR2;
- texturedQuadVertexFormat["aVertexCoord"] = Property::VECTOR2;
-
- PropertyBuffer propertyBuffer = PropertyBuffer::New( texturedQuadVertexFormat, 4u );
- DALI_TEST_EQUALS( (bool)propertyBuffer, true, TEST_LOCATION );
-
- size_t size = propertyBuffer.GetSize();
- DALI_TEST_EQUALS( size, 4u, TEST_LOCATION );
-
- propertyBuffer.SetSize( 10u );
- size = propertyBuffer.GetSize();
- DALI_TEST_EQUALS( size, 10u, TEST_LOCATION );
-
- END_TEST;
-}
-
-//Todo: also test that the SetSize function is equivalent to setting the property SIZE
-int UtcDaliPropertyBufferSetGetSize02(void)
-{
- TestApplication application;
-
- Property::Map texturedQuadVertexFormat;
- texturedQuadVertexFormat["aPosition"] = Property::VECTOR2;
- texturedQuadVertexFormat["aVertexCoord"] = Property::VECTOR2;
-
- std::size_t size = 5u;
- PropertyBuffer propertyBuffer = PropertyBuffer::New( texturedQuadVertexFormat, size );
- DALI_TEST_EQUALS( propertyBuffer.GetSize(), size, TEST_LOCATION );
- DALI_TEST_EQUALS( propertyBuffer.GetSize(), size, TEST_LOCATION );
-
- size += 3u;
- propertyBuffer.SetSize( size );
- DALI_TEST_EQUALS( propertyBuffer.GetSize(), size, TEST_LOCATION );
- DALI_TEST_EQUALS( propertyBuffer.GetSize(), size, TEST_LOCATION );
-
- size += 2u;
- propertyBuffer.SetSize( size );
- DALI_TEST_EQUALS( propertyBuffer.GetSize(), size, TEST_LOCATION );
-
- END_TEST;
-}
-
Property::Map texturedQuadVertexFormat;
texturedQuadVertexFormat["aPosition"] = Property::VECTOR2;
texturedQuadVertexFormat["aTexCoord"] = Property::VECTOR2;
- PropertyBuffer texturedQuadVertices = PropertyBuffer::New( texturedQuadVertexFormat, 4 );
- texturedQuadVertices.SetData(texturedQuadVertexData);
+ PropertyBuffer texturedQuadVertices = PropertyBuffer::New( texturedQuadVertexFormat );
+ texturedQuadVertices.SetData( texturedQuadVertexData, 4 );
// Create indices
unsigned int indexData[6] = { 0, 3, 1, 0, 2, 3 };
Property::Map indexFormat;
indexFormat["indices"] = Property::INTEGER;
- PropertyBuffer indices = PropertyBuffer::New( indexFormat, sizeof(indexData)/sizeof(indexData[0]) );
- indices.SetData(indexData);
+ PropertyBuffer indices = PropertyBuffer::New( indexFormat );
+ indices.SetData( indexData, sizeof(indexData)/sizeof(indexData[0]) );
// Create the geometry object
Geometry texturedQuadGeometry = Geometry::New();
texturedQuadVertexFormat["aPosition"] = Property::VECTOR2;
texturedQuadVertexFormat["aVertexCoord"] = Property::VECTOR2;
- PropertyBuffer vertexData = PropertyBuffer::New( texturedQuadVertexFormat, 4 );
+ PropertyBuffer vertexData = PropertyBuffer::New( texturedQuadVertexFormat );
return vertexData;
}
{ Vector2( halfQuadSize, -halfQuadSize), Vector2(1.f, 0.f) },
{ Vector2(-halfQuadSize, halfQuadSize), Vector2(0.f, 1.f) },
{ Vector2( halfQuadSize, halfQuadSize), Vector2(1.f, 1.f) } };
- vertexData.SetData(texturedQuadVertexData);
+ vertexData.SetData(texturedQuadVertexData, 4);
unsigned int indexData[6] = { 0, 3, 1, 0, 2, 3 };
Property::Map indexFormat;
indexFormat["indices"] = Property::INTEGER;
- PropertyBuffer indices = PropertyBuffer::New( indexFormat, sizeof(indexData)/sizeof(indexData[0]) );
- indices.SetData(indexData);
+ PropertyBuffer indices = PropertyBuffer::New( indexFormat );
+ indices.SetData( indexData, sizeof(indexData)/sizeof(indexData[0]) );
Geometry geometry = Geometry::New();
geometry.AddVertexBuffer( vertexData );
namespace Dali
{
-PropertyBuffer PropertyBuffer::New( Dali::Property::Map& bufferFormat, std::size_t size )
+PropertyBuffer PropertyBuffer::New( Dali::Property::Map& bufferFormat )
{
- Internal::PropertyBufferPtr propertyBuffer = Internal::PropertyBuffer::New();
-
- propertyBuffer->SetFormat( bufferFormat );
- propertyBuffer->SetSize( size );
+ Internal::PropertyBufferPtr propertyBuffer = Internal::PropertyBuffer::New( bufferFormat );
return PropertyBuffer( propertyBuffer.Get() );
}
return *this;
}
-void PropertyBuffer::SetSize( std::size_t size )
+void PropertyBuffer::SetData( const void* data, std::size_t size )
{
- GetImplementation(*this).SetSize( size );
+ GetImplementation(*this).SetData( data, size );
}
std::size_t PropertyBuffer::GetSize() const
return GetImplementation(*this).GetSize();
}
-void PropertyBuffer::SetData( const void* data )
-{
- GetImplementation(*this).SetData( data );
-}
PropertyBuffer::PropertyBuffer( Internal::PropertyBuffer* pointer )
: BaseHandle( pointer )
* Property::Map texturedQuadVertexFormat;
* texturedQuadVertexFormat["aPosition"] = Property::VECTOR2;
* texturedQuadVertexFormat["aTexCoord"] = Property::VECTOR2;
- * PropertyBuffer texturedQuadVertices = PropertyBuffer::New( texturedQuadVertexFormat, 4 );
- * texturedQuadVertices.SetData(texturedQuadVertexData);
+ * PropertyBuffer texturedQuadVertices = PropertyBuffer::New( texturedQuadVertexFormat );
+ * texturedQuadVertices.SetData( texturedQuadVertexData, 4 );
*
* // Create indices
* unsigned int indexData[6] = { 0, 3, 1, 0, 2, 3 };
* Property::Map indexFormat;
* indexFormat["indices"] = Property::INTEGER;
- * PropertyBuffer indices = PropertyBuffer::New( indexFormat, 6 );
- * indices.SetData(indexData);
+ * PropertyBuffer indices = PropertyBuffer::New( indexFormat );
+ * indices.SetData( indexData, 6 );
*
* // Create the geometry object
* Geometry texturedQuadGeometry = Geometry::New();
* @param[in] size The number of elements in the property buffer
* @return Handle to a newly allocated PropertyBuffer
*/
- static PropertyBuffer New( Dali::Property::Map& bufferFormat, std::size_t size );
+ static PropertyBuffer New( Dali::Property::Map& bufferFormat );
/**
* @brief Default constructor, creates an empty handle
PropertyBuffer& operator=( const PropertyBuffer& handle );
/**
- * @brief Set the number of elements in the buffer
- *
- * Calling this function is equivalent to setting the property SIZE
- *
- * @param[in] size Number of elements to expand or contract the buffer
- */
- void SetSize( std::size_t size );
-
- /**
- * @brief Get the number of elements in the buffer
- *
- * @return Number of elements to expand or contract the buffer
- */
- std::size_t GetSize() const;
-
- /**
* @brief Update the whole buffer information
*
* This function expects a pointer to an array of structures with the same
* </pre>
*
* @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.
*/
- void SetData( const void* data );
+ void SetData( const void* data, std::size_t size );
+
+ /**
+ * @brief Get the number of elements in the buffer
+ *
+ * @return Number of elements to expand or contract the buffer
+ */
+ std::size_t GetSize() const;
public:
/**
}
}
-
Property::Map vertexFormat;
vertexFormat[ "aPosition" ] = Property::VECTOR3;
vertexFormat[ "aTexCoord" ] = Property::VECTOR2;
- PropertyBufferPtr vertexPropertyBuffer = PropertyBuffer::New();
- vertexPropertyBuffer->SetFormat( vertexFormat );
- vertexPropertyBuffer->SetSize( vertices.size() );
+ PropertyBufferPtr vertexPropertyBuffer = PropertyBuffer::New( vertexFormat );
if( vertices.size() > 0 )
{
- vertexPropertyBuffer->SetData( &vertices[ 0 ] );
+ vertexPropertyBuffer->SetData( &vertices[ 0 ], vertices.size() );
}
Property::Map indexFormat;
indexFormat[ "indices" ] = Property::INTEGER;
- PropertyBufferPtr indexPropertyBuffer = PropertyBuffer::New();
- indexPropertyBuffer->SetFormat( indexFormat );
- indexPropertyBuffer->SetSize( indices.Size() );
+ PropertyBufferPtr indexPropertyBuffer = PropertyBuffer::New( indexFormat );
if( indices.Size() > 0 )
{
- indexPropertyBuffer->SetData( &indices[ 0 ] );
+ indexPropertyBuffer->SetData( &indices[ 0 ], indices.Size() );
}
// Create the geometry object
geometry->SetGeometryType( Dali::Geometry::TRIANGLE_STRIP );
return geometry;
-
}
const char* VERTEX_SHADER = DALI_COMPOSE_SHADER(
*/
// CLASS HEADER
-#include <dali/internal/event/common/property-buffer-impl.h> // Dali::Internal::PropertyBuffer
-
-// EXTERNAL INCLUDE
-#include <algorithm> // std::sort
+#include <dali/internal/event/common/property-buffer-impl.h>
// INTERNAL INCLUDES
-#include <dali/devel-api/object/property-buffer.h> // Dali::Internal::PropertyBuffer
+#include <dali/devel-api/object/property-buffer.h>
#include <dali/internal/event/common/stage-impl.h>
#include <dali/internal/update/manager/update-manager.h>
} // unnamed namespace
-PropertyBufferPtr PropertyBuffer::New()
+PropertyBufferPtr PropertyBuffer::New( Dali::Property::Map& format )
{
+ DALI_ASSERT_ALWAYS( format.Count() && "Format cannot be empty." );
+
PropertyBufferPtr propertyBuffer( new PropertyBuffer() );
- propertyBuffer->Initialize();
+ propertyBuffer->Initialize( format );
return propertyBuffer;
}
-void PropertyBuffer::SetSize( std::size_t size )
-{
- mSize = size;
-
- SizeChanged();
-
- SceneGraph::SetPropertyBufferSize(mEventThreadServices.GetUpdateManager(),*mRenderObject, mSize );
-}
-
-std::size_t PropertyBuffer::GetSize() const
-{
- return mSize;
-}
-
-void PropertyBuffer::SetData( const void* data )
+void PropertyBuffer::SetData( const void* data, std::size_t size )
{
DALI_ASSERT_DEBUG( mFormat.Count() && "Format must be set before setting the data." );
- DALI_ASSERT_ALWAYS( mSize && "Size of the buffer must be set before setting the data." );
+ mSize = size;
+
+ // Check if format and size have been set yet
+ if( mBufferFormat != NULL )
+ {
+ unsigned int bufferSize = mBufferFormat->size * mSize;
+ mBuffer.Resize( bufferSize );
+ }
const char* source = static_cast<const char*>( data );
std::copy( source, source + mBuffer.Size(), &mBuffer[0] );
- SceneGraph::SetPropertyBufferData(mEventThreadServices.GetUpdateManager(),*mRenderObject,new Dali::Vector<char>( mBuffer ));
+ SceneGraph::SetPropertyBufferData( mEventThreadServices.GetUpdateManager(), *mRenderObject, new Dali::Vector<char>( mBuffer ), mSize );
}
-void PropertyBuffer::SetFormat( Dali::Property::Map& format )
+std::size_t PropertyBuffer::GetSize() const
{
- DALI_ASSERT_ALWAYS( format.Count() && "Format cannot be empty." );
-
- DALI_ASSERT_DEBUG( 0 == mFormat.Count() && "Format of property buffer can only be set once." );
-
- mFormat = format;
-
- FormatChanged();
+ return mSize;
}
const Render::PropertyBuffer* PropertyBuffer::GetRenderObject() const
}
PropertyBuffer::PropertyBuffer()
-:mEventThreadServices( *Stage::GetCurrent() )
-,mRenderObject(NULL)
-,mBufferFormat( NULL )
-,mSize( 0 )
+: mEventThreadServices( *Stage::GetCurrent() ),
+ mRenderObject( NULL ),
+ mBufferFormat( NULL ),
+ mSize( 0 )
{
}
-void PropertyBuffer::Initialize()
+void PropertyBuffer::Initialize( Dali::Property::Map& formatMap )
{
mRenderObject = new Render::PropertyBuffer();
SceneGraph::AddPropertyBuffer(mEventThreadServices.GetUpdateManager(), *mRenderObject );
-}
-void PropertyBuffer::FormatChanged()
-{
+ mFormat = formatMap;
+
size_t numComponents = mFormat.Count();
// Create the format
mBufferFormat = format;
SceneGraph::SetPropertyBufferFormat(mEventThreadServices.GetUpdateManager(), *mRenderObject, format );
- if( mSize )
- {
- SizeChanged();
- }
-}
-
-void PropertyBuffer::SizeChanged()
-{
- // Check if format and size have been set yet
- if( mBufferFormat != NULL )
- {
- unsigned int bufferSize = mBufferFormat->size * mSize;
- mBuffer.Resize( bufferSize );
- }
}
unsigned int GetPropertyImplementationSize( Property::Type& propertyType )
/**
* @copydoc PropertBuffer::New()
*/
- static PropertyBufferPtr New();
+ static PropertyBufferPtr New( Dali::Property::Map& format );
/**
- * @copydoc PropertBuffer::SetSize()
+ * @copydoc PropertBuffer::SetData()
*/
- void SetSize( std::size_t size );
+ void SetData( const void* data, std::size_t size );
/**
* @copydoc PropertBuffer::GetSize()
*/
std::size_t GetSize() const;
- /**
- * @copydoc PropertBuffer::SetData()
- */
- void SetData( const void* data );
-
- /**
- * @brief Set the format of the PropertyBuffer
- *
- * @pre Has not been set yet
- *
- * @param[in] format of the PropertyBuffer
- */
- void SetFormat( Dali::Property::Map& format );
-
public: // Default property extensions from Object
/**
/**
* Second stage initialization
*/
- void Initialize();
-
- /**
- * Update the buffer when the format changes
- */
- void FormatChanged();
-
- /**
- * Update the buffer when the size changes
- */
- void SizeChanged();
+ void Initialize( Dali::Property::Map& format );
private: // unimplemented methods
PropertyBuffer( const PropertyBuffer& );
propertyBuffer->SetFormat( format );
}
-void RenderManager::SetPropertyBufferData(Render::PropertyBuffer* propertyBuffer, Dali::Vector<char>* data)
+void RenderManager::SetPropertyBufferData( Render::PropertyBuffer* propertyBuffer, Dali::Vector<char>* data, size_t size )
{
- propertyBuffer->SetData( data );
-}
-
-void RenderManager::SetPropertyBufferSize(Render::PropertyBuffer* propertyBuffer, size_t size )
-{
- propertyBuffer->SetSize( size );
+ propertyBuffer->SetData( data, size );
}
void RenderManager::AddGeometry( RenderGeometry* renderGeometry )
* @param[in] propertyBuffer The property buffer.
* @param[in] format The new format of the buffer
*/
- void SetPropertyBufferFormat(Render::PropertyBuffer* propertyBuffer, Render::PropertyBuffer::Format* format );
+ void SetPropertyBufferFormat( Render::PropertyBuffer* propertyBuffer, Render::PropertyBuffer::Format* format );
/**
* Sets the data of an existing property buffer
* @param[in] propertyBuffer The property buffer.
* @param[in] data The new data of the buffer
- */
- void SetPropertyBufferData(Render::PropertyBuffer* propertyBuffer, Dali::Vector<char>* data);
-
- /**
- * Sets the size of an existing property buffer
- * @param[in] propertyBuffer The property buffer.
* @param[in] size The new size of the buffer
*/
- void SetPropertyBufferSize(Render::PropertyBuffer* propertyBuffer, size_t size );
+ void SetPropertyBufferData( Render::PropertyBuffer* propertyBuffer, Dali::Vector<char>* data, size_t size );
/**
* Set the geometry type of an existing render geometry
mDataChanged = true;
}
-void PropertyBuffer::SetData( Dali::Vector<char>* data )
+void PropertyBuffer::SetData( Dali::Vector<char>* data, size_t size )
{
mData = data;
- mDataChanged = true;
-}
-
-void PropertyBuffer::SetSize( unsigned int size )
-{
mSize = size;
mDataChanged = true;
}
-
bool PropertyBuffer::Update( Context& context, bool isIndexBuffer )
{
if( !mData || !mFormat || !mSize )
*
* This function takes ownership of the pointer
* @param[in] data The new data of the PropertyBuffer
+ * @param[in] size The new size of the buffer
*/
- void SetData( Dali::Vector<char>* data );
+ void SetData( Dali::Vector<char>* data, size_t size );
/**
* @brief Set the number of elements
new (slot) DerivedType( &mImpl->renderManager, &RenderManager::SetPropertyBufferFormat, propertyBuffer, format );
}
-void UpdateManager::SetPropertyBufferData(Render::PropertyBuffer* propertyBuffer, Dali::Vector<char>* data)
+void UpdateManager::SetPropertyBufferData( Render::PropertyBuffer* propertyBuffer, Dali::Vector<char>* data, size_t size )
{
- typedef MessageValue2< RenderManager, Render::PropertyBuffer*, Dali::Vector<char>* > DerivedType;
+ typedef MessageValue3< RenderManager, Render::PropertyBuffer*, Dali::Vector<char>*, size_t > DerivedType;
// Reserve some memory inside the render queue
unsigned int* 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 );
-}
-
-void UpdateManager::SetPropertyBufferSize(Render::PropertyBuffer* propertyBuffer, size_t size )
-{
- typedef MessageValue2< RenderManager, Render::PropertyBuffer*, size_t > DerivedType;
-
- // Reserve some memory inside the render queue
- unsigned int* 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::SetPropertyBufferSize, propertyBuffer, size );
+ new (slot) DerivedType( &mImpl->renderManager, &RenderManager::SetPropertyBufferData, propertyBuffer, data, size );
}
} // namespace SceneGraph
* Sets the data of an existing property buffer
* @param[in] propertyBuffer The property buffer.
* @param[in] data The new data of the buffer
- * @post Sends a message to RenderManager to set the new data to the property buffer.
- */
- void SetPropertyBufferData(Render::PropertyBuffer* propertyBuffer, Dali::Vector<char>* data);
-
- /**
- * Sets the size of an existing property buffer
- * @param[in] propertyBuffer The property buffer.
* @param[in] size The new size of the buffer
- * @post Sends a message to RenderManager to set the new size to the property buffer.
+ * @post Sends a message to RenderManager to set the new data to the property buffer.
*/
- void SetPropertyBufferSize(Render::PropertyBuffer* propertyBuffer, size_t size );
+ void SetPropertyBufferData(Render::PropertyBuffer* propertyBuffer, Dali::Vector<char>* data, size_t size);
public:
new (slot) LocalType( &manager, &UpdateManager::SetPropertyBufferFormat, &propertyBuffer, format );
}
-inline void SetPropertyBufferData( UpdateManager& manager, Render::PropertyBuffer& propertyBuffer, Vector<char>* data )
+inline void SetPropertyBufferData( UpdateManager& manager, Render::PropertyBuffer& propertyBuffer, Vector<char>* data, size_t size )
{
- typedef MessageValue2< UpdateManager, Render::PropertyBuffer*, Vector<char>* > LocalType;
+ typedef MessageValue3< UpdateManager, Render::PropertyBuffer*, Vector<char>*, size_t > LocalType;
// Reserve some memory inside the message queue
unsigned int* 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 );
+ new (slot) LocalType( &manager, &UpdateManager::SetPropertyBufferData, &propertyBuffer, data, size );
}
-inline void SetPropertyBufferSize( UpdateManager& manager, Render::PropertyBuffer& propertyBuffer, size_t size )
-{
- typedef MessageValue2< UpdateManager, Render::PropertyBuffer*, size_t > LocalType;
-
- // Reserve some memory inside the message queue
- unsigned int* 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::SetPropertyBufferSize, &propertyBuffer, size );
-}
-
-
} // namespace SceneGraph
} // namespace Internal