summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2022-10-17 22:38:23 +0200
committerCarl Hetherington <cth@carlh.net>2022-10-18 20:25:57 +0200
commit1d6fbc1db119e69cbe72a56acc82884b623079c1 (patch)
tree5b2ddced3282f61375c5e6a0e4af84ef8106c825
parentfded83c2bc934d27c74227202a6aecf2c24a9e3c (diff)
Add a scope.
-rw-r--r--src/wx/gl_video_view.cc18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/wx/gl_video_view.cc b/src/wx/gl_video_view.cc
index 05d3eb548..f8c97ba14 100644
--- a/src/wx/gl_video_view.cc
+++ b/src/wx/gl_video_view.cc
@@ -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");