Its documentation says:
An array of D3D12_RECT structures for the rectangles in the resource view to clear.
If NULL, ClearRenderTargetView clears the entire resource view.
I forked the latest version of zigwin32, changed the type from [*]const RECT to ?[*]const RECT and passed null - works fine.
Investigating a bit further, this parameter has only two attributes in win32json: "Attrs":["In","Const"], so it lacks Optional attribute:
https://github.com/marlersoft/win32json/blob/ca9dd560f598062be334f4b5687764a85de1416c/api/Graphics.Direct3D12.json#L7547-L7561
According to build.json, JSON metadata above is generated from a file at https://www.nuget.org/api/v2/package/Microsoft.Windows.SDK.Win32Metadata/31.0.4-preview. Looks like that file lacks Optional attribute for the parameter in question.
Its documentation says:
I forked the latest version of zigwin32, changed the type from
[*]const RECTto?[*]const RECTand passednull- works fine.Investigating a bit further, this parameter has only two attributes in win32json:
"Attrs":["In","Const"], so it lacksOptionalattribute:https://github.com/marlersoft/win32json/blob/ca9dd560f598062be334f4b5687764a85de1416c/api/Graphics.Direct3D12.json#L7547-L7561
According to build.json, JSON metadata above is generated from a file at
https://www.nuget.org/api/v2/package/Microsoft.Windows.SDK.Win32Metadata/31.0.4-preview. Looks like that file lacks Optional attribute for the parameter in question.