Coder Social home page Coder Social logo

vulkanhppminimalexample's Introduction

I recommend installing the vulkan lunarG sdk which sets all of the environment variables for you and includes the necessary shaderc library prebuilt for you.

then you can install the dependecies with vcpkg

vcpgk install glfw3

then you can invoke cmake with

cmake -DCMAKE_TOOLCHAIN_FILE=C:\pathtoyourtoolchainfile\vcpkg.cmake ..

if you've forgotten where your toolchain file is you can invoke vcpkg integrate install and it will print it for you in the terminal.

then to build on windows invoke cmake --build . --config Release (other platforms you can just invoke cmake --build)

vulkanhppminimalexample's People

Contributors

dokipen3d avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

vulkanhppminimalexample's Issues

physicalDevice selection issue

Was compiling a few vulkan tutorials I found on the web and came across yours. Line 73-76 in main.cpp:

    auto physicalDevice = physicalDevices[std::distance(physicalDevices.begin(),
        std::find_if(physicalDevices.begin(), physicalDevices.end(), [](const vk::PhysicalDevice& physicalDevice) {
            return strstr(physicalDevice.getProperties().deviceName, "Intel");
        }))];

This crashes the program with a 'vector subscript out of range' when there's only one device in the enumeration and it doesn't matchs the substring you've defined ("Intel").

Built with cmake + ninja in VS2022 on Windows 10v19044.2846, with an nVidia 1070 using driver version 528.33. Just selecting the first physical device using auto physicalDevice = physicalDevices[0] was a workaround for this system, which only enumerates a single physical device (the 1070).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.