Scene change support
This commit is contained in:
		@@ -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();
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
@@ -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;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user