https://github.com/juliagpu/vulkancore.jl
Julia bindings for the Vulkan API
https://github.com/juliagpu/vulkancore.jl
Last synced: over 1 year ago
JSON representation
Julia bindings for the Vulkan API
- Host: GitHub
- URL: https://github.com/juliagpu/vulkancore.jl
- Owner: JuliaGPU
- License: mit
- Created: 2016-02-16T14:56:21.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2023-10-06T13:48:59.000Z (over 2 years ago)
- Last Synced: 2025-02-22T02:05:57.190Z (over 1 year ago)
- Language: Julia
- Size: 594 KB
- Stars: 77
- Watchers: 10
- Forks: 14
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# VulkanCore


VulkanCore wraps Vulkan and exposes the library calls necessary to work with
Vulkan. It is targeted for developers wanting to directly work with Vulkan in
Julia.
If you are looking for a high-level idiomatic Julia API you might wish to take a look at
[Vulkan.jl](https://github.com/JuliaGPU/Vulkan.jl).
### Installation
You are required to have a Vulkan capable device and the appropriate drivers.
If these are present, run:
```
pkg> add VulkanCore
```
### References
- [Vulkan](https://www.khronos.org/vulkan/)
- [Vulkan Registry](https://www.khronos.org/registry/vulkan/)
- [Vulkan Specification](https://www.khronos.org/registry/vulkan/#apispecs)
## Usage
The Vulkan wrapper is generated using [Clang.jl](https://github.com/JuliaInterop/Clang.jl)
with the [generator file](gen/generator.jl).
The API aims to replicate the Vulkan C-API and is thus very bare bones and hands-on.
```julia
using VulkanCore.LibVulkan
count = Ref{Cuint}(0)
# Scan layers
err = vkEnumerateInstanceLayerProperties(count, C_NULL)
@assert err == VK_SUCCESS
global_layer_properties = Vector{VkLayerProperties}(undef, count[])
err = vkEnumerateInstanceLayerProperties(count, global_layer_properties)
@assert err == VK_SUCCESS
```
## Contributing
You are welcome to submit pull-request for improvements, but since this is
primarily a wrapper you might focus your attention on the high-level API at
[Vulkan.jl](https://github.com/JuliaGPU/Vulkan.jl).
## Thanks
This package is inspired by the work done on [CUDArt.jl](https://github.com/JuliaGPU/CUDArt.jl)
and [OpenCL.jl](https://github.com/JuliaGPU/OpenCL.jl).
A big thank you also to all core Julia developers, who made this possible in the
first place.