iOS color format confusion!!!

Anything libgdx related goes here!

iOS color format confusion!!!

Postby jarminkhan » Tue Aug 20, 2019 11:33 pm

Drawing a `Color(0x1b1b1bff)` rect on a `Color(0x181818ff)` background, I notice that the rect is visible on my device, but not on the simulator. I found that if I set the `config.colorFormat` to `RGBA8888` in IOSLauncher, the simulator then matches the device and the rect is visible. Therefore, it seems that the simulator is using the RGB565 color format by default, and since the RGB565 representation of both of these colors is equal, it makes sense that the rect wouldn't be visible in that color space.

At first this glance seemed like a simulator bug, but digging in, RGB565 is *supposed* to be the default on iOS. Given that, it seems that the simulator is actually outputting the colors correctly, whereas the device is apparently using the RGBA8888 color space without it explicitly being set. Further, explicitly setting the format to RGBA8888 and then to RGB565 shows no difference on device, whereas the simulator output is clearly different as mentioned above.

Is this a bug, or am I missing something?
Posts: 1
Joined: Tue Aug 20, 2019 11:30 pm

Re: iOS color format confusion!!!

Postby TruePlayer » Wed Aug 21, 2019 12:32 am

on Android, I also tried to make different colors for my hitbox, and the colors were the same too
Posts: 103
Joined: Sun Jul 28, 2019 12:22 pm

Return to Libgdx

Who is online

Users browsing this forum: diazndc, MSN [Bot] and 1 guest