-#ifndef __DALI_INTERNAL_SCENE_GRAPH_RENDER_MANAGER_H__
-#define __DALI_INTERNAL_SCENE_GRAPH_RENDER_MANAGER_H__
+#ifndef DALI_INTERNAL_SCENE_GRAPH_RENDER_MANAGER_H
+#define DALI_INTERNAL_SCENE_GRAPH_RENDER_MANAGER_H
/*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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 GlAbstraction;
class GlSyncAbstraction;
+class GlContextHelperAbstraction;
class RenderStatus;
}
/**
* Construct a new RenderManager.
- * @param[in] glAbstraction The GL abstraction used for rendering.
- * @param[in] glSyncAbstraction The GL sync abstraction used fence sync creation/deletion.
- * @param[in] depthBufferAvailable Whether the depth buffer is available
- * @param[in] stencilBufferAvailable Whether the stencil buffer is available
+ * @param[in] glAbstraction The GL abstraction used for rendering.
+ * @param[in] glSyncAbstraction The GL sync abstraction used fence sync creation/deletion.
+ * @param[in] glContextHelperAbstraction The GL context helper abstraction for accessing GL context.
+ * @param[in] depthBufferAvailable Whether the depth buffer is available
+ * @param[in] stencilBufferAvailable Whether the stencil buffer is available
*/
static RenderManager* New( Integration::GlAbstraction& glAbstraction,
Integration::GlSyncAbstraction& glSyncAbstraction,
+ Integration::GlContextHelperAbstraction& glContextHelperAbstraction,
Integration::DepthBufferAvailable depthBufferAvailable,
- Integration::StencilBufferAvailable stencilBufferAvailable );
+ Integration::StencilBufferAvailable stencilBufferAvailable,
+ Integration::PartialUpdateAvailable partialUpdateAvailable );
/**
* Non-virtual destructor; not intended as a base class
void SetDefaultSurfaceRect( const Rect<int>& rect );
/**
+ * Returns the orintation for the default surface (probably the application window).
+ * @return Orientation for the surface.
+ */
+ void SetDefaultSurfaceOrientation( int orientation );
+
+ /**
* Add a Renderer to the render manager.
* @param[in] renderer The renderer to add.
* @post renderer is owned by RenderManager
* @param[in] minFilterMode Filter mode to use when the texture is minificated
* @param[in] magFilterMode Filter mode to use when the texture is magnified
*/
- void SetFilterMode( Render::Sampler* sampler, unsigned int minFilterMode, unsigned int magFilterMode );
+ void SetFilterMode( Render::Sampler* sampler, uint32_t minFilterMode, uint32_t magFilterMode );
/**
* Set wrapping mode for a sampler
* @param[in] uWrapMode Wrap mode in the x direction
* @param[in] vWrapMode Wrap mode in the y direction
*/
- void SetWrapMode( Render::Sampler* sampler, unsigned int rWrapMode, unsigned int sWrapMode, unsigned int tWrapMode );
+ void SetWrapMode( Render::Sampler* sampler, uint32_t rWrapMode, uint32_t sWrapMode, uint32_t tWrapMode );
/**
* Add a property buffer to the render manager.
* @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<char> >& data, size_t size );
+ void SetPropertyBufferData( Render::PropertyBuffer* propertyBuffer, OwnerPointer< Vector<uint8_t> >& data, uint32_t size );
/**
* Sets the data for the index buffer of an existing geometry
* @param[in] geometry The geometry
* @param[in] data A vector containing the indices
*/
- void SetIndexBuffer( Render::Geometry* geometry, Dali::Vector<unsigned short>& data );
+ void SetIndexBuffer( Render::Geometry* geometry, Dali::Vector<uint16_t>& data );
/**
* Set the geometry type of an existing render geometry
* @param[in] geometry The render geometry
* @param[in] geometryType The new geometry type
*/
- void SetGeometryType( Render::Geometry* geometry, unsigned int geometryType );
+ void SetGeometryType( Render::Geometry* geometry, uint32_t geometryType );
/**
* Adds a texture to the render manager
* Adds a framebuffer to the render manager
* @param[in] frameBuffer The framebuffer to add
*/
- void AddFrameBuffer( Render::FrameBuffer* frameBuffer );
+ void AddFrameBuffer( OwnerPointer< Render::FrameBuffer >& frameBuffer );
/**
* Removes a framebuffer from the render manager
* @param[in] mipmapLevel The mipmap of the texture to be attached
* @param[in] layer Indicates which layer of a cube map or array texture to attach. Unused for 2D textures
*/
- void AttachColorTextureToFrameBuffer( Render::FrameBuffer* frameBuffer, Render::Texture* texture, unsigned int mipmapLevel, unsigned int layer );
+ void AttachColorTextureToFrameBuffer( Render::FrameBuffer* frameBuffer, Render::Texture* texture, uint32_t mipmapLevel, uint32_t layer );
/**
* Adds a render tracker to the RenderManager. RenderManager takes ownership of the
/**
* Renders the results of the previous "update" traversal.
* @param[out] status contains the rendering flags.
- * @param[in] forceClear force the Clear on the framebuffer even if nothing is rendered.
+ * @param[in] forceClear Force the Clear on the framebuffer even if nothing is rendered.
+ * @param[in] uploadOnly Upload the resource only without rendering.
*/
- void Render( Integration::RenderStatus& status, bool forceClear );
+ void Render( Integration::RenderStatus& status, bool forceClear, bool uploadOnly );
private:
} // namespace Dali
-#endif // __DALI_INTERNAL_SCENE_GRAPH_RENDER_MANAGER_H__
+#endif // DALI_INTERNAL_SCENE_GRAPH_RENDER_MANAGER_H