OSDN Git Service

Docu update: glReadPixel(…) for GWT backend
authorChristoph Aschwanden <contact@noblemaster.com>
Fri, 14 Dec 2012 07:05:10 +0000 (16:05 +0900)
committerChristoph Aschwanden <contact@noblemaster.com>
Fri, 14 Dec 2012 07:05:10 +0000 (16:05 +0900)
backends/gdx-backends-gwt/issues.txt
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/GwtGL20.java

index 4fe2e14..23fec70 100644 (file)
@@ -5,7 +5,6 @@ DIFFERENCES TO MAIN APIs/UNSUSPECTED BEHAVIOUR
 - getters are not implemented, some are not supported by WebGL\r
 - uniform location id allocation returns multiple ids if one queries for one uniform multiple times. Not an issue as long\r
   as you don't start comparing those ids to each other.\r
-- glReadPixels does not work.\r
 \r
 [GwtInput]\r
 - mapping of a couple of (minor) keys is bad, see FIXMEs\r
index 0cfb305..491250b 100644 (file)
@@ -360,10 +360,10 @@ public class GwtGL20 implements GL20 {
        public void glReadPixels (int x, int y, int width, int height, int format, int type, Buffer pixels) {\r
                // verify request\r
                if ((format != WebGLRenderingContext.RGBA) || (type != WebGLRenderingContext.UNSIGNED_BYTE)) {\r
-                       throw new GdxRuntimeException("Only format UNSIGNED_BYTE for type RGBA is currently supported.");\r
+                       throw new GdxRuntimeException("Only format RGBA and type UNSIGNED_BYTE are currently supported for glReadPixels(...).");\r
                }\r
                if (!(pixels instanceof ByteBuffer)) {\r
-                       throw new GdxRuntimeException("Inputed pixels buffer needs to be of type ByteBuffer.");\r
+                       throw new GdxRuntimeException("Inputed pixels buffer needs to be of type ByteBuffer for glReadPixels(...).");\r
                }\r
                \r
                // create new ArrayBufferView (4 bytes per pixel)\r