diff --git a/Outputs/OpenGL/ScanTarget.cpp b/Outputs/OpenGL/ScanTarget.cpp index b434c0bba..2de6148c7 100644 --- a/Outputs/OpenGL/ScanTarget.cpp +++ b/Outputs/OpenGL/ScanTarget.cpp @@ -10,7 +10,6 @@ #include "OpenGL.hpp" #include "Primitives/Rectangle.hpp" -#include "../Log.hpp" #include #include @@ -79,9 +78,6 @@ ScanTarget::ScanTarget(GLuint target_framebuffer, float output_gamma) : unprocessed_line_texture_(LineBufferWidth, LineBufferHeight, UnprocessedLineBufferTextureUnit, GL_NEAREST, false), full_display_rectangle_(-1.0f, -1.0f, 2.0f, 2.0f) { - // Note the OpenGL version. - LOG("Constructing scan target with OpenGL " << glGetString(GL_VERSION) << "; shading language version " << glGetString(GL_SHADING_LANGUAGE_VERSION)); - // Ensure proper initialisation of the two atomic pointer sets. read_pointers_.store(write_pointers_); submit_pointers_.store(write_pointers_); diff --git a/Outputs/OpenGL/ScanTarget.hpp b/Outputs/OpenGL/ScanTarget.hpp index dbd2fe467..58937daa4 100644 --- a/Outputs/OpenGL/ScanTarget.hpp +++ b/Outputs/OpenGL/ScanTarget.hpp @@ -10,6 +10,8 @@ #define ScanTarget_hpp #include "../ScanTarget.hpp" +#include "../Log.hpp" + #include "OpenGL.hpp" #include "Primitives/TextureTarget.hpp" #include "Primitives/Rectangle.hpp" @@ -43,6 +45,15 @@ class ScanTarget: public Outputs::Display::ScanTarget { void draw(bool synchronous, int output_width, int output_height); private: +#ifndef NDEBUG + struct OpenGLVersionDumper { + OpenGLVersionDumper() { + // Note the OpenGL version, as the first thing this class does prior to construction. + LOG("Constructing scan target with OpenGL " << glGetString(GL_VERSION) << "; shading language version " << glGetString(GL_SHADING_LANGUAGE_VERSION)); + } + } dumper_; +#endif + static constexpr int WriteAreaWidth = 2048; static constexpr int WriteAreaHeight = 2048;