]> git.sesse.net Git - nageru/blobdiff - mainwindow.cpp
Use the new Movit functionality to save a texture upload for the preview.
[nageru] / mainwindow.cpp
index 4804c088d98f7d3bc1f126d9a786ca181c18dea5..65b95808e6c6f986a9a3d686fb133174f6499fdf 100644 (file)
@@ -5,9 +5,22 @@
 #include "context.h"
 #include "mixer.h"
 
+#include "ui_mainwindow.cpp"
+
 using std::thread;
 
 MainWindow::MainWindow()
 {
-        setCentralWidget(new Window(this));
+       Ui::MainWindow *ui = new Ui::MainWindow;
+       ui->setupUi(this);
+       connect(ui->cut_btn, SIGNAL(clicked()), this, SLOT(cut()));
+
+       ui->me_live->set_output(Mixer::OUTPUT_LIVE);
+       ui->me_preview->set_output(Mixer::OUTPUT_PREVIEW);
+}
+
+void MainWindow::cut()
+{
+       static int i = 0;
+       global_mixer->cut(Mixer::Source((++i) % 3));
 }