add setBuff method to Buffer2D

This commit is contained in:
Ilya Shurupov 2024-11-24 01:45:50 +03:00
parent 762268387e
commit 068348b3e3

View file

@ -58,6 +58,7 @@ namespace tp {
[[nodiscard]] Index2D size() const { return { mSize.x, mSize.y }; }
tType* getBuff() const { return mBuff; }
void setBuff(tType* data, Index2D size) { mBuff = data; mSize = size; }
void flipY() {
for (Index i = 0; i < mSize.x; i++) {