Updated readme to have build directions

This commit is contained in:
Charles Giessen 2020-01-30 02:01:49 -07:00
parent 155677ec0f
commit 8c40123897

View File

@ -24,9 +24,8 @@ if (inst_ret.has_value()) {
inst = inst_ret.value();
}
vkbs::PhysicalDeviceSelector;
selector.set_instance(inst)
.set_surface (/* from user created window*/)
vkbs::PhysicalDeviceSelector(inst);
selector.set_surface (/* from user created window*/)
.set_minimum_version (1, 0)
.require_dedicated_transfer_queue();
auto phys_ret = selector.select ();
@ -36,14 +35,39 @@ if (phys_ret.has_value()) {
phys = phys_ret.value();
}
vkbs::DeviceBuilder device_builder;
device_builder.set_physical_device (phys_dev);
vkbs::DeviceBuilder device_builder(phys_dev);
auto dev_ret = device_builder.build ();
if(dev_ret.has_value()){
// successfully created a vulkan device
}
```
## Building
Requires CMake and Vulkan installed on your system.
```bash
git clone https://github.com/charles-lunarg/vk-bootstrap
cd vk-bootstrap
mkdir build
cd build
cmake ..
```
To test, glfw and Catch2 are used and automatically included using git submodules.
In the project directory, run
```bash
git submodule update --init
```
to get the required dependencies for testing setup.
Then return to the build directory and enable tests with `VK_BOOTSTRAP_TEST`
```bash
cmake ../path/to/vk-bootstrap/ -DVK_BOOTSTRAP_TEST=ON
```