Skip to content

HDR/EDR frame buffer best practices? #1370

@framkant

Description

@framkant

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions