Skip to content

Commit

Permalink
Added vulkan bindings for versions 1.0 - 1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
ellipse12 authored and lerno committed Sep 15, 2024
1 parent adef778 commit 6d1d53c
Show file tree
Hide file tree
Showing 7 changed files with 14,741 additions and 0 deletions.
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

0 comments on commit 6d1d53c

Please sign in to comment.