]> git.cworth.org Git - apitrace/commitdiff
Ignore OpenGL core 3.2 requirement on Windows.
authorJosé Fonseca <jose.r.fonseca@gmail.com>
Wed, 24 Oct 2012 12:34:03 +0000 (13:34 +0100)
committerJosé Fonseca <jose.r.fonseca@gmail.com>
Wed, 24 Oct 2012 12:34:03 +0000 (13:34 +0100)
Better than aborting, until it is supported.

retrace/glws_wgl.cpp

index 878726b87f99853d9c92bff014601c1112577338..de6c7d6b546161fe4c1968cb1f3305632cb1dee9 100644 (file)
@@ -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));
 }