10-bit (30-bit RGB) color support?

Some Mac news sites are reporting that the new iMacs and even the Mac Pros are now reporting that they support 10-bit color (i.e. CGSThirtyBitColor). The reports suggest that currently only the Photos & Preview apps are able to support this at the moment. So my question is, how can we enable our own apps to support 10-bit color? Particularly, how can an OpenGL-based app output 10-bit color?


I haven't seen any mention of how to do this in any of Apple's sample code or in any El Capitan release notes/tech notes.

Accepted Reply

Recently sample code were added showing off 30-bit OpenGL pipeline:

https://developer.apple.com/library/mac/samplecode/DeepImageDisplayWithOpenGL/Introduction/Intro.html#//apple_ref/doc/uid/TP40016622

Replies

For some more info on this topic, please check out the OS X El Capitan 10.11.2 release notes:

https://developer.apple.com/library/mac/releasenotes/MacOSX/WhatsNewInOSX/Articles/MacOSX10_11_2.html#//apple_ref/doc/uid/TP40016630-SW1

Recently sample code were added showing off 30-bit OpenGL pipeline:

https://developer.apple.com/library/mac/samplecode/DeepImageDisplayWithOpenGL/Introduction/Intro.html#//apple_ref/doc/uid/TP40016622

That is a OpenGL example. I use in my app normal windows and NSViews with a lot of controls and items.

How can I simple display a 16 bit per channel image stored in a CGContextRef at the higher bit depth?

is it possible to get 30bit color with a MacBookPro11,5 (Mid 2015) with a AMD Radeon R9 M370X GPU on a decent 4K monitor, e.g. EIZO or NEC used for color critical work?

Hi team player,


This only supports the machines listed in the release notes I linked to above.

Hi lemkesoft,


We support 16-bit fixed point format throughout AppKit, but we don't support half-float. You need to be in an OpenGL or Metal environment to support half-float.

Thanks for all who replied. I've been able to get our app running with 30-bit color. However, I've got one more question, does anyone know how to detect if a display supports 30-bit color?


I'd like to run our app with 24-bit color for displays that don't support 30-bit color and only enable 30-bit color for displays that actually support it. I thought I'd be able to use `CGDisplayCopyDisplayMode` and `CGDisplayModeCopyPixelEncoding` to get the pixel encoding for the display, however this seems to always return an 8-bit per component pixel encoding. Plus, `CGDisplayModeCopyPixelEncoding` is listed as depricated in 10.11 with no replacement that I know of.


The "System Information" app is obviously able to get this information. Does anyone know how to get this information?


Thanks again.

I'm not aware of any way to query the system, so for now I look at the hardware model:

MacPro6,1 iMac17,1 iMac15,1

I know this is an old thread but it kept showing up when I was researching this problem. To test for 30-bit color I pass the depthLimit property of my NSWindow to NSBitsPerPixelFromDepth and see if the result is greater than 24. This seems to make sense and worked well enough on the limited set of iMacs I have available. As usual, your mileage my vary.