rendertarget multi frame rewrite
This commit is contained in:
parent
7f46ac13fa
commit
2b22c16ce7
13 changed files with 225 additions and 276 deletions
|
|
@ -47,7 +47,6 @@ export namespace Crafter {
|
|||
std::vector<Vector<std::uint8_t, 4, Alignment>> scalingBuffer;
|
||||
std::uint32_t bufferWidth;
|
||||
std::uint32_t bufferHeight;
|
||||
bool bufferUpdated = true;
|
||||
RenderElement2DScalingOwning() = default;
|
||||
RenderElement2DScalingOwning(std::uint32_t bufferWidth, std::uint32_t bufferHeight) : scalingBuffer(bufferWidth*bufferHeight), bufferWidth(bufferWidth), bufferHeight(bufferHeight) {
|
||||
|
||||
|
|
@ -59,7 +58,6 @@ export namespace Crafter {
|
|||
Vector<std::uint8_t, 4, Alignment>* scalingBuffer;
|
||||
std::uint32_t bufferWidth;
|
||||
std::uint32_t bufferHeight;
|
||||
bool bufferUpdated = true;
|
||||
RenderElement2DScalingNonOwning() = default;
|
||||
RenderElement2DScalingNonOwning(Vector<std::uint8_t, 4, Alignment>* scalingBuffer, std::uint32_t bufferWidth, std::uint32_t bufferHeight) : scalingBuffer(scalingBuffer), bufferWidth(bufferWidth), bufferHeight(bufferHeight) {
|
||||
|
||||
|
|
@ -68,7 +66,6 @@ export namespace Crafter {
|
|||
|
||||
struct RenderElement2DRotating {
|
||||
float rotation;
|
||||
bool rotationUpdated = true;
|
||||
RenderElement2DRotating() = default;
|
||||
RenderElement2DRotating(float rotation) : rotation(rotation) {
|
||||
|
||||
|
|
@ -97,14 +94,20 @@ export namespace Crafter {
|
|||
EmptyRotatingBase
|
||||
>;
|
||||
|
||||
template<std::uint8_t Frames = 1>
|
||||
struct RenderingElement2DBase : Transform2D {
|
||||
ScaleData2D oldScale[Frames];
|
||||
std::vector<Vector<std::uint8_t, 4>> buffer;
|
||||
OpaqueType opaque;
|
||||
RenderingElement2DBase(Anchor2D anchor) : Transform2D(anchor) {
|
||||
scaled.size.x = 0;
|
||||
for(std::uint8_t i = 0; i < Frames; i++) {
|
||||
this->scaled[i].size.x = 0;
|
||||
}
|
||||
}
|
||||
RenderingElement2DBase(Anchor2D anchor, OpaqueType opaque) : Transform2D(anchor), opaque(opaque) {
|
||||
scaled.size.x = 0;
|
||||
for(std::uint8_t i = 0; i < Frames; i++) {
|
||||
this->scaled[i].size.x = 0;
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue