Browse Source

BGRA support

Nicolas Cannasse 8 years ago
parent
commit
40841c4e80
2 changed files with 3 additions and 1 deletions
  1. 2 0
      libs/sdl/sdl/GL.hx
  2. 1 1
      libs/sdl/sdl/Sdl.hx

+ 2 - 0
libs/sdl/sdl/GL.hx

@@ -534,6 +534,8 @@ class GL {
 	public static inline var LUMINANCE                      = 0x1909;
 	public static inline var LUMINANCE                      = 0x1909;
 	public static inline var LUMINANCE_ALPHA                = 0x190A;
 	public static inline var LUMINANCE_ALPHA                = 0x190A;
 
 
+	public static inline var BGRA							= 0x80E1;
+	public static inline var RGBA8							= 0x8058;
 
 
 	/* PixelType */
 	/* PixelType */
 	/*      UNSIGNED_BYTE */
 	/*      UNSIGNED_BYTE */

+ 1 - 1
libs/sdl/sdl/Sdl.hx

@@ -155,7 +155,7 @@ class Sdl {
 		var dnames = new Map();
 		var dnames = new Map();
 		for( v in arr ) {
 		for( v in arr ) {
 			if( v == null ) break;
 			if( v == null ) break;
-			var d = @:privateAccess String.fromUCS2(v);
+			var d = StringTools.trim(@:privateAccess String.fromUCS2(v));
 			if( dnames.exists(d) || StringTools.startsWith(d,"RDP") /* RemoteDesktop */ ) continue;
 			if( dnames.exists(d) || StringTools.startsWith(d,"RDP") /* RemoteDesktop */ ) continue;
 			dnames.set(d, true);
 			dnames.set(d, true);
 			a.push(d);
 			a.push(d);