diff options
| author | Carl Hetherington <cth@carlh.net> | 2022-10-17 22:38:23 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2022-10-18 01:14:05 +0200 |
| commit | 3671d744ec11522b80481b2f0f0bfdfcbec45c5b (patch) | |
| tree | cf5fe1d63249abc17784aa1176fab0b3278b33e7 | |
| parent | a3ccd045f599b346f1924473e6f28e36dfc81598 (diff) | |
Add a scope.
| -rw-r--r-- | src/wx/gl_video_view.cc | 18 |
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"); |
