Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vulkan Bindings #22

Merged
merged 1 commit into from
Sep 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions libraries/vulkan.c3l/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Vulkan Bindings FAQ
* Vulkan functions are renamed as follows: `vkFunctionName` -> `vk::functionName`
* Constant definitions (`#define ... ...` in C) keep the same name and value
* C's fixed length types are converted to C3 types, and if there are any variable length types they are converted to C3's standard library equivalent: `int`->`CInt`
* Most vulkan typedefs are converted to distinct types.
* all string equivalents (e.g. `const char *`) are converted to ZStrings

# Choosing a Version
* Vulkan versions 1.0 - 1.3 are currently supported, by default the most current version is used (1.3)
* If an older version is needed it can be set like:
```C3
module vulkan;
const VK_VERSION = VK_API_VERSION_1_0; //supported versions are 1_0, 1_1, 1_2, and 1_3
```
* Only the functions and definitions from the set version are defined.
117 changes: 117 additions & 0 deletions libraries/vulkan.c3l/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
{
"provides" : "vulkan",
"targets" : {
"freebsd-x64" : {
// Extra flags to the linker for this target:
"link-args" : [],
// C3 libraries this target depends on:
"dependencies" : [],
// The external libraries to link for this target:
"linked-libraries" : ["vulkan"]
},
"linux-aarch64" : {
// Extra flags to the linker for this target:
"link-args" : [],
// C3 libraries this target depends on:
"dependencies" : [],
// The external libraries to link for this target:
"linked-libraries" : ["vulkan"]
},
"linux-riscv32" : {
// Extra flags to the linker for this target:
"link-args" : [],
// C3 libraries this target depends on:
"dependencies" : [],
// The external libraries to link for this target:
"linked-libraries" : ["vulkan"]
},
"linux-riscv64" : {
// Extra flags to the linker for this target:
"link-args" : [],
// C3 libraries this target depends on:
"dependencies" : [],
// The external libraries to link for this target:
"linked-libraries" : ["vulkan"]
},
"linux-x86" : {
// Extra flags to the linker for this target:
"link-args" : [],
// C3 libraries this target depends on:
"dependencies" : [],
// The external libraries to link for this target:
"linked-libraries" : ["vulkan"]
},
"linux-x64" : {
// Extra flags to the linker for this target:
"link-args" : [],
// C3 libraries this target depends on:
"dependencies" : [],
// The external libraries to link for this target:
"linked-libraries" : ["vulkan"]
},
"macos-aarch64" : {
// Extra flags to the linker for this target:
"link-args" : [],
// C3 libraries this target depends on:
"dependencies" : [],
// The external libraries to link for this target:
"linked-libraries" : ["vulkan"]
},
"macos-x64" : {
// Extra flags to the linker for this target:
"link-args" : [],
// C3 libraries this target depends on:
"dependencies" : [],
// The external libraries to link for this target:
"linked-libraries" : ["vulkan"]
},
"netbsd-x64" : {
// Extra flags to the linker for this target:
"link-args" : [],
// C3 libraries this target depends on:
"dependencies" : [],
// The external libraries to link for this target:
"linked-libraries" : ["vulkan"]
},
"openbsd-x64" : {
// Extra flags to the linker for this target:
"link-args" : [],
// C3 libraries this target depends on:
"dependencies" : [],
// The external libraries to link for this target:
"linked-libraries" : ["vulkan"]
},
"wasm32" : {
// Extra flags to the linker for this target:
"link-args" : [],
// C3 libraries this target depends on:
"dependencies" : [],
// The external libraries to link for this target:
"linked-libraries" : ["vulkan"]
},
"wasm64" : {
// Extra flags to the linker for this target:
"link-args" : [],
// C3 libraries this target depends on:
"dependencies" : [],
// The external libraries to link for this target:
"linked-libraries" : ["vulkan"]
},
"windows-aarch64" : {
// Extra flags to the linker for this target:
"link-args" : [],
// C3 libraries this target depends on:
"dependencies" : [],
// The external libraries to link for this target:
"linked-libraries" : ["vulkan"]
},
"windows-x64" : {
// Extra flags to the linker for this target:
"link-args" : [],
// C3 libraries this target depends on:
"dependencies" : [],
// The external libraries to link for this target:
"linked-libraries" : ["vulkan"]
},
}
}
Loading
Loading