Hi (and thanks for a great toolkit!), I am trying to get EDR/HDR rendering working on a small app but can't get my head around how it is supposed to work when using sokol. I dev on Mac(but the goal is cross platform) and when using Metal + GLFW I have old code where I achieved HDR/EDR rendering like this:
`
NSWindow *nswin = glfwGetCocoaWindow(window);
CAMetalLayer *layer = [CAMetalLayer layer];
layer.device = device;
layer.pixelFormat = MTLPixelFormatRGBA16Float;// std is MTLPixelFormatBGRA8Unorm;
const CFStringRef name = kCGColorSpaceExtendedLinearDisplayP3;
CGColorSpaceRef colorspace = CGColorSpaceCreateWithName(name);
layer.colorspace = colorspace;
nswin.contentView.layer = layer;
nswin.contentView.wantsLayer = YES;
layer.wantsExtendedDynamicRangeContent = YES;
`
But no code similar to this is available anywhere in sokol as far as I can tell so I assume I have to add/hack it myself? If so, is there any recommended ways to approach it?
Hi (and thanks for a great toolkit!), I am trying to get EDR/HDR rendering working on a small app but can't get my head around how it is supposed to work when using sokol. I dev on Mac(but the goal is cross platform) and when using Metal + GLFW I have old code where I achieved HDR/EDR rendering like this:
`
NSWindow *nswin = glfwGetCocoaWindow(window);
CAMetalLayer *layer = [CAMetalLayer layer];
layer.device = device;
layer.pixelFormat = MTLPixelFormatRGBA16Float;// std is MTLPixelFormatBGRA8Unorm;
const CFStringRef name = kCGColorSpaceExtendedLinearDisplayP3;
CGColorSpaceRef colorspace = CGColorSpaceCreateWithName(name);
layer.colorspace = colorspace;
nswin.contentView.layer = layer;
nswin.contentView.wantsLayer = YES;
layer.wantsExtendedDynamicRangeContent = YES;
`
But no code similar to this is available anywhere in sokol as far as I can tell so I assume I have to add/hack it myself? If so, is there any recommended ways to approach it?