Fix compilation

This commit is contained in:
Jérôme Leclercq
2022-03-04 18:16:12 +01:00
parent 0c3607579e
commit 1919bd3302
22 changed files with 322 additions and 136 deletions

View File

@@ -181,7 +181,7 @@ void MainWindow::OnCompile()
{
try
{
auto shader = m_shaderGraph.ToAst();
auto shaderModule = m_shaderGraph.ToModule();
QString fileName = QFileDialog::getSaveFileName(nullptr, tr("Save shader"), QString(), tr("Shader Files (*.shader)"));
if (fileName.isEmpty())
@@ -191,7 +191,7 @@ void MainWindow::OnCompile()
fileName += ".shader";
Nz::File file(fileName.toStdString(), Nz::OpenMode::WriteOnly);
file.Write(Nz::ShaderAst::SerializeShader(shader));
file.Write(Nz::ShaderAst::SerializeShader(*shaderModule));
}
catch (const std::exception& e)
{