rendertarget multi frame rewrite complete
This commit is contained in:
parent
2b22c16ce7
commit
bc97c13a0b
6 changed files with 76 additions and 22 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue