Add a scope.
authorCarl Hetherington <cth@carlh.net>
Mon, 17 Oct 2022 20:38:23 +0000 (22:38 +0200)
committerCarl Hetherington <cth@carlh.net>
Tue, 18 Oct 2022 18:25:57 +0000 (20:25 +0200)
src/wx/gl_video_view.cc

index 05d3eb548c77f6b4fb2e7e5cd68269fbf4aac502..f8c97ba14013247cf5844c8f82ce68dae1820495 100644 (file)
@@ -472,14 +472,16 @@ GLVideoView::setup_shaders ()
                gl[15] = 1.0f;
        };
 
-       auto conversion = dcp::ColourConversion::rec709_to_xyz();
-       boost::numeric::ublas::matrix<double> matrix = conversion.xyz_to_rgb ();
-       GLfloat gl_matrix[16];
-       ublas_to_gl(matrix, gl_matrix);
-
-       auto xyz_rec709_colour_conversion = glGetUniformLocation(program, "xyz_rec709_colour_conversion");
-       check_gl_error ("glGetUniformLocation");
-       glUniformMatrix4fv(xyz_rec709_colour_conversion, 1, GL_TRUE, gl_matrix);
+       {
+               auto conversion = dcp::ColourConversion::rec709_to_xyz();
+               boost::numeric::ublas::matrix<double> matrix = conversion.xyz_to_rgb ();
+               GLfloat gl_matrix[16];
+               ublas_to_gl(matrix, gl_matrix);
+
+               auto xyz_rec709_colour_conversion = glGetUniformLocation(program, "xyz_rec709_colour_conversion");
+               check_gl_error ("glGetUniformLocation");
+               glUniformMatrix4fv(xyz_rec709_colour_conversion, 1, GL_TRUE, gl_matrix);
+       }
 
        glLineWidth (1.0f);
        check_gl_error ("glLineWidth");