From 8ab3aa7e2191fb30d168ea02d38e5b1acc0877f4 Mon Sep 17 00:00:00 2001
From: =?utf8?q?Jos=C3=A9=20Fonseca?= <jose.r.fonseca@gmail.com>
Date: Wed, 24 Oct 2012 13:34:03 +0100
Subject: [PATCH] Ignore OpenGL core 3.2 requirement on Windows.

Better than aborting, until it is supported.
---
 retrace/glws_wgl.cpp | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/retrace/glws_wgl.cpp b/retrace/glws_wgl.cpp
index 878726b..de6c7d6 100644
--- a/retrace/glws_wgl.cpp
+++ b/retrace/glws_wgl.cpp
@@ -303,7 +303,8 @@ cleanup(void) {
 
 Visual *
 createVisual(bool doubleBuffer, Profile profile) {
-    if (profile != PROFILE_COMPAT) {
+    if (profile != PROFILE_COMPAT &&
+        profile != PROFILE_CORE) {
         return NULL;
     }
 
@@ -323,10 +324,15 @@ createDrawable(const Visual *visual, int width, int height, bool pbuffer)
 Context *
 createContext(const Visual *visual, Context *shareContext, Profile profile, bool debug)
 {
-    if (profile != PROFILE_COMPAT) {
+    if (profile != PROFILE_COMPAT &&
+        profile != PROFILE_CORE) {
         return NULL;
     }
 
+    if (profile == PROFILE_CORE) {
+        std::cerr << "warning: ignoring OpenGL core profile request\n";
+    }
+
     return new WglContext(visual, profile, static_cast<WglContext *>(shareContext));
 }
 
-- 
2.45.2