diff options
author | Sven Gothel <[email protected]> | 2014-02-13 00:17:09 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2014-02-13 00:17:09 +0100 |
commit | 21b68a5e73a672da34b37b5641b779aa1e3fa41d (patch) | |
tree | 2b57fe8af6d317678b023a5d95155ff2a8e7de59 /src/nativewindow/classes | |
parent | 0666a9ee8332e8ab59d533c65552dae8c58cf267 (diff) |
TextureIO: Support PNGTextureWriter w/ TextureData IntBuffer (via PNGPixelRect and PixelFormatUtil)
TextureData IntBuffer could be caused by AWT read-pixels
but is not seamlessly supported via PNGPixelRect since the latter
uses a hardcoded ByteBuffer.
Add static PNGPixelRect.write(..) supporting IntBuffer
to support this case for now.
PNGPixelRect instances do not support any Buffer type to avoid
a bloated implementation.
PixelFormatUtil adds support for int32 pixel format conversion.
Diffstat (limited to 'src/nativewindow/classes')
-rw-r--r-- | src/nativewindow/classes/javax/media/nativewindow/util/PixelFormatUtil.java | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/nativewindow/classes/javax/media/nativewindow/util/PixelFormatUtil.java b/src/nativewindow/classes/javax/media/nativewindow/util/PixelFormatUtil.java index 361d03446..87a9ca4fc 100644 --- a/src/nativewindow/classes/javax/media/nativewindow/util/PixelFormatUtil.java +++ b/src/nativewindow/classes/javax/media/nativewindow/util/PixelFormatUtil.java @@ -208,7 +208,6 @@ public class PixelFormatUtil { return convertToInt32(dest_fmt, r, g, b, a); } - /** public static int convertToInt32(PixelFormat dest_fmt, PixelFormat src_fmt, final int src_pixel) { final byte r, g, b, a; switch(src_fmt) { @@ -258,7 +257,7 @@ public class PixelFormatUtil { throw new InternalError("Unhandled format "+src_fmt); } return convertToInt32(dest_fmt, r, g, b, a); - } */ + } public static PixelRectangle convert32(final PixelRectangle src, final PixelFormat destFmt, int ddestStride, final boolean isGLOriented, |