Helper for rendering the map by ordering draw operations. More...
#include <display.hpp>
Public Member Functions | |
bool | operator< (const draw_helper &rhs) const |
Public Attributes | |
const uint32_t | key |
Controls the ordering of draw calls by layer and location. More... | |
std::function< void(const rect &)> | do_draw |
Handles the actual drawing at this location. More... | |
rect | dest |
The screen coordinates for the specified hex. More... | |
Helper for rendering the map by ordering draw operations.
In order to render a hex properly, they need to be rendered per row. In this row several layers need to be drawn at the same time, mainly the unit and the background terrain. This is needed since both can spill into the next hex. The foreground terrain needs to be drawn before to avoid decapitating a unit.
In other words: for every layer for every row (starting from the top) for every hex in the row ...
this is modified to: for every layer group for every row (starting from the top) for every layer in the group for every hex in the row ...
Definition at line 839 of file display.hpp.
|
inline |
Definition at line 850 of file display.hpp.
References key.
rect display::draw_helper::dest |
The screen coordinates for the specified hex.
This is passed to do_draw
Definition at line 848 of file display.hpp.
std::function<void(const rect&)> display::draw_helper::do_draw |
Handles the actual drawing at this location.
Definition at line 845 of file display.hpp.
const uint32_t display::draw_helper::key |
Controls the ordering of draw calls by layer and location.
Definition at line 842 of file display.hpp.
Referenced by operator<().