Scene change support

This commit is contained in:
2023-06-30 07:33:22 -07:00
parent ee7963fb1a
commit af3b0751f7
24 changed files with 163 additions and 20 deletions

View File

@ -147,7 +147,7 @@ void Transform::setWorldTransform(glm::mat4 transform) {
void Transform::setParent(Transform *parent) {
assertTrue(parent != this);
assertTrue(parent == nullptr || parent != this);
auto currentParent = this->getParent();
if(currentParent == parent) return;
@ -190,6 +190,6 @@ Transform::~Transform() {
auto it = this->children.begin();
while(it != this->children.end()) {
(*it)->setParent(nullptr);
++it;
it = this->children.begin();
}
}

View File

@ -32,6 +32,8 @@ TrueTypeFaceTexture::TrueTypeFaceTexture(
assertUnreachable();
}
if(face->glyph->bitmap.width == 0 || face->glyph->bitmap.rows == 0) continue;
// Update the width and height
w = mathMax<size_t>(w, face->glyph->bitmap.width);
h += face->glyph->bitmap.rows;