aboutsummaryrefslogtreecommitdiffstats
path: root/src/newt
diff options
context:
space:
mode:
Diffstat (limited to 'src/newt')
-rw-r--r--src/newt/classes/com/jogamp/newt/Display.java8
-rw-r--r--src/newt/classes/jogamp/newt/driver/macosx/DisplayDriver.java5
-rw-r--r--src/newt/classes/jogamp/newt/driver/x11/DisplayDriver.java3
3 files changed, 12 insertions, 4 deletions
diff --git a/src/newt/classes/com/jogamp/newt/Display.java b/src/newt/classes/com/jogamp/newt/Display.java
index 7ab2794eb..c4b919951 100644
--- a/src/newt/classes/com/jogamp/newt/Display.java
+++ b/src/newt/classes/com/jogamp/newt/Display.java
@@ -168,6 +168,14 @@ public abstract class Display {
* <p>
* Using this value will avoid conversion within {@link #createPointerIcon(PixelRectangle, int, int)}.
* </p>
+ * <p>
+ * Known native pixel formats are:
+ * <ul>
+ * <li>X11: {@link PixelFormat#BGRA8888}</li>
+ * <li>Windows: {@link PixelFormat#BGRA8888}</li>
+ * <li>OSX: {@link PixelFormat#RGBA8888}</li>
+ * </ul>
+ * </p>
*/
public abstract PixelFormat getNativePointerIconPixelFormat();
diff --git a/src/newt/classes/jogamp/newt/driver/macosx/DisplayDriver.java b/src/newt/classes/jogamp/newt/driver/macosx/DisplayDriver.java
index 4ecc2fdcf..051294dce 100644
--- a/src/newt/classes/jogamp/newt/driver/macosx/DisplayDriver.java
+++ b/src/newt/classes/jogamp/newt/driver/macosx/DisplayDriver.java
@@ -70,7 +70,7 @@ public class DisplayDriver extends DisplayImpl {
// NOTE: MUST BE DIRECT BUFFER, since NSBitmapImageRep uses buffer directly!
final IOUtil.ClassResources iconRes = NewtFactory.getWindowIcons();
final URLConnection urlConn = iconRes.resolve(iconRes.resourceCount()-1);
- image = PNGPixelRect.read(urlConn.getInputStream(), PixelFormat.BGRA8888, true /* directBuffer */, 0 /* destMinStrideInBytes */, false /* destIsGLOriented */);
+ image = PNGPixelRect.read(urlConn.getInputStream(), PixelFormat.RGBA8888, true /* directBuffer */, 0 /* destMinStrideInBytes */, false /* destIsGLOriented */);
} catch (final Exception e) {
e.printStackTrace();
}
@@ -97,6 +97,9 @@ public class DisplayDriver extends DisplayImpl {
}
@Override
+ public PixelFormat getNativePointerIconPixelFormat() { return PixelFormat.RGBA8888; }
+
+ @Override
protected void dispatchMessagesNative() {
// nop
}
diff --git a/src/newt/classes/jogamp/newt/driver/x11/DisplayDriver.java b/src/newt/classes/jogamp/newt/driver/x11/DisplayDriver.java
index 759c27450..e2b9a65d1 100644
--- a/src/newt/classes/jogamp/newt/driver/x11/DisplayDriver.java
+++ b/src/newt/classes/jogamp/newt/driver/x11/DisplayDriver.java
@@ -125,9 +125,6 @@ public class DisplayDriver extends DisplayImpl {
protected Boolean isXineramaEnabled() { return isNativeValid() ? Boolean.valueOf(((X11GraphicsDevice)aDevice).isXineramaEnabled()) : null; }
@Override
- public final PixelFormat getNativePointerIconPixelFormat() { return PixelFormat.RGBA8888; }
-
- @Override
protected final long createPointerIconImpl(final PixelFormat pixelformat, final int width, final int height, final ByteBuffer pixels, final int hotX, final int hotY) {
return createPointerIcon(getHandle(), pixels, width, height, hotX, hotY);
}