=== modified file 'src/composite-canvas-egl.cc'
@@ -22,6 +22,7 @@
*/
#include <string>
+#include <sstream>
#include "gl-headers.h"
@@ -273,3 +274,18 @@
else
glFinish();
}
+
+std::string
+CompositeCanvasEGL::info_string()
+{
+ make_current();
+
+ std::stringstream ss;
+
+ ss << " OpenGL Information" << std::endl;
+ ss << " GL_VENDOR: " << glGetString(GL_VENDOR) << std::endl;
+ ss << " GL_RENDERER: " << glGetString(GL_RENDERER) << std::endl;
+ ss << " GL_VERSION: " << glGetString(GL_VERSION) << std::endl;
+
+ return ss.str();
+}
=== modified file 'src/composite-canvas-egl.h'
@@ -36,6 +36,8 @@
egl_context_(0), egl_surface_(0),
use_accel_tfp_(false) {}
+ std::string info_string();
+
protected:
XVisualInfo *get_canvas_xvisualinfo();
bool make_current();
=== modified file 'src/composite-canvas-glx.cc'
@@ -22,6 +22,7 @@
*/
#include <string>
+#include <sstream>
#include <GL/gl.h>
#include <GL/glx.h>
@@ -218,3 +219,18 @@
else
glFinish();
}
+
+std::string
+CompositeCanvasGLX::info_string()
+{
+ make_current();
+
+ std::stringstream ss;
+
+ ss << " OpenGL Information" << std::endl;
+ ss << " GL_VENDOR: " << glGetString(GL_VENDOR) << std::endl;
+ ss << " GL_RENDERER: " << glGetString(GL_RENDERER) << std::endl;
+ ss << " GL_VERSION: " << glGetString(GL_VERSION) << std::endl;
+
+ return ss.str();
+}
=== modified file 'src/composite-canvas-glx.h'
@@ -35,6 +35,8 @@
glx_fbconfig_(0), glx_context_(0),
use_accel_tfp_(false) {}
+ std::string info_string();
+
protected:
XVisualInfo *get_canvas_xvisualinfo();
bool make_current();
=== modified file 'src/composite-canvas.h'
@@ -51,6 +51,7 @@
bool init();
void run_tests(std::list<Benchmark*> &benchmarks);
+ virtual std::string info_string() { return std::string(); }
protected:
virtual XVisualInfo *get_canvas_xvisualinfo() = 0;
=== modified file 'src/glcompbench.cc'
@@ -126,6 +126,13 @@
add_custom_benchmarks(benchmarks);
canvas.init();
+
+ Log::info("=======================================================\n");
+ Log::info(" glcompbench %s\n", GLCOMPBENCH_VERSION);
+ Log::info("=======================================================\n");
+ Log::info("%s", canvas.info_string().c_str());
+ Log::info("=======================================================\n");
+
canvas.run_tests(benchmarks);
return 0;