Adding default model
This commit is contained in:
parent
9bce01a717
commit
c2d07bc40c
4 changed files with 7 additions and 2 deletions
|
@ -4,5 +4,6 @@
|
||||||
<file>mesh.vert</file>
|
<file>mesh.vert</file>
|
||||||
<file>quad.frag</file>
|
<file>quad.frag</file>
|
||||||
<file>quad.vert</file>
|
<file>quad.vert</file>
|
||||||
|
<file>sphere.stl</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
|
BIN
gl/sphere.stl
Normal file
BIN
gl/sphere.stl
Normal file
Binary file not shown.
|
@ -8,6 +8,7 @@ App::App(int argc, char *argv[]) :
|
||||||
QApplication(argc, argv), window(new Window())
|
QApplication(argc, argv), window(new Window())
|
||||||
{
|
{
|
||||||
window->show();
|
window->show();
|
||||||
|
window->load_stl(":gl/sphere.stl");
|
||||||
}
|
}
|
||||||
|
|
||||||
bool App::event(QEvent* e)
|
bool App::event(QEvent* e)
|
||||||
|
|
|
@ -88,8 +88,11 @@ bool Window::load_stl(const QString& filename)
|
||||||
connect(loader, &Loader::finished,
|
connect(loader, &Loader::finished,
|
||||||
[=](){ canvas->set_status(""); });
|
[=](){ canvas->set_status(""); });
|
||||||
|
|
||||||
connect(loader, &Loader::loaded_file,
|
if (filename[0] != ':')
|
||||||
this, &Window::setWindowTitle);
|
{
|
||||||
|
connect(loader, &Loader::loaded_file,
|
||||||
|
this, &Window::setWindowTitle);
|
||||||
|
}
|
||||||
|
|
||||||
loader->start();
|
loader->start();
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue