diff --git a/.gitignore b/.gitignore index d56edb0c..dba36282 100644 --- a/.gitignore +++ b/.gitignore @@ -14,6 +14,7 @@ testmaps/*.bsp testmaps/*.bsp.qbsplog testmaps/*.log testmaps/*.prt +testmaps/*.lit testmaps/*.obj testmaps/*.pts testmaps/*.vis diff --git a/include/common/mapfile.hh b/include/common/mapfile.hh index d450125b..b68cd40f 100644 --- a/include/common/mapfile.hh +++ b/include/common/mapfile.hh @@ -79,7 +79,10 @@ struct texture_axis_t qvec3d snapped_normal; // use_new_axis = !qbsp_options.oldaxis.value() - constexpr texture_axis_t(const qplane3d &plane, bool use_new_axis = false) + constexpr texture_axis_t(const qplane3d &plane, bool use_new_axis = false) : + xv(), // gcc C++20 bug workaround + yv(), + snapped_normal() { constexpr qvec3d baseaxis[18] = { {0, 0, 1}, {1, 0, 0}, {0, -1, 0}, // floor diff --git a/lightpreview/glview.cpp b/lightpreview/glview.cpp index bc89f32b..d077070b 100644 --- a/lightpreview/glview.cpp +++ b/lightpreview/glview.cpp @@ -1397,7 +1397,7 @@ void GLView::renderBSP(const QString &file, const mbsp_t &bsp, const bspxentries double y = split[1].toDouble(); double z = split[2].toDouble(); - points.emplace_back(qvec3f{(float)x, (float)y, (float)z}); + points.push_back(simple_vertex_t{qvec3f{(float)x, (float)y, (float)z}}); num_leak_points++; } @@ -1433,7 +1433,7 @@ void GLView::renderBSP(const QString &file, const mbsp_t &bsp, const bspxentries for (auto &pt : portal.winding) { indices.push_back(current_index++); - points.emplace_back(pt); + points.push_back(simple_vertex_t{qvec3f{pt}}); } indices.push_back((GLuint)-1); diff --git a/lightpreview/mainwindow.cpp b/lightpreview/mainwindow.cpp index f46e2aa2..548d1f90 100644 --- a/lightpreview/mainwindow.cpp +++ b/lightpreview/mainwindow.cpp @@ -709,16 +709,19 @@ int MainWindow::compileMap(const QString &file, bool is_reload) m_bspdata.loadversion->game->init_filesystem(file.toStdString(), settings); } } catch (const settings::parse_exception &p) { + // FIXME: threading error: don't call Qt widgets code from background thread auto *textEdit = m_outputLogWidget->textEdit(m_activeLogTab); textEdit->append(QString::fromUtf8(p.what()) + QString::fromLatin1("\n")); m_activeLogTab = ETLogTab::TAB_LIGHTPREVIEW; return 1; } catch (const settings::quit_after_help_exception &p) { + // FIXME: threading error: don't call Qt widgets code from background thread auto *textEdit = m_outputLogWidget->textEdit(m_activeLogTab); textEdit->append(QString::fromUtf8(p.what()) + QString::fromLatin1("\n")); m_activeLogTab = ETLogTab::TAB_LIGHTPREVIEW; return 1; } catch (const std::exception &other) { + // FIXME: threading error: don't call Qt widgets code from background thread auto *textEdit = m_outputLogWidget->textEdit(m_activeLogTab); textEdit->append(QString::fromUtf8(other.what()) + QString::fromLatin1("\n")); m_activeLogTab = ETLogTab::TAB_LIGHTPREVIEW;