Vulkan with C++ 11: Graphics Pipeline Creation

แชร์
ฝัง
  • เผยแพร่เมื่อ 15 ธ.ค. 2024

ความคิดเห็น • 8

  • @xavierrispal9605
    @xavierrispal9605 2 ปีที่แล้ว +4

    This series is quite inspiring !! Thank you so much, Andrew, for this deep dive into Vulkan API. Great job !!!

  • @arsenbabaev1022
    @arsenbabaev1022 ปีที่แล้ว +3

    Huge thanks for posting the code for each episode. After 10th episode I realized that its better to copy-paste code and understand it / refactor after.

    • @GetIntoGameDev
      @GetIntoGameDev  ปีที่แล้ว

      Thanks! I'd love to see what you come up with!

  • @zdspider6778
    @zdspider6778 8 หลายเดือนก่อน

    01:06 That string parameter will be a copy. You generally want to avoid passing strings as copies. Same goes for the "readFile()" as well, pass them by "const&". That way you're passing 8 bytes (which is the size of a pointer or reference in a 64-bit program) instead of 40 bytes (size of the "std::string" class in the C++ implementation from msvc), or 32 bytes (in clang).

  • @zdspider6778
    @zdspider6778 8 หลายเดือนก่อน

    02:41 The "{}" does indeed "zero it out", but you're using the .hpp header, which if you look at the struct, it comes pre-zeroed out. So you don't really need to do that.
    But since you wrote: _vk::ShaderModuleCreateInfo moduleInfo = {};_
    Now you really should initialize the 'sType' member variable of the struct. It needs value "16", not 0.

  • @zdspider6778
    @zdspider6778 8 หลายเดือนก่อน

    12:25 It was crashing because the 'filesize' variable in the "readFile()" function says it has the value "18446744073709551615".
    Because you're continuing running code past "!file.is_open()" - which fails.
    Which you really shouldn't be.
    What happens if it fails to open that file? 🤔 GOOD QUESTION. I chose to return a blank vector right then and there (and not under the 'debug' bool!). That way you at least get a Vulkan validation error saying that the shader source code shouldn't be zero, which is a bit more "sane" (I think) than some seemingly random crash in Microsoft's implementation of std::vector.

  • @xbz24
    @xbz24 11 หลายเดือนก่อน +1

    awesome

  • @mexicano1891
    @mexicano1891 ปีที่แล้ว +1

    🎉