https://github.com/jtlee98/vulkan-snippets-vscode
vscode extension for generating vulkan code snippets in C++
https://github.com/jtlee98/vulkan-snippets-vscode
cpp python vscode-extension vulkan-api
Last synced: 3 months ago
JSON representation
vscode extension for generating vulkan code snippets in C++
- Host: GitHub
- URL: https://github.com/jtlee98/vulkan-snippets-vscode
- Owner: JTLee98
- License: mit
- Created: 2025-04-01T01:53:30.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-04-01T02:07:46.000Z (over 1 year ago)
- Last Synced: 2025-04-01T03:23:32.775Z (over 1 year ago)
- Topics: cpp, python, vscode-extension, vulkan-api
- Homepage:
- Size: 1.95 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Vulkan C++ Code Snippet Generator Extension for VS Code
work in progress
## Planned Features
### Struct Based Parameters Snippets:
vulkan has a ton of struct based parameter design, i.e. arguments are packed into dedicated structs for each function.
For example, `vkCreateInstance()` takes a single dedicated `VkInstanceCreateInfo` struct type as a parameter and this struct contains the actual arguments for the function:
```cpp
// package the arguments into a VkInstanceCreateInfo struct
VkInstanceCreateInfo createInfo = {
.sType = VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO;
.pApplicationInfo = &appInfo;
.enabledExtensionCount = 3;
.ppEnabledExtensionNames = extnames;
.enabledLayerCount = 5;
.ppEnabledLayerNames = layernames;
};
// pass the struct into the vkCreateInstance() api call
VkInstance instance;
vkCreateInstance(&createInfo, nullptr, &instance);
```
This extension will generate a code snippet of the necessary parameter struct (e.g. `VkInstanceCreateInfo`) when it detects the vulkan function that requires it (e.g. `vkCreateInstance()`).
### other useful features
TBA!
## Contributions
contributions are welcome!