From f51fd9be585814dedf108cb6e81a674717e39fe6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20Ka=CC=88fer?= Date: Tue, 17 Jun 2014 05:52:39 -0700 Subject: [PATCH] make sure to use OpenGL ES 2.0 when compiling for nvidia chips --- common/glfw_view.cpp | 2 ++ common/glfw_view.hpp | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/common/glfw_view.cpp b/common/glfw_view.cpp index f33c82667..b4e6c7246 100644 --- a/common/glfw_view.cpp +++ b/common/glfw_view.cpp @@ -220,6 +220,7 @@ namespace platform { double elapsed() { return glfwGetTime(); } +#ifndef GL_ES_VERSION_2_0 void show_debug_image(std::string name, const char *data, size_t width, size_t height) { glfwInit(); @@ -285,6 +286,7 @@ void show_color_debug_image(std::string name, const char *data, size_t logical_w glfwMakeContextCurrent(current_window); } +#endif void notify_map_change() { // no-op diff --git a/common/glfw_view.hpp b/common/glfw_view.hpp index d8ea7a90a..62da124ca 100644 --- a/common/glfw_view.hpp +++ b/common/glfw_view.hpp @@ -2,7 +2,12 @@ #define LLMR_COMMON_GLFW_VIEW #include + +#ifdef NVIDIA +#define GLFW_INCLUDE_ES2 +#endif #include + #include class GLFWView : public llmr::View {