Fix segfault binding unloaded texture.

This commit is contained in:
2025-03-22 12:55:31 -04:00
parent c5e21bd731
commit fb9c320633
6 changed files with 55 additions and 32 deletions

View File

@@ -22,18 +22,7 @@ ExampleScene::~ExampleScene() = default;
void ExampleScene::init()
{
setSkybox(new Qtk::Skybox(":/textures/skybox/right.png",
":/textures/skybox/top.png",
":/textures/skybox/front.png",
":/textures/skybox/left.png",
":/textures/skybox/bottom.png",
":/textures/skybox/back.png",
"Skybox"));
std::string spartanPath = QTK_EXAMPLE_SOURCE_DIR;
spartanPath += "/../resources/models/spartan/spartan.obj";
auto spartan = addObject(new Model("spartan", spartanPath.c_str()));
spartan->getTransform().setTranslation(-4.0f, 0.0f, 0.0f);
setSkybox(new Qtk::Skybox);
auto mesh = addObject(
new Qtk::MeshRenderer("rightTriangle", Triangle(QTK_DRAW_ELEMENTS)));