rendertargetvulkan
This commit is contained in:
parent
8b12dc39b3
commit
1c1a142f52
9 changed files with 221 additions and 146 deletions
|
|
@ -33,8 +33,7 @@ export namespace Crafter {
|
|||
GridElement(std::uint32_t columns, std::uint32_t rows, std::int32_t spacingX, std::int32_t spacingY, std::int32_t paddingX, std::int32_t paddingY, Anchor2D anchor) : Transform2D(anchor), columns(columns), rows(rows), spacingX(spacingX), spacingY(spacingY), paddingX(paddingX), paddingY(paddingY) {
|
||||
|
||||
}
|
||||
template<std::uint8_t Frames>
|
||||
void UpdatePositionImpl(RendertargetBase<Frames>& window, Transform2D& parent) {
|
||||
void UpdatePosition(RendertargetBase& window, Transform2D& parent) override {
|
||||
ScaleElement(parent);
|
||||
std::int32_t cellWidth = (paddingX * 2) - (spacingX * (columns - 1)) / columns;
|
||||
std::int32_t cellHeight = (paddingY * 2) - (spacingY * (rows - 1)) / rows;
|
||||
|
|
@ -61,11 +60,5 @@ export namespace Crafter {
|
|||
}
|
||||
}
|
||||
}
|
||||
void UpdatePosition(RendertargetBase<1>& window, Transform2D& parent) override {
|
||||
UpdatePositionImpl<1>(window, parent);
|
||||
}
|
||||
void UpdatePosition(RendertargetBase<3>& window, Transform2D& parent) override {
|
||||
UpdatePositionImpl<3>(window, parent);
|
||||
}
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue