#A Question about D3D.CompileFromFile, [^]u16 type for filename?

1 messages · Page 1 of 1 (latest)

covert geode
#

Hello, I am learning D3D11 with Odin now, and am trying to compile a hlsl file that I created with "D3D.CompileFromFile". So I created a string type variable which holds a name for the file. But,
I noticed that the type of the first argument (filename) is [^]u16. I read the documentation and learned that it is multi pointers, but I am not sure how to properly cast my string variable to [^]u16.

frozen ridge
#

There is also an intrinsic function that I can’t recall rn

covert geode
#

Oh Thank you very much! 🙂 I will look into the core:sys/windows 👍

zealous verge
#

To be clear, the issue there is that it wants a UTF-16 string, but strings in Odin are untyped UTF-8 strings.

#

If you had a runtime string, you'd use core:unicode/utf16.