Skip to content
Benjamin Praud edited this page Feb 28, 2022 · 2 revisions

Welcome to the Vulk wiki!

How to use

First, you have to download the project or cloning it with git clone [email protected]:LibVulk/Vulk.git

To use Vulk in your project, it's very simple, all you have to do is include the file you want (ex: #include <Vulk/Window.hpp>) and after that you will have access to all the features that Vulk can offer

Here is an example of a main using Vulk

#include <Vulk/Contexts/ContextVulkan.hpp>
#include <Vulk/Window.hpp>

#include <iostream>

int main()
{
    vulk::Window win{800, 600, "Vulkan window"};

    win.getFrameManager().setOnSecondCallback([&win](const vulk::FrameManager& frameManager) {
        constexpr const char* TitleFormat = "Vulkan window (%u fps)";
        constexpr size_t BufferSize = 32;

        char buffer[BufferSize]{};

        std::snprintf(buffer, BufferSize, TitleFormat, frameManager.getFPS());

        win.setTitle(buffer);
    });

    while (win.isOpen())
    {
        win.pollEvents();

        win.display();
    }

    return 0;
}

If you have a question about a function's parameter or about the utility of a function, you can check the documentation that is located in the documentation directory.

image

Clone this wiki locally