Repository navigation
Why isPFN_vkVoidFunction in a Option?
#239
|
Note: This is my first post in a discussion. Sorry if I mess up or anything. Please tell if I did something wrong. I have been using the |
Replies: 1 comment
|
The Rust type: The C type (according to the Vulkan specification): typedef void (VKAPI_PTR *PFN_vkVoidFunction)(void);The reason the Rust type is a The Rust types for actual Vulkan commands in vulkanalia/vulkanalia-sys/src/commands.rs Lines 3041 to 3042 in 384a8d3 |
The Rust type:
vulkanalia/vulkanalia-sys/src/functions.rs
Line 87 in 384a8d3
The C type (according to the Vulkan specification):
The reason the Rust type is a
Option<unsafe extern "system" fn()>instead of justunsafe extern "system" fn()is to allow it to represent null function pointers. C function pointer types implicitly allow null values, but Rust function pointer types do not.The Rust types for actual Vulkan commands in
vulkanaliado not includeOption, e.g.:vulkanalia/vulkanalia-sys/src/commands.rs
Lines 3041 to 3042 in 384a8d3