mirror of
https://github.com/TomHarte/CLK.git
synced 2024-12-25 18:30:21 +00:00
Ensures OpenGL version is logged prior to any other GL calls.
This commit is contained in:
parent
9f6956bd87
commit
080f949f89
@ -10,7 +10,6 @@
|
||||
|
||||
#include "OpenGL.hpp"
|
||||
#include "Primitives/Rectangle.hpp"
|
||||
#include "../Log.hpp"
|
||||
|
||||
#include <cassert>
|
||||
#include <cstring>
|
||||
@ -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_);
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user