1
0
Fork 0
forked from AbleOS/ableos
ableos/sysdata/libraries/ignim/src/instance.hb

35 lines
994 B
Plaintext
Raw Normal View History

2024-09-18 03:38:49 -05:00
application := @use("application.hb");
2024-09-14 00:31:35 -05:00
.{ApplicationInfo} := application
2024-09-18 03:38:49 -05:00
structures := @use("structures.hb")
errors := @use("errors.hb")
2024-09-14 00:31:35 -05:00
// https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VkInstanceCreateInfo.html
InstanceCreateInfo := struct {
sType: int,
pNext: int,
flags: int,
application_info: ^ApplicationInfo,
enabled_layer_count: int,
ppEnabledLayerNames: int,
enabled_extension_count: int,
ppEnabledExtensionNames: int,
}
new_create_info := fn(application_info: ^ApplicationInfo): InstanceCreateInfo {
create_info_type := structures.InstanceCreateInfoType
enabled_layer_count := 0
create_info := InstanceCreateInfo.(create_info_type, 0, 0, application_info, enabled_layer_count, 0, 0, 0)
return create_info
}
// TODO
Instance := struct {inner: int}
void_instance := fn(): Instance {
return Instance.(0)
}
create_instance := fn(create_info: ^InstanceCreateInfo, allocator_callback: int, new_obj: ^Instance): int {
return errors.IncompatibleDriver
}