#define __DALI_INTERNAL_SCENE_GRAPH_RENDER_DATA_PROVIDER_H__
/*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2018 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/data-providers/geometry-data-provider.h>
-#include <dali/internal/render/data-providers/material-data-provider.h>
+#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/sampler-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>
+#include <dali/internal/update/common/animatable-property.h>
namespace Dali
{
namespace Internal
{
+
+struct BlendingOptions;
+
namespace SceneGraph
{
class PropertyBuffer;
class Shader;
+class Renderer;
/**
* Wraps all the data providers for the renderer. This allows the
* the current render. It essentially provides double buffering of the
* provider accessor through the message system. It does not take ownership
* of any objects.
- *
- * @todo - Add set of bools to state what changed (For improving performance)
*/
class RenderDataProvider
{
public:
typedef Dali::Vector< const PropertyBufferDataProvider* > VertexBuffers;
- typedef Dali::Vector< const SamplerDataProvider* > Samplers;
+ typedef std::vector< Render::Sampler* > Samplers;
/**
* Constructor.
* The RendererAttachment that creates this object will initialize the members
* directly.
*/
- RenderDataProvider();
+ RenderDataProvider( AnimatableProperty< float >& opacity );
/**
* Destructor
public:
/**
- * Set the material data provider
- * @param[in] materialDataProvider The material data provider
- */
- void SetMaterial( const MaterialDataProvider& materialDataProvider );
-
- /**
- * Get the material data provider
- * @return the material data provider
- */
- const MaterialDataProvider& GetMaterial() const;
-
- /**
* Set the uniform map data provider
* @param[in] uniformMapDataProvider The uniform map data provider
*/
Shader& GetShader() const;
/**
- * Set the sampler data providers
- * @param[in] samplers The sampler data providers
- */
- void SetSamplers( const Samplers& samplers );
-
- /**
- * Returns the list of sampler data providers
+ * Returns the list of samplers
* @return The list of samplers
*/
- const Samplers& GetSamplers() const;
+ Samplers& GetSamplers();
/**
- * Set the use blend flag to decide if the renderer will perform blending
- * @param[in] useBlend The flag to decide if the renderer will perform blending
+ * Returns the list of Textures
+ * @return The list of Textures
*/
- void SetUseBlend( bool useBlend );
+ std::vector<Render::Texture*>& GetTextures();
/**
- * Get the use blend flag that decides if the renderer will perform blending
- * @param[in] buffer index
- * @return The use blend flag that decides if the renderer will perform blending
+ * Get the opacity
+ * @return The opacity
*/
- bool GetUseBlend( BufferIndex bufferIndex ) const;
+ float GetOpacity( BufferIndex bufferIndex );
private:
- const MaterialDataProvider* mMaterialDataProvider;
- const UniformMapDataProvider* mUniformMapDataProvider;
- Shader* mShader;
- Samplers mSamplers;
- bool mUseBlend;
-
-// Give RendererAttachment access to our private data to reduce copying vectors on construction.
- friend class RendererAttachment;
+
+ const UniformMapDataProvider* mUniformMapDataProvider;
+ Shader* mShader;
+ std::vector<Render::Texture*> mTextures;
+ Samplers mSamplers;
+ AnimatableProperty< float >& mOpacity;
+
+ // Give Renderer access to our private data to reduce copying vectors on construction.
+ friend class Renderer;
};
} // SceneGraph