vulkan4j
vulkan4j copied to clipboard
Computer Graphics and Gaming API (Vulkan, OpenGL, GLFW, STB, ...) bindings for Java using Java 22 FFM APIs
vulkan4j
⚠️ NOTE: UNDERGOING CHANGES
We're about to release the 0.3.0 version of this ecosystem, fixing most issues and make it more human-friendly, and this would cause a massive changes on APIs, however. If you're interested you may read some docs and star this, but maybe don't put this into your project at once.
Vulkan Binding for Java using Project Panama java.lang.foreign APIs.
Heavily inspired by the vulkanalia crate.
Vulkan tutorial
For users new to Vulkan, there is a (almost) complete adaptation of https://vulkan-tutorial.com by Alexander Overvoorde to use Java and vulkan4j instead of C++. The published version of this tutorial can be found here, and the sources for the tutorial (including standalone working code examples for each chapter) can be found under the tutorial directory.
Overview
panama-plus is a small utility library that gives a thin wrapper over Project Panama java.lang.foreign APIs to make them easier and more type-safe to use. It is used by vulkan4j to provide a more Java-friendly API for Vulkan.
vk4j is the main library that provides the Vulkan bindings. Bindings are generated from vk.xml using codegen-v2 module.
vma is a binding to the Vulkan Memory Allocator library. It is generated from vk_mem_alloc.h using the codegen module.
glfw is a wrapper around the GLFW library that provides a more Java-friendly API for creating windows and handling input. It is generated from GLFW header files using the codegen module.
gles2 provides OpenGL ES2 bindings. Bindings are generated from gl.xml using the codegen-v2 module.
Roadmap
- [x] Generate fundamental Vulkan API bindings using
vkxml2javafromvk.xml - [x] Take off!
- [x] Vulkan tutorial
- [ ] Chinese translation
- [x] Generate GLFW bindings using
codegen - [x] Generate OpenGL ES2 bindings using
codegen - [x] Generate or write Vulkan Memory Allocator API bindings
- [x] Switch to
codegenfor Vulkan bindings - [x] Generate Vulkan Video API bindings