DirectZ
Loading...
Searching...
No Matches
dz::DrawListManager< DrawT > Struct Template Reference

Template draw list manager for producing draw commands from a struct buffer. More...

#include <DrawListManager.hpp>

Inheritance diagram for dz::DrawListManager< DrawT >:
dz::IDrawListManager

Public Types

using Determine_DrawT_DrawTuples_Function = std::function<DrawTuples(BufferGroup*, DrawT&)>
using Determine_CameraTuple_Function = std::function<CameraTuple(BufferGroup*, int)>
using Determine_VisibleDraws_Function = std::function<std::vector<int>(BufferGroup*, int camera_index)>

Public Member Functions

 DrawListManager (const std::string &draw_key, const Determine_DrawT_DrawTuples_Function &fn_determine_DrawT_DrawTuples, const std::string &camera_key="", const Determine_CameraTuple_Function &fn_determine_CameraTuple={}, const Determine_VisibleDraws_Function &fn_get_visible_draws={})
 Constructs a DrawListManager with a draw key and logic function.
DrawInformationensureDrawInformation (BufferGroup *buffer_group) override
 Ensures DrawInformation.
void SetDirty ()
Public Member Functions inherited from dz::IDrawListManager
virtual ~IDrawListManager ()=default

Detailed Description

template<typename DrawT>
struct dz::DrawListManager< DrawT >

Template draw list manager for producing draw commands from a struct buffer.

Template Parameters
DrawTStruct type used for draw data.

Member Typedef Documentation

◆ Determine_CameraTuple_Function

template<typename DrawT>
using dz::DrawListManager< DrawT >::Determine_CameraTuple_Function = std::function<CameraTuple(BufferGroup*, int)>

◆ Determine_DrawT_DrawTuples_Function

template<typename DrawT>
using dz::DrawListManager< DrawT >::Determine_DrawT_DrawTuples_Function = std::function<DrawTuples(BufferGroup*, DrawT&)>

◆ Determine_VisibleDraws_Function

template<typename DrawT>
using dz::DrawListManager< DrawT >::Determine_VisibleDraws_Function = std::function<std::vector<int>(BufferGroup*, int camera_index)>

Constructor & Destructor Documentation

◆ DrawListManager()

template<typename DrawT>
dz::DrawListManager< DrawT >::DrawListManager ( const std::string & draw_key,
const Determine_DrawT_DrawTuples_Function & fn_determine_DrawT_DrawTuples,
const std::string & camera_key = "",
const Determine_CameraTuple_Function & fn_determine_CameraTuple = {},
const Determine_VisibleDraws_Function & fn_get_visible_draws = {} )
inline

Constructs a DrawListManager with a draw key and logic function.

Parameters
draw_keyBuffer key to iterate over.
fn_determine_DrawT_DrawTuplesFunction that maps a DrawT instance to shader and vertex count.

Member Function Documentation

◆ ensureDrawInformation()

template<typename DrawT>
DrawInformation & dz::DrawListManager< DrawT >::ensureDrawInformation ( BufferGroup * buffer_group)
inlineoverridevirtual

Ensures DrawInformation.

Note
used internally in DirectZ
Parameters
buffer_groupPointer to a BufferGroup.
Returns
A reference to the ensured DrawInformation of this DrawListManager

Implements dz::IDrawListManager.

◆ SetDirty()

template<typename DrawT>
void dz::DrawListManager< DrawT >::SetDirty ( )
inline

The documentation for this struct was generated from the following file: