gl fixes on win32
authorMaria Shcherbina <m.shcherbina@samsung.com>
Thu, 12 Jul 2012 08:15:31 +0000 (12:15 +0400)
committerEvgeny Voevodin <e.voevodin@samsung.com>
Fri, 13 Jul 2012 05:28:00 +0000 (09:28 +0400)
Signed-off-by: Maria Shcherbina <m.shcherbina@samsung.com>
gl/dgles2/build.sh
hw/gles2.c

index eda1c64da0e6dc550cc7492c85146d49b3b604e9..5e1f592c602b07a1895d468b46ec4e210489c963 100755 (executable)
@@ -14,7 +14,7 @@ fi;
 TARGET_OS=`uname -s`
 case $TARGET_OS in
 MINGW*)
-TARGET_OS="MINGW"
+TARGET_OS="MINGW32"
 ;;
 esac
 
@@ -39,6 +39,8 @@ make distclean && \
 ./configure --disable-static --enable-wgl --disable-cocoa --disable-osmesa --enable-offscreen --disable-glx --disable-x11 --prefix="`pwd`/.." --arch=$TARGET_ARCH && \
 make install
 make distclean
+;;
+*)
 echo "OpenGL acceleration is not currently supported for $TARGET_OS"
 ;;
 esac
index 82cbcf869cf4d1b689dbc279c3712aee9c037987..3d87c9946ef6103dc4939d5a06f71f7e7d162876 100644 (file)
@@ -526,7 +526,11 @@ void *gles2_init(CPUArchState *env)
     MemoryRegion *system_mem = get_system_memory();
 
     setenv("DGLES2_FRONTEND", "offscreen", 1);
+#ifdef _WIN32
+    setenv("DGLES2_BACKEND", "wgl", 0);
+#else
     setenv("DGLES2_BACKEND", "glx", 0);
+#endif
     setenv("DGLES2_NO_ALPHA", "1", 1);
 
     gles2_State *s = g_malloc0(sizeof(*s));