Dali 3D User Interface Engine
List of all members | Public Types | Public Member Functions | Private Member Functions | Private Attributes
Dali::Internal::SceneGraph::RenderList Struct Reference

The RenderList structure provides the renderer with a list of renderers and a set of flags to tell it what depth buffering is required. More...

#include <render-list.h>

Collaboration diagram for Dali::Internal::SceneGraph::RenderList:
Collaboration graph
[legend]

Public Types

enum  RenderFlags {
  DEPTH_BUFFER_ENABLED = 1 << 0, DEPTH_WRITE = 1 << 1, DEPTH_CLEAR = 1 << 2, STENCIL_BUFFER_ENABLED = 1 << 3,
  STENCIL_WRITE = 1 << 4, STENCIL_CLEAR = 1 << 5
}
 The RenderFlags describe how the objects are rendered using the depth and stencil buffer. More...
 

Public Member Functions

 RenderList ()
 Constructor. More...
 
 ~RenderList ()
 Destructor. More...
 
void ClearFlags ()
 Clear the render flags. More...
 
void SetFlags (unsigned int flags)
 Set particular render flags. More...
 
unsigned int GetFlags () const
 Retrieve the render flags. More...
 
void Reset ()
 Reset the render list for next frame. More...
 
void Reserve (RenderItemContainer::SizeType size)
 Reserve space in the render list. More...
 
RenderItemContainer::SizeType Capacity ()
 
RenderItemGetNextFreeItem ()
 Get next free render item. More...
 
RenderItemGetItem (RenderItemContainer::SizeType index) const
 Get item at a given position in the list. More...
 
const Render::RendererGetRenderer (RenderItemContainer::SizeType index) const
 Get renderer from an item in the list. More...
 
RenderItemContainer::SizeType Count () const
 Get the number of real items Because of caching, the actual size may be bit more. More...
 
RenderItemContainer::SizeType GetCachedItemCount () const
 
void ReuseCachedItems ()
 Tells the render list to reuse the items from the cache. More...
 
bool IsEmpty () const
 Predicate to inform if the list is empty. More...
 
void SetClipping (bool clipping, const ClippingBox &box)
 Set clipping. More...
 
bool IsClipping () const
 
const ClippingBoxGetClippingBox () const
 
RenderItemContainerGetContainer ()
 
void ReleaseUnusedItems ()
 Do some housekeeping to keep memory consumption low. More...
 
LayerGetSourceLayer ()
 
void SetSourceLayer (Layer *layer)
 
void SetHasColorRenderItems (bool hasColorRenderItems)
 Set if the RenderList contains color RenderItems. More...
 
bool HasColorRenderItems () const
 Check if the RenderList contains color RenderItems. More...
 

Private Member Functions

 RenderList (const RenderList &rhs)
 
const RenderListoperator= (const RenderList &rhs)
 

Private Attributes

RenderItemContainer mItems
 Each item is a renderer and matrix pair. More...
 
RenderItemContainer::SizeType mNextFree
 index for the next free item to use More...
 
unsigned int mRenderFlags
 The render flags. More...
 
ClippingBoxmClippingBox
 The clipping box, in window coordinates, when clipping is enabled. More...
 
LayermSourceLayer
 The originating layer where the renderers are from. More...
 
bool mHasColorRenderItems: 1
 True if list contains color render items. More...
 

Detailed Description

The RenderList structure provides the renderer with a list of renderers and a set of flags to tell it what depth buffering is required.

Definition at line 55 of file render-list.h.

Member Enumeration Documentation

The RenderFlags describe how the objects are rendered using the depth and stencil buffer.

The flags which relate to GL_DEPTH_TEST and GL_STENCIL_TEST are called DEPTH_BUFFER_ENABLED and STENCIL_BUFFER_ENABLED to avoid any confusion. E.g. if GL_DEPTH_TEST is not enabled you can't write to the depth buffer, which can cause confusion.

Enumerator
DEPTH_BUFFER_ENABLED 

If depth buffer should be used for writing / test operations.

DEPTH_WRITE 

If the depth buffer is writable.

DEPTH_CLEAR 

If the depth buffer should first be cleared.

STENCIL_BUFFER_ENABLED 

If stencil buffer should be used for writing / test operation.

STENCIL_WRITE 

If the stencil buffer is writable.

STENCIL_CLEAR 

If the stencil buffer should first be cleared.

Definition at line 67 of file render-list.h.

Constructor & Destructor Documentation

Dali::Internal::SceneGraph::RenderList::RenderList ( )
inline

Constructor.

Definition at line 81 of file render-list.h.

Dali::Internal::SceneGraph::RenderList::~RenderList ( )
inline

Destructor.

Definition at line 93 of file render-list.h.

References mClippingBox.

Dali::Internal::SceneGraph::RenderList::RenderList ( const RenderList rhs)
private

Member Function Documentation

RenderItemContainer::SizeType Dali::Internal::SceneGraph::RenderList::Capacity ( )
inline
Returns
the capacity of the render list

Definition at line 151 of file render-list.h.

References Dali::VectorBase::Capacity(), and mItems.

Here is the call graph for this function:

void Dali::Internal::SceneGraph::RenderList::ClearFlags ( )
inline

Clear the render flags.

Definition at line 102 of file render-list.h.

References mRenderFlags.

Referenced by Dali::Internal::SceneGraph::AddColorRenderers(), Dali::Internal::SceneGraph::AddOverlayRenderers(), and Dali::Internal::SceneGraph::AddStencilRenderers().

Here is the caller graph for this function:

RenderItemContainer::SizeType Dali::Internal::SceneGraph::RenderList::Count ( ) const
inline

Get the number of real items Because of caching, the actual size may be bit more.

Returns
The number of items

Definition at line 196 of file render-list.h.

References mNextFree.

Referenced by Dali::Internal::SceneGraph::AddColorRenderers(), Dali::Internal::Render::ProcessRenderList(), and Dali::Internal::SceneGraph::SortRenderItems().

Here is the caller graph for this function:

RenderItemContainer::SizeType Dali::Internal::SceneGraph::RenderList::GetCachedItemCount ( ) const
inline
Returns
the number of items cached by the list

Definition at line 204 of file render-list.h.

References Dali::VectorBase::Count(), and mItems.

Referenced by GetItem(), GetRenderer(), and Dali::Internal::SceneGraph::TryReuseCachedRenderers().

Here is the call graph for this function:

Here is the caller graph for this function:

const ClippingBox& Dali::Internal::SceneGraph::RenderList::GetClippingBox ( ) const
inline
Returns
the clipping box

Definition at line 251 of file render-list.h.

References mClippingBox.

Referenced by Dali::Internal::Render::PrintRenderList(), and Dali::Internal::Render::SetScissorTest().

Here is the caller graph for this function:

RenderItemContainer& Dali::Internal::SceneGraph::RenderList::GetContainer ( )
inline
Returns
the container (for sorting)

Definition at line 259 of file render-list.h.

References mItems.

Referenced by Dali::Internal::SceneGraph::SortRenderItems().

Here is the caller graph for this function:

unsigned int Dali::Internal::SceneGraph::RenderList::GetFlags ( ) const
inline

Retrieve the render flags.

Returns
the render flags.

Definition at line 120 of file render-list.h.

References mRenderFlags.

Referenced by Dali::Internal::Render::PrintRenderList(), Dali::Internal::Render::ProcessRenderList(), and Dali::Internal::Render::SetRenderFlags().

Here is the caller graph for this function:

RenderItem& Dali::Internal::SceneGraph::RenderList::GetItem ( RenderItemContainer::SizeType  index) const
inline

Get item at a given position in the list.

Definition at line 176 of file render-list.h.

References DALI_ASSERT_DEBUG, GetCachedItemCount(), and mItems.

Referenced by Dali::Internal::SceneGraph::AddColorRenderers(), Dali::Internal::Render::ProcessRenderList(), and Dali::Internal::SceneGraph::SortRenderItems().

Here is the call graph for this function:

Here is the caller graph for this function:

RenderItem& Dali::Internal::SceneGraph::RenderList::GetNextFreeItem ( )
inline

Get next free render item.

Returns
reference to the next available RenderItem

Definition at line 160 of file render-list.h.

References Dali::VectorBase::Count(), mItems, mNextFree, Dali::Internal::SceneGraph::RenderItem::New(), Dali::Vector< T, IsTrivialType >::PushBack(), and Dali::Internal::SceneGraph::RenderItem::Reset().

Referenced by Dali::Internal::SceneGraph::AddRendererToRenderList().

Here is the call graph for this function:

Here is the caller graph for this function:

const Render::Renderer& Dali::Internal::SceneGraph::RenderList::GetRenderer ( RenderItemContainer::SizeType  index) const
inline

Get renderer from an item in the list.

Definition at line 185 of file render-list.h.

References DALI_ASSERT_DEBUG, GetCachedItemCount(), and mItems.

Referenced by Dali::Internal::SceneGraph::AddColorRenderers(), and Dali::Internal::SceneGraph::TryReuseCachedRenderers().

Here is the call graph for this function:

Here is the caller graph for this function:

Layer* Dali::Internal::SceneGraph::RenderList::GetSourceLayer ( )
inline
Returns
the source layer these renderitems originate from

Definition at line 279 of file render-list.h.

References mSourceLayer.

Referenced by Dali::Internal::SceneGraph::TryReuseCachedRenderers().

Here is the caller graph for this function:

bool Dali::Internal::SceneGraph::RenderList::HasColorRenderItems ( ) const
inline

Check if the RenderList contains color RenderItems.

Returns
true if the RenderList contains color RenderItems, false otherwise

Definition at line 305 of file render-list.h.

References mHasColorRenderItems.

Referenced by Dali::Internal::Render::ProcessRenderList().

Here is the caller graph for this function:

bool Dali::Internal::SceneGraph::RenderList::IsClipping ( ) const
inline
Returns
true if clipping is on

Definition at line 243 of file render-list.h.

References mClippingBox.

Referenced by Dali::Internal::Render::PrintRenderList(), and Dali::Internal::Render::SetScissorTest().

Here is the caller graph for this function:

bool Dali::Internal::SceneGraph::RenderList::IsEmpty ( ) const
inline

Predicate to inform if the list is empty.

Definition at line 220 of file render-list.h.

References mNextFree.

Referenced by Dali::Internal::Render::ProcessRenderInstruction().

Here is the caller graph for this function:

const RenderList& Dali::Internal::SceneGraph::RenderList::operator= ( const RenderList rhs)
private
void Dali::Internal::SceneGraph::RenderList::ReleaseUnusedItems ( )
inline

Do some housekeeping to keep memory consumption low.

Definition at line 267 of file render-list.h.

References Dali::VectorBase::Count(), mItems, mNextFree, and Dali::OwnerContainer< T >::Resize().

Here is the call graph for this function:

void Dali::Internal::SceneGraph::RenderList::Reserve ( RenderItemContainer::SizeType  size)
inline

Reserve space in the render list.

Parameters
sizeto reserve

Definition at line 142 of file render-list.h.

References mItems, mNextFree, and Dali::Vector< T, IsTrivialType >::Reserve().

Here is the call graph for this function:

void Dali::Internal::SceneGraph::RenderList::Reset ( )
inline

Reset the render list for next frame.

Definition at line 128 of file render-list.h.

References mClippingBox, mNextFree, and mRenderFlags.

void Dali::Internal::SceneGraph::RenderList::ReuseCachedItems ( )
inline

Tells the render list to reuse the items from the cache.

Definition at line 212 of file render-list.h.

References Dali::VectorBase::Count(), mItems, and mNextFree.

Referenced by Dali::Internal::SceneGraph::TryReuseCachedRenderers().

Here is the call graph for this function:

Here is the caller graph for this function:

void Dali::Internal::SceneGraph::RenderList::SetClipping ( bool  clipping,
const ClippingBox box 
)
inline

Set clipping.

Parameters
clippingon/off
boxfor clipping

Definition at line 230 of file render-list.h.

References mClippingBox.

Referenced by Dali::Internal::SceneGraph::AddColorRenderers(), Dali::Internal::SceneGraph::AddOverlayRenderers(), and Dali::Internal::SceneGraph::AddStencilRenderers().

Here is the caller graph for this function:

void Dali::Internal::SceneGraph::RenderList::SetFlags ( unsigned int  flags)
inline

Set particular render flags.

Parameters
[in]flagsThe set of flags to bitwise or with existing flags

Definition at line 111 of file render-list.h.

References mRenderFlags.

Referenced by Dali::Internal::SceneGraph::AddColorRenderers(), Dali::Internal::SceneGraph::AddOverlayRenderers(), and Dali::Internal::SceneGraph::AddStencilRenderers().

Here is the caller graph for this function:

void Dali::Internal::SceneGraph::RenderList::SetHasColorRenderItems ( bool  hasColorRenderItems)
inline

Set if the RenderList contains color RenderItems.

Parameters
[in]hasColorRenderItemsTrue if it contains color RenderItems, false otherwise

Definition at line 296 of file render-list.h.

References mHasColorRenderItems.

Referenced by Dali::Internal::SceneGraph::AddColorRenderers(), Dali::Internal::SceneGraph::AddOverlayRenderers(), and Dali::Internal::SceneGraph::AddStencilRenderers().

Here is the caller graph for this function:

void Dali::Internal::SceneGraph::RenderList::SetSourceLayer ( Layer layer)
inline
Parameters
layerthese renderitems originate from

Definition at line 287 of file render-list.h.

References mSourceLayer.

Member Data Documentation

ClippingBox* Dali::Internal::SceneGraph::RenderList::mClippingBox
private

The clipping box, in window coordinates, when clipping is enabled.

Definition at line 323 of file render-list.h.

Referenced by GetClippingBox(), IsClipping(), Reset(), SetClipping(), and ~RenderList().

bool Dali::Internal::SceneGraph::RenderList::mHasColorRenderItems
private

True if list contains color render items.

Definition at line 325 of file render-list.h.

Referenced by HasColorRenderItems(), and SetHasColorRenderItems().

RenderItemContainer Dali::Internal::SceneGraph::RenderList::mItems
private

Each item is a renderer and matrix pair.

Definition at line 318 of file render-list.h.

Referenced by Capacity(), GetCachedItemCount(), GetContainer(), GetItem(), GetNextFreeItem(), GetRenderer(), ReleaseUnusedItems(), Reserve(), and ReuseCachedItems().

RenderItemContainer::SizeType Dali::Internal::SceneGraph::RenderList::mNextFree
private

index for the next free item to use

Definition at line 319 of file render-list.h.

Referenced by Count(), GetNextFreeItem(), IsEmpty(), ReleaseUnusedItems(), Reserve(), Reset(), and ReuseCachedItems().

unsigned int Dali::Internal::SceneGraph::RenderList::mRenderFlags
private

The render flags.

Definition at line 321 of file render-list.h.

Referenced by ClearFlags(), GetFlags(), Reset(), and SetFlags().

Layer* Dali::Internal::SceneGraph::RenderList::mSourceLayer
private

The originating layer where the renderers are from.

Definition at line 324 of file render-list.h.

Referenced by GetSourceLayer(), and SetSourceLayer().


The documentation for this struct was generated from the following file:
Dali Docs Home
Read more about Dali