#include <dali/public-api/actors/renderer.h> // Dali::Renderer
#include <dali/internal/event/common/object-impl-helper.h> // Dali::Internal::ObjectHelper
#include <dali/internal/event/common/property-helper.h> // DALI_PROPERTY_TABLE_BEGIN, DALI_PROPERTY, DALI_PROPERTY_TABLE_END
+#include <dali/internal/update/node-attachments/scene-graph-renderer-attachment.h>
namespace Dali
{
const SceneGraph::PropertyOwner* Renderer::GetSceneObject() const
{
- return RENDERER_IMPL.GetSceneObject();
+ return mSceneObject;
}
const SceneGraph::PropertyBase* Renderer::GetSceneObjectAnimatableProperty( Property::Index index ) const
}
Renderer::Renderer()
+: mSceneObject(NULL)
{
}
{
namespace Internal
{
+namespace SceneGraph
+{
+class RendererAttachment;
+}
class Renderer;
typedef IntrusivePtr<Renderer> RendererPtr;
Renderer& operator=( const Renderer& );
private: // data
+ SceneGraph::RendererAttachment* mSceneObject;
ObjectConnector<Geometry> mGeometryConnector; ///< Connector that holds the geometry used by this renderer
ObjectConnector<Material> mMaterialConnector; ///< Connector that holds the material used by this renderer
return 0;
}
- const SceneGraph::PropertyOwner* GetSceneObject() const
- {
- // TODO: MESH_REWORK
- DALI_ASSERT_ALWAYS( false && "TODO: MESH_REWORK" );
- return 0;
- }
-
const SceneGraph::PropertyBase* GetSceneObjectAnimatableProperty( Property::Index index ) const
{
// TODO: MESH_REWORK
} // namespace Dali
#endif // DALI_INTERNAL_OBJECT_IMPL_HELPER_H
-
#include <dali/public-api/object/property-buffer.h> // Dali::Internal::PropertyBuffer
#include <dali/internal/event/common/object-impl-helper.h> // Dali::Internal::ObjectHelper
#include <dali/internal/event/common/property-helper.h> // DALI_PROPERTY_TABLE_BEGIN, DALI_PROPERTY, DALI_PROPERTY_TABLE_END
-
+#include <dali/internal/update/common/scene-graph-property-buffer.h>
namespace Dali
{
const SceneGraph::PropertyOwner* PropertyBuffer::GetSceneObject() const
{
- return PROPERTY_BUFFER_IMPL.GetSceneObject();
+ return mSceneObject;
}
const SceneGraph::PropertyBase* PropertyBuffer::GetSceneObjectAnimatableProperty( Property::Index index ) const
}
PropertyBuffer::PropertyBuffer()
+: mSceneObject(NULL)
{
}
} // namespace Internal
} // namespace Dali
-
{
namespace Internal
{
+namespace SceneGraph
+{
+class PropertyBuffer;
+}
class PropertyBuffer;
typedef IntrusivePtr<PropertyBuffer> PropertyBufferPtr;
PropertyBuffer( const PropertyBuffer& );
PropertyBuffer& operator=( const PropertyBuffer& );
+private: // data
+ SceneGraph::PropertyBuffer* mSceneObject;
};
} // namespace Internal
const SceneGraph::PropertyOwner* Material::GetSceneObject() const
{
- return MATERIAL_IMPL.GetSceneObject();
+ return mSceneObject;
}
const SceneGraph::PropertyBase* Material::GetSceneObjectAnimatableProperty( Property::Index index ) const
bool Material::OnStage() const
{
// TODO: MESH_REWORK
- DALI_ASSERT_ALWAYS( false && "TODO: MESH_REWORK" );
- return false;
+ //DALI_ASSERT_ALWAYS( false && "TODO: MESH_REWORK" );
+ return mSceneObject != NULL;
}
void Material::Connect()
const SceneGraph::PropertyOwner* Sampler::GetSceneObject() const
{
- return SAMPLER_IMPL.GetSceneObject();
+ return mSceneObject;
}
const SceneGraph::PropertyBase* Sampler::GetSceneObjectAnimatableProperty( Property::Index index ) const
Dali::Shader::ShaderHints hints )
{
//TODO: MESH_REWORK
- DALI_ASSERT_ALWAYS(false && "MESH REWORK");
+ //DALI_ASSERT_ALWAYS(false && "MESH REWORK");
ShaderPtr shader( new Shader() );
shader->Initialize( vertexShader, fragmentShader );
return shader;
const SceneGraph::PropertyOwner* Shader::GetSceneObject() const
{
- return SHADER_IMPL.GetSceneObject();
+ return mSceneObject;
}
const SceneGraph::PropertyBase* Shader::GetSceneObjectAnimatableProperty( Property::Index index ) const
const SceneGraph::PropertyOwner* Geometry::GetSceneObject() const
{
- return GEOMETRY_IMPL.GetSceneObject();
+ return mSceneObject;
}
const SceneGraph::PropertyBase* Geometry::GetSceneObjectAnimatableProperty( Property::Index index ) const
{
DALI_ASSERT_DEBUG( mContext && "Renderer::Render. Renderer not initialised!! (mContext == NULL)." );
+ // @todo
+
// if mShader is NULL it means we're set to default
if( !mShader )
{
void Material::SetShader( const Shader* shader )
{
mShader = shader;
+ // Need to inform renderer in render thread about this shader
}
const Shader* Material::GetShader() const