@@ -22,18 +22,14 @@ Let's write **Hello World** in Vulkan...
...
@@ -22,18 +22,14 @@ Let's write **Hello World** in Vulkan...
**"a simple app that renders a colored window"**
**"a simple app that renders a colored window"**
⇒ All we need is a `window`,`device` and `renderer`
➜ All we need is a `window` +`device` and `renderer`
<br/>
<br/>
**Vulkan** is a low-level, verbose graphics API and such a program can take several hundred lines of code
**Vulkan** is a low-level, verbose graphics API and such a program can take several hundred lines of code
<br/>
The good news is that **liblava** will help you!
The good news is that **liblava** will help you!
<br/>
```c++
```c++
#include<liblava/lava.hpp>
#include<liblava/lava.hpp>
...
@@ -41,7 +37,7 @@ using namespace lava;
...
@@ -41,7 +37,7 @@ using namespace lava;
```
```
<br/>
<br/>
⇓ Here are a few examples to get to know `lava`
⬇ Here are a few examples to get to know `lava`
<br/>
<br/>
...
@@ -125,9 +121,7 @@ return frame.run();
...
@@ -125,9 +121,7 @@ return frame.run();
<br/>
<br/>
Straightforward ⇒ With this knowledge in hand let's write our **Hello World** now...
Straightforward ➜ With this knowledge in hand let's write our **Hello World** now...
<br/>
#### 4. clear color
#### 4. clear color
...
@@ -253,8 +247,6 @@ frame.add_run_end([&]() {
...
@@ -253,8 +247,6 @@ frame.add_run_end([&]() {
returnframe.run();
returnframe.run();
```
```
<br/>
##### Welcome on **Planet Vulkan** - That's a lot to display a colored window!
##### Welcome on **Planet Vulkan** - That's a lot to display a colored window!
<br/>
<br/>
...
@@ -268,18 +260,22 @@ Phew! Take a closer look at the `build_cmd_bufs` function:
...
@@ -268,18 +260,22 @@ Phew! Take a closer look at the `build_cmd_bufs` function:
The *VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT* flag specifies the reusage of command buffers
The *VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT* flag specifies the reusage of command buffers
`clean_cmd_bufs` frees all buffers and destroys the command pool - In case of swap chain restoration we simply recreate command buffers with a new random color - This happens for example on window resize
`clean_cmd_bufs` frees all buffers and destroys the command pool
<br/>
In case of swap chain restoration we simply recreate command buffers with a new random color
After all, this is a very static example ⇒ Vulkan supports a more *dynamic* and common usage by resetting a command pool before recording new commands
This happens for example on window resize
<br/>
<br/>
Ok, it's time for... `lava block`
After all, this is a very static example
➜ Vulkan supports a more *dynamic* and common usage by resetting a command pool before recording new commands
##### Nice, this is much more simpler than before!
##### Nice, this is much more simpler than before!
<br/>
<br/>
...
@@ -326,7 +320,7 @@ We create a `lava block` and add just one **command** that clears the current fr
...
@@ -326,7 +320,7 @@ We create a `lava block` and add just one **command** that clears the current fr
<br/>
<br/>
All we need to do now is to process the block in the run loop...
All we need to do now is to process the block in the run loop:
```c++
```c++
if(!block.process(*frame_index))
if(!block.process(*frame_index))
...
@@ -335,7 +329,7 @@ if (!block.process(*frame_index))
...
@@ -335,7 +329,7 @@ if (!block.process(*frame_index))
returnplotter.end_frame(block.get_buffers());
returnplotter.end_frame(block.get_buffers());
```
```
... and call the renderer with our recorded command buffers
And call the renderer with our recorded command buffers
<br/>
<br/>
...
@@ -355,7 +349,7 @@ Check [Awesome Vulkan ecosystem](http://www.vinjn.com/awesome-vulkan/) for tutor
...
@@ -355,7 +349,7 @@ Check [Awesome Vulkan ecosystem](http://www.vinjn.com/awesome-vulkan/) for tutor
#### 8. imgui demo
#### 8. imgui demo
Out of blocks `lava app` supports the awesome [Dear ImGui](https://github.com/ocornut/imgui) for **tooling** and **easy prototyping**:
Out of blocks `lava app` supports [Dear ImGui](https://github.com/ocornut/imgui) for **tooling** and **easy prototyping**:
```c++
```c++
intmain(intargc,char*argv[]){
intmain(intargc,char*argv[]){
...
@@ -374,7 +368,7 @@ int main(int argc, char* argv[]) {
...
@@ -374,7 +368,7 @@ int main(int argc, char* argv[]) {
<br/>
<br/>
##### What's next? ⇒ Check some <a href="https://git.io/liblava-demo">demos</a> and clone a <a href="https://git.io/liblava-template">starter template</a> to try it out!
##### What's next? ➜ Check some <a href="https://git.io/liblava-demo">demos</a> and clone a <a href="https://git.io/liblava-template">starter template</a> to try it out!
@@ -438,8 +426,6 @@ Run the **lava** executable to test the [Tutorial examples](tests/tests.cpp)
...
@@ -438,8 +426,6 @@ Run the **lava** executable to test the [Tutorial examples](tests/tests.cpp)
Let it simply flow...
Let it simply flow...
<br/>
##### List all tests:
##### List all tests:
```bash
```bash
...
@@ -455,16 +441,12 @@ lava -t
...
@@ -455,16 +441,12 @@ lava -t
7. gamepad
7. gamepad
8.[imgui demo](#8-imgui-demo)
8.[imgui demo](#8-imgui-demo)
<br/>
##### Run test 2 for example:
##### Run test 2 for example:
```bash
```bash
lava 2
lava 2
```
```
<br/>
The **driver** starts the last test when you provide *no* command line arguments
The **driver** starts the last test when you provide *no* command line arguments
<br/>
<br/>
...
@@ -488,7 +470,7 @@ make
...
@@ -488,7 +470,7 @@ make
## Install
## Install
You can use **liblava** as a *git submodule* in your project ⇒ Like in the [starter template](https://git.io/liblava-template) and [demo](https://git.io/liblava-demo)
You can use **liblava** as a *git submodule* in your project ➜ Like in the [starter template](https://git.io/liblava-template) and [demo](https://git.io/liblava-demo)
🌋 **[liblava](https://git.io/liblava) A modern and easy-to-use library for the <a href="https://www.khronos.org/vulkan/" target="_blank">Vulkan</a>® API**
🌋 **[liblava](https://git.io/liblava) A modern and easy-to-use library for the <a href="https://www.khronos.org/vulkan/" target="_blank">Vulkan</a>® API**
**liblava** is licensed under [MIT License](LICENSE.md) which allows you to use the software for any purpose you might like, including commercial and for-profit use!
**liblava** is licensed under [MIT License](LICENSE.md) which allows you to use the software for any purpose you might like, including commercial and for-profit use!
<br/>
<br/>
However, this library includes several third-party **Open Source** libraries, which are licensed under their own respective licenses ⇒ They all allow static linking with closed source software
However, this library includes several third-party **Open Source** libraries, which are licensed under their own respective licenses ➜ They all allow static linking with closed source software
**All copies of liblava must include a copy of the MIT License terms and the copyright notice**
**All copies of liblava must include a copy of the MIT License terms and the copyright notice**
<br/>
##### Vulkan and the Vulkan logo are trademarks of the <a href="http://www.khronos.org" target="_blank">Khronos Group Inc.</a>
##### Vulkan and the Vulkan logo are trademarks of the <a href="http://www.khronos.org" target="_blank">Khronos Group Inc.</a>