Updated readme to include section on how to use in an app

This commit is contained in:
Charles Giessen 2020-02-03 20:51:52 -07:00
parent 8734ed18e0
commit ac7d38046b

View File

@ -1,6 +1,6 @@
# Vk-Bootstrap
A Vulkan Utility library meant to jump start a Vulkan Application
A Vulkan utility library meant to jump start a Vulkan Application
This library simplifies the tedious process of:
@ -10,16 +10,20 @@ This library simplifies the tedious process of:
* Getting Queues
* Swapchain Creation
It also adds several convenience for:
It also adds several conveniences for:
* enabling validation layers
* setting up a debug callback
* automate getting a drawable surface
* selecting a gpu based on a small set of common criteria
## Example
```cpp
#include "VkBootstrap.h"
void device_init()
{
vkb::InstanceBuilder builder;
builder.setup_validation_layers()
.set_app_name ("example")
@ -50,12 +54,29 @@ vkb::Device device = dev_ret.value();
VkQueue graphics_queue = get_queue_graphics(device).value();
VkQueue compute_queue = get_queue_compute(device).value();
VkQueue transfer_queue = get_queue_transfer(device).value();
}
```
## Building
## Using
Requires CMake and Vulkan installed on your system.
Simply copy the `src/VkBootstrap.h` and `src/VkBootstrap.cpp` into your project
Alternatively, add this project as a git-submodule
```bash
git submodule add https://github.com/charles-lunarg/vk-bootstrap
```
Then add the project with cmake
```cmake
add_subdirectory(vk-bootstrap)
```
## Manually Building
Simple setup
```bash
git clone https://github.com/charles-lunarg/vk-bootstrap