#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
{
struct NodeDepths
{
- NodeDepths()
- {
- }
+ NodeDepths() = default;
void Add( SceneGraph::Node* node, uint32_t sortedDepth )
{
/**
* Destructor.
*/
- virtual ~UpdateManager();
+ ~UpdateManager() override;
// Node connection methods
* @brief Accept compiled shaders passed back on render thread for saving.
* @param[in] shaderData Source code, hash over source, and corresponding compiled binary to be saved.
*/
- virtual void SaveBinary( Internal::ShaderDataPtr shaderData );
+ void SaveBinary( Internal::ShaderDataPtr shaderData ) override;
/**
* @brief Set the destination for compiled shader binaries to be passed on to.
* @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
void AttachColorTextureToFrameBuffer( Render::FrameBuffer* frameBuffer, Render::Texture* texture, uint32_t mipmapLevel, uint32_t face );
/**
+ * Attach a texture as depth output to an existing FrameBuffer
+ * @param[in] frameBuffer The FrameBuffer
+ * @param[in] texture The texture that will be used as output when rendering
+ * @param[in] mipmapLevel The mipmap of the texture to be attached
+ */
+ void AttachDepthTextureToFrameBuffer( Render::FrameBuffer* frameBuffer, Render::Texture* texture, uint32_t mipmapLevel );
+
+ /**
+ * Attach a texture as depth/stencil output to an existing FrameBuffer
+ * @param[in] frameBuffer The FrameBuffer
+ * @param[in] texture The texture that will be used as output when rendering
+ * @param[in] mipmapLevel The mipmap of the texture to be attached
+ */
+ void AttachDepthStencilTextureToFrameBuffer( Render::FrameBuffer* frameBuffer, Render::Texture* texture, uint32_t mipmapLevel );
+
+ /**
* This is called when the surface of the scene has been replaced.
* @param[in] scene The scene.
*/
void SetDefaultSurfaceRect( const Rect<int>& rect );
/**
+ * Set the default surface orientation.
+ * @param[in] orientation The orientation value representing the surface.
+ */
+ void SetDefaultSurfaceOrientation( int orientation );
+
+ /**
* @copydoc Dali::Stage::KeepRendering()
*/
void KeepRendering( float durationSeconds );
inline void InstallRootMessage( UpdateManager& manager, OwnerPointer<Layer>& root )
{
// Message has ownership of Layer while in transit from event -> update
- typedef MessageValue1< UpdateManager, OwnerPointer<Layer> > LocalType;
+ using LocalType = MessageValue1<UpdateManager, OwnerPointer<Layer> >;
// Reserve some memory inside the message queue
uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
// Scene graph thread can destroy this object.
Layer* root = const_cast< Layer* >( constRoot );
- typedef MessageValue1< UpdateManager, Layer* > LocalType;
+ using LocalType = MessageValue1<UpdateManager, Layer*>;
// Reserve some memory inside the message queue
uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
inline void AddNodeMessage( UpdateManager& manager, OwnerPointer<Node>& node )
{
// Message has ownership of Node while in transit from event -> update
- typedef MessageValue1< UpdateManager, OwnerPointer<Node> > LocalType;
+ using LocalType = MessageValue1<UpdateManager, OwnerPointer<Node> >;
// Reserve some memory inside the message queue
uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
Node& parent = const_cast< Node& >( constParent );
Node& child = const_cast< Node& >( constChild );
- typedef MessageValue2< UpdateManager, Node*, Node* > LocalType;
+ using LocalType = MessageValue2<UpdateManager, Node*, Node*>;
// Reserve some memory inside the message queue
uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
// Scene graph thread can modify this object.
Node& node = const_cast< Node& >( constNode );
- typedef MessageValue1< UpdateManager, Node* > LocalType;
+ using LocalType = MessageValue1<UpdateManager, Node*>;
// Reserve some memory inside the message queue
uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
// Scene graph thread can destroy this object.
Node& node = const_cast< Node& >( constNode );
- typedef MessageValue1< UpdateManager, Node* > LocalType;
+ using LocalType = MessageValue1<UpdateManager, Node*>;
// Reserve some memory inside the message queue
uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
inline void AddCameraMessage( UpdateManager& manager, OwnerPointer< Camera >& camera )
{
// Message has ownership of Camera while in transit from event -> update
- typedef MessageValue1< UpdateManager, OwnerPointer< Camera > > LocalType;
+ using LocalType = MessageValue1<UpdateManager, OwnerPointer<Camera> >;
// Reserve some memory inside the message queue
uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
inline void RemoveCameraMessage( UpdateManager& manager, const Camera* camera )
{
- typedef MessageValue1< UpdateManager, Camera* > LocalType;
+ using LocalType = MessageValue1<UpdateManager, Camera*>;
// Reserve some memory inside the message queue
uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
inline void AddObjectMessage( UpdateManager& manager, OwnerPointer<PropertyOwner>& object )
{
// Message has ownership of object while in transit from event -> update
- typedef MessageValue1< UpdateManager, OwnerPointer<PropertyOwner> > LocalType;
+ using LocalType = MessageValue1<UpdateManager, OwnerPointer<PropertyOwner> >;
// Reserve some memory inside the message queue
uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
inline void RemoveObjectMessage( UpdateManager& manager, const PropertyOwner* object )
{
- typedef MessageValue1< UpdateManager, PropertyOwner* > LocalType;
+ using LocalType = MessageValue1<UpdateManager, PropertyOwner*>;
// Reserve some memory inside the message queue
uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
inline void AddAnimationMessage( UpdateManager& manager, OwnerPointer< SceneGraph::Animation >& animation )
{
- typedef MessageValue1< UpdateManager, OwnerPointer< SceneGraph::Animation > > LocalType;
+ using LocalType = MessageValue1<UpdateManager, OwnerPointer<SceneGraph::Animation> >;
// Reserve some memory inside the message queue
uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
// The scene-graph thread owns this object so it can safely edit it.
Animation& animation = const_cast< Animation& >( constAnimation );
- typedef MessageValue1< UpdateManager, Animation* > LocalType;
+ using LocalType = MessageValue1<UpdateManager, Animation*>;
// Reserve some memory inside the message queue
uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
// The scene-graph thread owns this object so it can safely edit it.
Animation& animation = const_cast< Animation& >( constAnimation );
- typedef MessageValue1< UpdateManager, Animation* > LocalType;
+ using LocalType = MessageValue1<UpdateManager, Animation*>;
// Reserve some memory inside the message queue
uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
inline void AddRenderTaskListMessage( UpdateManager& manager, OwnerPointer< SceneGraph::RenderTaskList >& taskList )
{
- typedef MessageValue1< UpdateManager, OwnerPointer< SceneGraph::RenderTaskList > > LocalType;
+ using LocalType = MessageValue1<UpdateManager, OwnerPointer<SceneGraph::RenderTaskList> >;
// Reserve some memory inside the message queue
uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
// The scene-graph thread owns this object so it can safely edit it.
RenderTaskList& taskList = const_cast< RenderTaskList& >( constTaskList );
- typedef MessageValue1< UpdateManager, RenderTaskList* > LocalType;
+ using LocalType = MessageValue1<UpdateManager, RenderTaskList*>;
// Reserve some memory inside the message queue
uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
inline void AddSceneMessage( UpdateManager& manager, OwnerPointer< SceneGraph::Scene >& scene )
{
- typedef MessageValue1< UpdateManager, OwnerPointer< SceneGraph::Scene > > LocalType;
+ using LocalType = MessageValue1<UpdateManager, OwnerPointer<SceneGraph::Scene> >;
// Reserve some memory inside the message queue
uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
// The scene-graph thread owns this object so it can safely edit it.
Scene& scene = const_cast< Scene& >( constScene );
- typedef MessageValue1< UpdateManager, Scene* > LocalType;
+ using LocalType = MessageValue1<UpdateManager, Scene*>;
// Reserve some memory inside the message queue
uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
inline void AddPropertyNotificationMessage( UpdateManager& manager, OwnerPointer< PropertyNotification >& propertyNotification )
{
// Message has ownership of PropertyNotification while in transit from event -> update
- typedef MessageValue1< UpdateManager, OwnerPointer< PropertyNotification > > LocalType;
+ using LocalType = MessageValue1<UpdateManager, OwnerPointer<PropertyNotification> >;
// Reserve some memory inside the message queue
uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
// The scene-graph thread owns this object so it can safely edit it.
PropertyNotification& propertyNotification = const_cast< PropertyNotification& >( constPropertyNotification );
- typedef MessageValue1< UpdateManager, PropertyNotification* > LocalType;
+ using LocalType = MessageValue1<UpdateManager, PropertyNotification*>;
// Reserve some memory inside the message queue
uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
// The scene-graph thread owns this object so it can safely edit it.
PropertyNotification* propertyNotification = const_cast< PropertyNotification* >( constPropertyNotification );
- typedef MessageValue2< UpdateManager, PropertyNotification*, PropertyNotification::NotifyMode > LocalType;
+ using LocalType = MessageValue2<UpdateManager, PropertyNotification*, PropertyNotification::NotifyMode>;
// Reserve some memory inside the message queue
uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
// The render thread can safely change the Shader
inline void AddShaderMessage( UpdateManager& manager, OwnerPointer< Shader >& shader )
{
- typedef MessageValue1< UpdateManager, OwnerPointer< Shader > > LocalType;
+ using LocalType = MessageValue1<UpdateManager, OwnerPointer<Shader> >;
// Reserve some memory inside the message queue
uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
// The render thread can safely change the Shader
inline void RemoveShaderMessage( UpdateManager& manager, const Shader* shader )
{
- typedef MessageValue1< UpdateManager, Shader* > LocalType;
+ using LocalType = MessageValue1<UpdateManager, Shader*>;
// Reserve some memory inside the message queue
uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
Internal::ShaderDataPtr shaderData,
bool modifiesGeometry )
{
- typedef MessageValue3< UpdateManager, Shader*, Internal::ShaderDataPtr, bool > LocalType;
+ using LocalType = MessageValue3<UpdateManager, Shader*, Internal::ShaderDataPtr, bool>;
// Reserve some memory inside the message queue
uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
inline void SetDefaultSurfaceRectMessage( UpdateManager& manager, const Rect<int32_t>& rect )
{
- typedef MessageValue1< UpdateManager, Rect<int32_t> > LocalType;
+ using LocalType = MessageValue1<UpdateManager, Rect<int32_t> >;
// Reserve some memory inside the message queue
uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
// The scene-graph thread owns this object so it can safely edit it.
Scene& scene = const_cast< Scene& >( constScene );
- typedef MessageValue1< UpdateManager, Scene* > LocalType;
+ using LocalType = MessageValue1<UpdateManager, Scene*>;
// Reserve some memory inside the message queue
uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
new (slot) LocalType( &manager, &UpdateManager::SurfaceReplaced, &scene );
}
+inline void SetDefaultSurfaceOrientationMessage( UpdateManager& manager, int orientation )
+{
+ typedef MessageValue1< UpdateManager, int > 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::SetDefaultSurfaceOrientation, orientation );
+}
+
inline void KeepRenderingMessage( UpdateManager& manager, float durationSeconds )
{
- typedef MessageValue1< UpdateManager, float > LocalType;
+ using LocalType = MessageValue1<UpdateManager, float>;
// Reserve some memory inside the message queue
uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
inline void SetRenderingBehaviorMessage( UpdateManager& manager, DevelStage::Rendering renderingBehavior )
{
- typedef MessageValue1< UpdateManager, DevelStage::Rendering > LocalType;
+ using LocalType = MessageValue1<UpdateManager, DevelStage::Rendering>;
// Reserve some memory inside the message queue
uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
*/
inline void SetLayerDepthsMessage( UpdateManager& manager, const std::vector< Layer* >& layers, const Layer* rootLayer )
{
- typedef MessageValue2< UpdateManager, std::vector< Layer* >, const Layer* > LocalType;
+ using LocalType = MessageValue2<UpdateManager, std::vector<Layer*>, const Layer*>;
// Reserve some memory inside the message queue
uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
inline void AddRendererMessage( UpdateManager& manager, OwnerPointer< Renderer >& object )
{
- typedef MessageValue1< UpdateManager, OwnerPointer< Renderer > > LocalType;
+ using LocalType = MessageValue1<UpdateManager, OwnerPointer<Renderer> >;
// Reserve some memory inside the message queue
uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
inline void RemoveRendererMessage( UpdateManager& manager, const Renderer& object )
{
- typedef MessageValue1< UpdateManager, Renderer* > LocalType;
+ using LocalType = MessageValue1<UpdateManager, Renderer*>;
// Reserve some memory inside the message queue
uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
// The render thread can safely change the Shader
inline void AddTextureSetMessage( UpdateManager& manager, OwnerPointer< TextureSet >& textureSet )
{
- typedef MessageValue1< UpdateManager, OwnerPointer< TextureSet > > LocalType;
+ using LocalType = MessageValue1<UpdateManager, OwnerPointer<TextureSet> >;
// Reserve some memory inside the message queue
uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
// The render thread can safely change the Shader
inline void RemoveTextureSetMessage( UpdateManager& manager, TextureSet& textureSet )
{
- typedef MessageValue1< UpdateManager, TextureSet* > LocalType;
+ using LocalType = MessageValue1<UpdateManager, TextureSet*>;
// Reserve some memory inside the message queue
uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
inline void AddSamplerMessage( UpdateManager& manager, OwnerPointer< Render::Sampler >& sampler )
{
// Message has ownership of Sampler while in transit from event -> update
- typedef MessageValue1< UpdateManager, OwnerPointer< Render::Sampler > > LocalType;
+ using LocalType = MessageValue1<UpdateManager, OwnerPointer<Render::Sampler> >;
// Reserve some memory inside the message queue
uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
inline void RemoveSamplerMessage( UpdateManager& manager, Render::Sampler& sampler )
{
- typedef MessageValue1< UpdateManager, Render::Sampler* > LocalType;
+ using LocalType = MessageValue1<UpdateManager, Render::Sampler*>;
// Reserve some memory inside the message queue
uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
inline void SetFilterModeMessage( UpdateManager& manager, Render::Sampler& sampler, uint32_t minFilterMode, uint32_t magFilterMode )
{
- typedef MessageValue3< UpdateManager, Render::Sampler*, uint32_t, uint32_t > LocalType;
+ using LocalType = MessageValue3<UpdateManager, Render::Sampler*, uint32_t, uint32_t>;
// Reserve some memory inside the message queue
uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
inline void SetWrapModeMessage( UpdateManager& manager, Render::Sampler& sampler, uint32_t rWrapMode, uint32_t sWrapMode, uint32_t tWrapMode )
{
- typedef MessageValue4< UpdateManager, Render::Sampler*, uint32_t, uint32_t, uint32_t > LocalType;
+ using LocalType = MessageValue4<UpdateManager, Render::Sampler*, uint32_t, uint32_t, uint32_t>;
// Reserve some memory inside the message queue
uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
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
+ using LocalType = MessageValue1<UpdateManager, OwnerPointer<Render::VertexBuffer> >;
// 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;
+ using LocalType = MessageValue1<UpdateManager, Render::VertexBuffer*>;
// 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
+ using LocalType = MessageValue2<UpdateManager, Render::VertexBuffer*, OwnerPointer<Render::VertexBuffer::Format> >;
// 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
+ using LocalType = MessageValue3<UpdateManager, Render::VertexBuffer*, OwnerPointer<Vector<uint8_t> >, uint32_t>;
// 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 )
{
// Message has ownership of Geometry while in transit from event -> update
- typedef MessageValue1< UpdateManager, OwnerPointer< Render::Geometry > > LocalType;
+ using LocalType = MessageValue1<UpdateManager, OwnerPointer<Render::Geometry> >;
// Reserve some memory inside the message queue
uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
inline void RemoveGeometry( UpdateManager& manager, Render::Geometry& geometry )
{
- typedef MessageValue1< UpdateManager, Render::Geometry* > LocalType;
+ using LocalType = MessageValue1<UpdateManager, Render::Geometry*>;
// Reserve some memory inside the message queue
uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
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;
+ using LocalType = MessageValue2<UpdateManager, Render::Geometry*, Render::VertexBuffer*>;
// 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;
+ using LocalType = MessageValue2<UpdateManager, Render::Geometry*, Render::VertexBuffer*>;
// 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()
/**
* Virtual destructor
*/
- virtual ~IndexBufferMessage()
- {
- }
+ ~IndexBufferMessage() override = default;
/**
* @copydoc MessageBase::Process
*/
- virtual void Process( BufferIndex /*bufferIndex*/ )
+ void Process( BufferIndex /*bufferIndex*/ ) override
{
DALI_ASSERT_DEBUG( mManager && "Message does not have an object" );
mManager->SetIndexBuffer( mRenderGeometry, mIndices );
inline void SetIndexBufferMessage( UpdateManager& manager, Render::Geometry& geometry, Dali::Vector<uint16_t>& indices )
{
- typedef IndexBufferMessage< UpdateManager > LocalType;
+ using LocalType = IndexBufferMessage<UpdateManager>;
// Reserve some memory inside the message queue
uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
inline void SetGeometryTypeMessage( UpdateManager& manager, Render::Geometry& geometry, uint32_t geometryType )
{
- typedef MessageValue2< UpdateManager, Render::Geometry*, uint32_t > LocalType;
+ using LocalType = MessageValue2<UpdateManager, Render::Geometry*, uint32_t>;
// Reserve some memory inside the message queue
uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
inline void AddTexture( UpdateManager& manager, OwnerPointer< Render::Texture >& texture )
{
// Message has ownership of Texture while in transit from event -> update
- typedef MessageValue1< UpdateManager, OwnerPointer< Render::Texture > > LocalType;
+ using LocalType = MessageValue1<UpdateManager, OwnerPointer<Render::Texture> >;
// Reserve some memory inside the message queue
uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
inline void RemoveTexture( UpdateManager& manager, Render::Texture& texture )
{
- typedef MessageValue1< UpdateManager, Render::Texture* > LocalType;
+ using LocalType = MessageValue1<UpdateManager, Render::Texture*>;
// Reserve some memory inside the message queue
uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
inline void UploadTextureMessage( UpdateManager& manager, Render::Texture& texture, PixelDataPtr pixelData, const Texture::UploadParams& params )
{
- typedef MessageValue3< UpdateManager, Render::Texture*, PixelDataPtr, Texture::UploadParams > LocalType;
+ using LocalType = MessageValue3<UpdateManager, Render::Texture*, PixelDataPtr, Texture::UploadParams>;
// Reserve some memory inside the message queue
uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
inline void GenerateMipmapsMessage( UpdateManager& manager, Render::Texture& texture )
{
- typedef MessageValue1< UpdateManager, Render::Texture* > LocalType;
+ using LocalType = MessageValue1<UpdateManager, Render::Texture*>;
// Reserve some memory inside the message queue
uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
inline void AddFrameBuffer( UpdateManager& manager, OwnerPointer< Render::FrameBuffer >& frameBuffer )
{
- typedef MessageValue1< UpdateManager, OwnerPointer< Render::FrameBuffer > > LocalType;
+ using LocalType = MessageValue1<UpdateManager, OwnerPointer<Render::FrameBuffer> >;
// Reserve some memory inside the message queue
uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
inline void RemoveFrameBuffer( UpdateManager& manager, Render::FrameBuffer& frameBuffer )
{
- typedef MessageValue1< UpdateManager, Render::FrameBuffer* > LocalType;
+ using LocalType = MessageValue1<UpdateManager, Render::FrameBuffer*>;
// Reserve some memory inside the message queue
uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
inline void AttachColorTextureToFrameBuffer( UpdateManager& manager, Render::FrameBuffer& frameBuffer, Render::Texture* texture, uint32_t mipmapLevel, uint32_t layer )
{
- typedef MessageValue4< UpdateManager, Render::FrameBuffer*, Render::Texture*, uint32_t, uint32_t > LocalType;
+ using LocalType = MessageValue4<UpdateManager, Render::FrameBuffer*, Render::Texture*, uint32_t, uint32_t>;
// Reserve some memory inside the message queue
uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
new (slot) LocalType( &manager, &UpdateManager::AttachColorTextureToFrameBuffer, &frameBuffer, texture, mipmapLevel, layer );
}
+inline void AttachDepthTextureToFrameBuffer( UpdateManager& manager, Render::FrameBuffer& frameBuffer, Render::Texture* texture, uint32_t mipmapLevel )
+{
+ using LocalType = MessageValue3<UpdateManager, Render::FrameBuffer*, Render::Texture*, uint32_t>;
+
+ // 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::AttachDepthTextureToFrameBuffer, &frameBuffer, texture, mipmapLevel );
+}
+
+inline void AttachDepthStencilTextureToFrameBuffer( UpdateManager& manager, Render::FrameBuffer& frameBuffer, Render::Texture* texture, uint32_t mipmapLevel )
+{
+ using LocalType = MessageValue3<UpdateManager, Render::FrameBuffer*, Render::Texture*, uint32_t>;
+
+ // 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::AttachDepthStencilTextureToFrameBuffer, &frameBuffer, texture, mipmapLevel );
+}
+
inline void SetDepthIndicesMessage( UpdateManager& manager, OwnerPointer< NodeDepths >& nodeDepths )
{
- typedef MessageValue1< UpdateManager, OwnerPointer< NodeDepths > > LocalType;
+ using LocalType = MessageValue1<UpdateManager, OwnerPointer<NodeDepths> >;
// Reserve some memory inside the message queue
uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
inline void AddResetterMessage( UpdateManager& manager, OwnerPointer<PropertyResetterBase> resetter )
{
- typedef MessageValue1< UpdateManager, OwnerPointer<PropertyResetterBase> > LocalType;
+ using LocalType = MessageValue1<UpdateManager, OwnerPointer<PropertyResetterBase> >;
// Reserve some memory inside the message queue
uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
inline void AddFrameCallbackMessage( UpdateManager& manager, OwnerPointer< FrameCallback >& frameCallback, const Node& rootNode )
{
- typedef MessageValue2< UpdateManager, OwnerPointer< FrameCallback >, const Node* > LocalType;
+ using LocalType = MessageValue2<UpdateManager, OwnerPointer<FrameCallback>, const Node*>;
// Reserve some memory inside the message queue
uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
inline void RemoveFrameCallbackMessage( UpdateManager& manager, FrameCallbackInterface& frameCallback )
{
- typedef MessageValue1< UpdateManager, FrameCallbackInterface* > LocalType;
+ using LocalType = MessageValue1<UpdateManager, FrameCallbackInterface*>;
// Reserve some memory inside the message queue
uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );