Falcon
Public Member Functions | Public Attributes | List of all members
UI::Canvas Class Reference

#include <Canvas.h>

Inheritance diagram for UI::Canvas:
Renderable

Public Member Functions

 Canvas ()
 
virtual ~Canvas ()
 
void Setup () override
 
void Bind () override
 
void CallDrawCommands (nk_context *ctx)
 
u32 GetMaxVertexSize ()
 
u32 GetMaxIndexSize ()
 
nk_buffer * GetCommandBuffer ()
 
const nk_draw_null_texture GetNull ()
 
void AddCanvasItem (CanvasItem *canvasItem)
 
void ClearCanvas ()
 
- Public Member Functions inherited from Renderable
 Renderable ()
 
virtual ~Renderable ()
 
void SetMaterial (Material *mat)
 
MaterialGetMaterial () const
 

Public Attributes

boost::container::vector< u32, fmemory::STLAllocator< u32 > > m_indexArray
 
boost::container::vector< u32, fmemory::STLAllocator< u32 > > m_indexOffsets
 
- Public Attributes inherited from Renderable
boost::container::vector< Vertex, fmemory::STLAllocator< Vertex > > m_vertexArray
 

Additional Inherited Members

- Protected Attributes inherited from Renderable
Materialm_material = nullptr
 
VertexArraym_VAO = nullptr
 

Detailed Description

Canvas for rendering a 2D UI

Constructor & Destructor Documentation

◆ Canvas()

UI::Canvas::Canvas ( )

Canvas constructor

◆ ~Canvas()

UI::Canvas::~Canvas ( )
virtual

Free extra memory used by the canvas

Member Function Documentation

◆ AddCanvasItem()

void UI::Canvas::AddCanvasItem ( CanvasItem canvasItem)
inline

◆ Bind()

void UI::Canvas::Bind ( )
overridevirtual

Binds a canvas for rendering

Reimplemented from Renderable.

◆ CallDrawCommands()

void UI::Canvas::CallDrawCommands ( nk_context *  ctx)

Calls the nuklear draw commands for all canvas items

◆ ClearCanvas()

void UI::Canvas::ClearCanvas ( )
inline

◆ GetCommandBuffer()

nk_buffer* UI::Canvas::GetCommandBuffer ( )
inline

◆ GetMaxIndexSize()

u32 UI::Canvas::GetMaxIndexSize ( )
inline

◆ GetMaxVertexSize()

u32 UI::Canvas::GetMaxVertexSize ( )
inline

◆ GetNull()

const nk_draw_null_texture UI::Canvas::GetNull ( )
inline

◆ Setup()

void UI::Canvas::Setup ( )
overridevirtual

Setups up buffers and shaders for a canvas

Reimplemented from Renderable.

Member Data Documentation

◆ m_indexArray

boost::container::vector<u32, fmemory::STLAllocator<u32> > UI::Canvas::m_indexArray

◆ m_indexOffsets

boost::container::vector<u32, fmemory::STLAllocator<u32> > UI::Canvas::m_indexOffsets

The documentation for this class was generated from the following files: