rendertarget multi frame rewrite complete

This commit is contained in:
Jorijn van der Graaf 2026-03-13 01:06:55 +01:00
commit bc97c13a0b
6 changed files with 76 additions and 22 deletions

View file

@ -97,16 +97,22 @@ export namespace Crafter {
template<std::uint8_t Frames = 1>
struct RenderingElement2DBase : Transform2D {
ScaleData2D oldScale[Frames];
bool redraw[Frames];
std::vector<Vector<std::uint8_t, 4>> buffer;
OpaqueType opaque;
RenderingElement2DBase(Anchor2D anchor) : Transform2D(anchor) {
for(std::uint8_t i = 0; i < Frames; i++) {
this->scaled[i].size.x = 0;
this->scaled.size.x = 0;
}
}
RenderingElement2DBase(Anchor2D anchor, OpaqueType opaque) : Transform2D(anchor), opaque(opaque) {
for(std::uint8_t i = 0; i < Frames; i++) {
this->scaled[i].size.x = 0;
this->scaled.size.x = 0;
}
}
void Redraw() {
for(std::uint8_t i = 0; i < Frames; i++) {
redraw[i] = true;
}
}
};