]> git.cworth.org Git - apitrace/blobdiff - retrace/glws_wgl.cpp
glretrace: GLX and WGL support for ES2/EGL traces.
[apitrace] / retrace / glws_wgl.cpp
index 9244b799d4ae2566bc5ee7fd92577be40c47a6e9..47b34a9413d1239d3bca8842f3b964be1a076286 100644 (file)
@@ -304,7 +304,8 @@ cleanup(void) {
 Visual *
 createVisual(bool doubleBuffer, Profile profile) {
     if (profile != PROFILE_COMPAT &&
-        profile != PROFILE_CORE) {
+        profile != PROFILE_CORE &&
+        profile != PROFILE_ES2) {
         return NULL;
     }
 
@@ -325,12 +326,20 @@ Context *
 createContext(const Visual *visual, Context *shareContext, Profile profile, bool debug)
 {
     if (profile != PROFILE_COMPAT &&
-        profile != PROFILE_CORE) {
+        profile != PROFILE_CORE &&
+        profile != PROFILE_ES2) {
         return NULL;
     }
 
-    if (profile == PROFILE_CORE) {
+    switch (profile)
+    {
+      case PROFILE_CORE:
         std::cerr << "warning: ignoring OpenGL core profile request\n";
+        break;
+
+      case PROFILE_ES2:
+        std::cerr << "warning: ignoring OpenGL ES 2.0 profile request\n";
+        break;
     }
 
     return new WglContext(visual, profile, static_cast<WglContext *>(shareContext));