]> git.sesse.net Git - nageru/blobdiff - glwidget.cpp
Add a CORS policy to the channel endpoints, so that external applications can query...
[nageru] / glwidget.cpp
index 31018d6b95d5436cddc840ab01738b1b30ded18b..cccfa3af631b6d869255cf8f3b06addc2019c1dc 100644 (file)
@@ -90,6 +90,8 @@ void GLWidget::initializeGL()
 
 void GLWidget::resizeGL(int width, int height)
 {
+       current_width = width;
+       current_height = height;
        glViewport(0, 0, width, height);
 }
 
@@ -111,7 +113,7 @@ void GLWidget::paintGL()
        check_error();
        glDisable(GL_FRAMEBUFFER_SRGB);
        check_error();
-       frame.chain->render_to_screen();
+       frame.chain->render_to_fbo(0, current_width, current_height);
        check_error();
 
        if (resource_pool == nullptr) {
@@ -133,7 +135,9 @@ void GLWidget::show_context_menu(const QPoint &pos)
        }
        if (output >= Mixer::OUTPUT_INPUT0) {
                int signal_num = global_mixer->get_channel_signal(output);
-               show_preview_context_menu(signal_num, pos);
+               if (signal_num != -1) {
+                       show_preview_context_menu(signal_num, pos);
+               }
        }
 }