Fix segfault binding unloaded texture.
This commit is contained in:
@@ -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)));
|
||||
|
||||
Reference in New Issue
Block a user