Login  Register

Re: Mac OSX - newt pointer and window icon displays incorrectly

Posted by Sven Gothel on Oct 10, 2014; 1:43am
URL: https://forum.jogamp.org/Mac-OSX-newt-pointer-and-window-icon-displays-incorrectly-tp4033294p4033299.html

On 10/09/2014 04:25 PM, LT [via jogamp] wrote:

> Hey,
>
> We've got a newt application and we are setting the window icon and the mouse
> pointer.
>
> I have mainly tested the mouse cursor, but the window icon shows the same
> behaviour.
>
> On windows it shows the mouse cursor correctly but on the mac it's showing
> with one of the channels mixed up. I suspect
> Display.getNativePointerIconPixelFormat() is returning the wrong format on Mac
> OSX but I am not sure.
>
> So for the cursor we do:
> final PixelFormat pixFormat = PixelFormat.ARGB8888;
> rec = new PixelRectangle.GenericPixelRect(pixFormat, size, 0, false, buffer);
>
> final PointerIcon joglCursor = disp.createPointerIcon(rec, 0, 0);
> glWindow.setPointerIcon(joglCursor);
>
> -Dnewt.debug.Display.PointerIcon tells me the cursor gets converted to
> BGRA8888 on both Windows and Mac OSX.
>
> The buffer is definitely in ARGB8888 format as I've printed the buffer out on
> both platforms and the int array is identical.
>
> Shall I submit a bug report for this or is there anything else I might have
> wrong?
Already done:
  https://jogamp.org/bugzilla/show_bug.cgi?id=1093

http://jogamp.org/git/?p=jogl.git;a=commit;h=e2d7816823039fc75be809d64b88a3d3af9cdca8

Thank you for reporting!

Why didn't I realize the color swizzle?
B/c I was using mixed color and gray icons .. duh!

~Sven


signature.asc (828 bytes) Download Attachment