From 92706445d9054fbe7ad66581c8bd56f4e0de4a69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20Ka=CC=88fer?= Date: Mon, 19 May 2014 14:21:15 +0200 Subject: init glfw for debug images + actually copy images over --- common/glfw_view.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'common') diff --git a/common/glfw_view.cpp b/common/glfw_view.cpp index 3ef7bc36a9..e03b5ed2fe 100644 --- a/common/glfw_view.cpp +++ b/common/glfw_view.cpp @@ -204,6 +204,8 @@ namespace platform { double elapsed() { return glfwGetTime(); } void show_debug_image(std::string name, const char *data, size_t width, size_t height) { + glfwInit(); + static GLFWwindow *debug_window = nullptr; if (!debug_window) { debug_window = glfwCreateWindow(width, height, name.c_str(), nullptr, nullptr); @@ -233,6 +235,8 @@ void show_debug_image(std::string name, const char *data, size_t width, size_t h void show_color_debug_image(std::string name, const char *data, size_t logical_width, size_t logical_height, size_t width, size_t height) { + glfwInit(); + static GLFWwindow *debug_window = nullptr; if (!debug_window) { debug_window = glfwCreateWindow(logical_width, logical_height, name.c_str(), nullptr, nullptr); -- cgit v1.2.1