diff --git a/DOCS.md b/DOCS.md index 4f90461a99c0560a0fc082435f0e6c7bed6dfc38..67ef65fcb6607a717e3b0d7020851445300d0e83 100644 --- a/DOCS.md +++ b/DOCS.md @@ -22,18 +22,14 @@ Let's write **Hello World** in Vulkan... **"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 /> **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! -<br /> - ```c++ #include <liblava/lava.hpp> @@ -41,7 +37,7 @@ using namespace lava; ``` <br /> -⇓ Here are a few examples to get to know `lava` +⬇ Here are a few examples to get to know `lava` <br /> @@ -125,9 +121,7 @@ return frame.run(); <br /> -Straightforward ⇒ With this knowledge in hand let's write our **Hello World** now... - -<br /> +Straightforward ➜ With this knowledge in hand let's write our **Hello World** now... #### 4. clear color @@ -253,8 +247,6 @@ frame.add_run_end([&]() { return frame.run(); ``` -<br /> - ##### Welcome on **Planet Vulkan** - That's a lot to display a colored window! <br /> @@ -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 -`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 /> -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 <br /> +Ok, it's time for... `lava block` + #### 5. color block ```c++ @@ -316,8 +312,6 @@ block.add_command([&](VkCommandBuffer cmd_buf) { }); ``` -<br /> - ##### Nice, this is much more simpler than before! <br /> @@ -326,7 +320,7 @@ We create a `lava block` and add just one **command** that clears the current fr <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++ if (!block.process(*frame_index)) @@ -335,7 +329,7 @@ if (!block.process(*frame_index)) return plotter.end_frame(block.get_buffers()); ``` -... and call the renderer with our recorded command buffers +And call the renderer with our recorded command buffers <br /> @@ -355,7 +349,7 @@ Check [Awesome Vulkan ecosystem](http://www.vinjn.com/awesome-vulkan/) for tutor #### 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++ int main(int argc, char* argv[]) { @@ -374,7 +368,7 @@ int main(int argc, char* argv[]) { <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! <a href="https://github.com/liblava/liblava-demo/#readme"><img src="res/demo.png"></a> @@ -386,8 +380,6 @@ int main(int argc, char* argv[]) { [](https://github.com/liblava/liblava/tree/master/liblava/app/app.hpp) [](https://github.com/liblava/liblava/tree/master/liblava/app/camera.hpp) [](https://github.com/liblava/liblava/tree/master/liblava/app/forward_shading.hpp) [](https://github.com/liblava/liblava/tree/master/liblava/app/gui.hpp) -<br /> - #### lava [block](https://github.com/liblava/liblava/tree/master/liblava/block) [](https://github.com/liblava/liblava/tree/master/liblava/block/attachment.hpp) [](https://github.com/liblava/liblava/tree/master/liblava/block/block.hpp) [](https://github.com/liblava/liblava/tree/master/liblava/block/descriptor.hpp) [](https://github.com/liblava/liblava/tree/master/liblava/block/pipeline.hpp) [](https://github.com/liblava/liblava/tree/master/liblava/block/render_pass.hpp) [](https://github.com/liblava/liblava/tree/master/liblava/block/subpass.hpp) @@ -396,8 +388,6 @@ int main(int argc, char* argv[]) { [](https://github.com/liblava/liblava/tree/master/liblava/frame/frame.hpp) [](https://github.com/liblava/liblava/tree/master/liblava/frame/input.hpp) [](https://github.com/liblava/liblava/tree/master/liblava/frame/render_target.hpp) [](https://github.com/liblava/liblava/tree/master/liblava/frame/renderer.hpp) [](https://github.com/liblava/liblava/tree/master/liblava/frame/swapchain.hpp) [](https://github.com/liblava/liblava/tree/master/liblava/frame/window.hpp) -<br /> - #### lava [asset](https://github.com/liblava/liblava/tree/master/liblava/asset) [](https://github.com/liblava/liblava/tree/master/liblava/asset/mesh_loader.hpp) [](https://github.com/liblava/liblava/tree/master/liblava/asset/scope_image.hpp) [](https://github.com/liblava/liblava/tree/master/liblava/asset/texture_loader.hpp) @@ -410,8 +400,6 @@ int main(int argc, char* argv[]) { [](https://github.com/liblava/liblava/tree/master/liblava/base/base.hpp) [](https://github.com/liblava/liblava/tree/master/liblava/base/device.hpp) [](https://github.com/liblava/liblava/tree/master/liblava/base/instance.hpp) [](https://github.com/liblava/liblava/tree/master/liblava/base/memory.hpp) [](https://github.com/liblava/liblava/tree/master/liblava/base/physical_device.hpp) -<br /> - #### lava [file](https://github.com/liblava/liblava/tree/master/liblava/file) [](https://github.com/liblava/liblava/tree/master/liblava/file/file.hpp) [](https://github.com/liblava/liblava/tree/master/liblava/file/file_system.hpp) [](https://github.com/liblava/liblava/tree/master/liblava/file/file_utils.hpp) [](https://github.com/liblava/liblava/tree/master/liblava/file/json_file.hpp) @@ -438,8 +426,6 @@ Run the **lava** executable to test the [Tutorial examples](tests/tests.cpp) Let it simply flow... -<br /> - ##### List all tests: ```bash @@ -455,16 +441,12 @@ lava -t 7. gamepad 8. [imgui demo](#8-imgui-demo) -<br /> - ##### Run test 2 for example: ```bash lava 2 ``` -<br /> - The **driver** starts the last test when you provide *no* command line arguments <br /> @@ -488,7 +470,7 @@ make ## 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) <br /> @@ -502,8 +484,6 @@ cmake -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=../lava-install .. cmake --build . --target install ``` -<br /> - #### Project setup First find the package in your *CMakeLists.txt* @@ -519,7 +499,7 @@ target_link_libraries(test lava::app) <br /> -And then build your project with install path ⇒ *lava_DIR* +And then build your project with install path ➜ *lava_DIR* ```bash mkdir build diff --git a/README.md b/README.md index dc1387425389f7cc5dfa5f910dd68f828ba72719..2a50b71072831d7ad2932d423b1c0f03c6513df1 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -<a href="https://lava-block.com"><img align="right" src="https://github.com/liblava.png" width="220"></a> +<a href="https://lava-block.com"><img align="right" src="https://github.com/liblava.png" width="200"></a> 🌋 **[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** @@ -6,9 +6,9 @@ <br /> -**C++20** **Modular** **Windows** **Linux** **<a href="https://git.io/liblava-demo">demo</a>** <a href="https://git.io/liblava-template">template</a> +**C++20** + **Modular** **Windows** + **Linux** **<a href="https://git.io/liblava-demo">demo</a>** + <a href="https://git.io/liblava-template">template</a> -[](https://git.io/liblava) [](LICENSE) [](https://www.codefactor.io/repository/github/liblava/liblava) [](https://discord.lava-block.com) [](https://paypal.me/liblava) [](https://twitter.com/liblava) +[](https://git.io/liblava) [](LICENSE) [](https://www.codefactor.io/repository/github/liblava/liblava) [](https://discord.lava-block.com) [](https://paypal.me/liblava) [](https://twitter.com/liblava) <br /> @@ -36,7 +36,7 @@ <br /> -##### ⇓ Download latest **<a href="https://github.com/liblava/liblava-demo/releases">demo</a>** (Feb. 20, 2020) +##### ⬇ Download latest **<a href="https://github.com/liblava/liblava-demo/releases">demo</a>** (Feb. 20, 2020) <a href="https://github.com/liblava/liblava-demo/#readme"><img src="res/demo.png"></a> @@ -44,8 +44,6 @@ [](https://ci.appveyor.com/project/TheLavaBlock/liblava) [](https://travis-ci.com/liblava/liblava) -<br /> - ## Requirements * **C++20** compatible compiler @@ -56,21 +54,21 @@ ## Third-Party -* [argh](https://github.com/adishavit/argh) 3-clause BSD -* [bitmap](https://github.com/ArashPartow/bitmap) MIT -* [glfw](https://github.com/glfw/glfw) zlib -* [gli](https://github.com/g-truc/gli) MIT -* [glm](https://github.com/g-truc/glm) MIT -* [imgui](https://github.com/ocornut/imgui) MIT -* [json](https://github.com/nlohmann/json) MIT -* [physfs](https://github.com/Didstopia/physfs) zlib -* [selene](https://github.com/kmhofmann/selene) MIT -* [spdlog](https://github.com/gabime/spdlog) MIT -* [stb](https://github.com/nothings/stb) MIT -* [tinyobjloader](https://github.com/syoyo/tinyobjloader) MIT -* [volk](https://github.com/zeux/volk) MIT -* [Vulkan-Headers](https://github.com/KhronosGroup/Vulkan-Headers) Apache 2.0 -* [VulkanMemoryAllocator](https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator) MIT +* [argh](https://github.com/adishavit/argh) *3-clause BSD* +* [bitmap](https://github.com/ArashPartow/bitmap) *MIT* +* [glfw](https://github.com/glfw/glfw) *zlib* +* [gli](https://github.com/g-truc/gli) *MIT* +* [glm](https://github.com/g-truc/glm) *MIT* +* [imgui](https://github.com/ocornut/imgui) *MIT* +* [json](https://github.com/nlohmann/json) *MIT* +* [physfs](https://github.com/Didstopia/physfs) *zlib* +* [selene](https://github.com/kmhofmann/selene) *MIT* +* [spdlog](https://github.com/gabime/spdlog) *MIT* +* [stb](https://github.com/nothings/stb) *MIT* +* [tinyobjloader](https://github.com/syoyo/tinyobjloader) *MIT* +* [volk](https://github.com/zeux/volk) *MIT* +* [Vulkan-Headers](https://github.com/KhronosGroup/Vulkan-Headers) *Apache 2.0* +* [VulkanMemoryAllocator](https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator) *MIT* <br /> @@ -78,8 +76,6 @@ You can use the [issue tracker](https://github.com/liblava/liblava/issues) to report any bug or compatibility issue -<br /> - :heart: Thanks to all **[contributors](https://github.com/liblava/liblava/graphs/contributors)** making **liblava** flow... <br /> @@ -96,18 +92,16 @@ If you want to contribute, we suggest the following: ## License -<a href="https://opensource.org" target="_blank"><img align="right" width="80" src="http://opensource.org/trademarks/opensource/OSI-Approved-License-100x137.png" style="margin:0px 0px 0px 20px"></a> +<a href="https://opensource.org" target="_blank"><img align="right" width="90" src="http://opensource.org/trademarks/opensource/OSI-Approved-License-100x137.png" style="margin:0px 0px 0px 40px"></a> **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 /> -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** -<br /> - ##### Vulkan and the Vulkan logo are trademarks of the <a href="http://www.khronos.org" target="_blank">Khronos Group Inc.</a> ##### Copyright (c) 2018-present, <a href="https://lava-block.com">Lava Block OÜ</a>