You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there any reason why icrate is missing support for CoreGraphics? Additionally, I find it weird that this crate is also missing both the setColorSpace and setWantsExtendedDynamicRangeContent functions. These are needed to properly make use of one of the HDR modes (Extended Dynamic Range) supported by Metal, as explained in this example.
(Edit: The functions are for properties in both CAMetalLayer and MTKView, my bad :))
The text was updated successfully, but these errors were encountered:
mbrla0
changed the title
[icrate] Missing CoreGraphics and MTKView functions required for HDR/EDR
[icrate] Missing CoreGraphics and functions required for HDR/EDR
Aug 25, 2023
Is there any reason why icrate is missing support for CoreGraphics?
I crate doesn't have bindings for several of the Core* frameworks at this point, not just CoreGraphics.
The main reason why is because the custom header-translator program that icrate uses to scan the frameworks and generate the Rust FFI declarations doesn't have great support for some of the lower-level more C-oriented functionality that the Core* frameworks require versus the more Objective-C oriented ones.
And although the header-translator generally works reasonably well, there are often times where certain methods have to be skipped during generation due to the header-translator not being able to correctly parse the corresponding code in the header, or support lacking for some part of the definition on the Rust side.
This is the case for setColorSpace. And setWantsExtendedDynamicRangeContent isn't available because CAMetalLayer isn't supported by icrate yet (for the above reasons).
It's often still possible to work around these missing functions by using msg_send_id! to call the selector directly, although this is obviously less safe, so more care needs to be taken to ensure the types are correct.
Is there any reason why
icrate
is missing support for CoreGraphics? Additionally, I find it weird that this crate is also missing both thesetColorSpace
andsetWantsExtendedDynamicRangeContent
functions. These are needed to properly make use of one of the HDR modes (Extended Dynamic Range) supported by Metal, as explained in this example.(Edit: The functions are for properties in both
CAMetalLayer
andMTKView
, my bad :))The text was updated successfully, but these errors were encountered: