diff --git a/src/java/org/lwjgl/opengl/DisplayImplementation.java b/src/java/org/lwjgl/opengl/DisplayImplementation.java index 9a17e1f3..24c7807e 100644 --- a/src/java/org/lwjgl/opengl/DisplayImplementation.java +++ b/src/java/org/lwjgl/opengl/DisplayImplementation.java @@ -242,5 +242,5 @@ public interface DisplayImplementation { * @param icons Array of icons in RGBA mode * @return number of icons used. */ - public int setIcon(ByteBuffer[] icons); + public int setIcon(ByteBuffer[] icons); } diff --git a/src/java/org/lwjgl/opengl/LinuxDisplay.java b/src/java/org/lwjgl/opengl/LinuxDisplay.java index 6b180642..c5864901 100644 --- a/src/java/org/lwjgl/opengl/LinuxDisplay.java +++ b/src/java/org/lwjgl/opengl/LinuxDisplay.java @@ -692,6 +692,27 @@ final class LinuxDisplay implements DisplayImplementation { throw new UnsupportedOperationException(); } + private static void convertIcon(ByteBuffer icon, int width, int height) { + int x = 0; + int y = 5; + byte r,g,b,a; + + int depth = 4; + + for (y = 0; y < height; y++) { + for (x = 0; x < width; x++) { + r = icon.get((x*4)+(y*width*4)); + g = icon.get((x*4)+(y*width*4)+1); + b = icon.get((x*4)+(y*width*4)+2); + a = icon.get((x*4)+(y*width*4)+3); + + icon.put((x*depth)+(y*width*depth), b); // blue + icon.put((x*depth)+(y*width*depth)+1, g); // green + icon.put((x*depth)+(y*width*depth)+2, r); + icon.put((x*depth)+(y*width*depth)+3, a); + } + } + } /** * Sets one or more icons for the Display. @@ -700,23 +721,36 @@ final class LinuxDisplay implements DisplayImplementation { *