Setup Vulkan (MoltenVK) With GLFW On Mac Using Xcode - Vulkan Graphics/Games Programming

Поделиться
HTML-код
  • Опубликовано: 22 авг 2024
  • 🚀 Get 100% Off Your First Month with CustomGPT! 🚀
    Sign up for a Standard CustomGPT.ai subscription using my referral link and enjoy 100% off your first month. Plus, you'll help support my channel with a 15% commission at no extra cost to you!
    🔗 Referral Link: customgpt.ai/?...
    🎟️ Coupon Code: AFFILIATEPARTNER ⭐ Kite is a free AI-powered coding assistant that will help you code faster and smarter. The Kite plugin integrates with all the top editors and IDEs to give you smart completions and documentation while you’re typing. I've been using Kite for 6 months and I love it! www.kite.com/g...
    Discord: discordapp.com...
    GitHub: github.com/Son...
    Homebrew: brew.sh/
    Vulkan Download: vulkan.lunarg....
    GLFW: www.glfw.org/
    glm: github.com/g-t...
    Xcode: developer.appl...
    Vulkan Device Support: vulkan.gpuinfo...
    This video has been made with Fair Use in mind and has been created as an educational piece of media.
    Based off github.com/Ove...
    Like our content and want to support us more directly? Help Us, Help You! www.paypal.com...
    If you like this stuff, as always, show the love through comments, likes, favorites, subscriptions, etc.
    #vulkan #opengl #sonarsystems #snrsys
    Our Website
    -----------------------------------------------------------------------------------
    ► www.sonarsystem...
    ► Tens of thousands of free videos at www.sonarlearning.co.uk
    ► If you have any questions feel free to post them at www.sonarlearni...
    Our Social Media
    -----------------------------------------------------------------------------------
    ► Facebook → / 581403125243822
    ► Twitter → / sonarsystems
    ► Donate → www.paypal.com...
    ► Discord → discordapp.com...
    Our games made with love
    -----------------------------------------------------------------------------------
    ► iOS → itunes.apple.c...
    ► Google Play→ play.google.co...
    Check out our books:
    -----------------------------------------------------------------------------------
    ► Cocos2d-x → www.packtpub.c...
    ► Bootstrap 4 → www.packtpub.c...
    ► OpenGL → www.packtpub.c...

Комментарии • 49

  • @BeansEnjoyer911
    @BeansEnjoyer911 Год назад +18

    FOR M1 MAC USERS. This guide in its entirety MOSTLY works!
    Here are the things you will need to do that are DIFFERENT:
    1. Check the box in project > Signing & Capabilities > Hardened Runtime > "Disable Library Validation"
    2. Everywhere it says /usr/local/... needs to be /opt/homebrew (this is because M1 Macs now install homebrew packages in another place)
    Everything else worked fine after that.
    If you do NOT do these things you will likely still get BUILD SUCCEEDED but then be met by a ton of runtime errors and an ABORT assembly error when running.

    • @iulianesanu4237
      @iulianesanu4237 2 месяца назад

      thanks a lot !
      also "command + shift + K" can help if you get a "Cycle inside ..." error

    • @swellyman321
      @swellyman321 2 месяца назад

      i know im a year late so not sure if you'll see this, but i spent SO much time trying to figure out why i was getting runtime errors and wasn't able to figure it out. your comment fixed my problem, so thank you.

  • @zoeherriot
    @zoeherriot 2 года назад +15

    Worth noting that the homebrew step installs to /opt/homebrew for apple silicon machines.
    EDIT: Also if you get an error about loading the libraries (Vulkan libs), you may have to disable "library validation" under signing and capabilities.

    • @bobtuf0
      @bobtuf0 2 года назад +2

      You saved me so much time, thank you!

    • @zaiscott
      @zaiscott 2 года назад +1

      Thanks so much, this helped me alot. I spent more time than I would like to tell trying to get a window up and running. on my M1 mac.

  • @zaiscott
    @zaiscott 2 года назад +4

    Thank you for this great tutuorial. Now I can continue to do graphics programming in C++ on my MacBook pro M1 laptop.

    • @Basseloob
      @Basseloob 2 года назад

      Is it really working good with the M1 ?

  • @amosesmolina
    @amosesmolina 3 года назад +1

    When you right click on a file you can hold down option and it will give you an option to copy the path to the file. Awesome video.

    • @SonarSystemsCoUk
      @SonarSystemsCoUk  3 года назад

      Ah thanks for sharing
      Any questions feel free to post on Discord discord.gg/Qn4tSPD

  • @MrWebbtang
    @MrWebbtang Год назад

    Thank you so so much, I was tearing my hair out trying to follow the tutorial on the Vulkan site, this video made it much easier.

  • @erwinrussel2086
    @erwinrussel2086 2 года назад

    Thanks so much! My program was not creating instances probably because of the incomplete paths from the tutorial. This saved me thanks!!

  • @antonypascalino
    @antonypascalino Год назад

    Thanks a lot for the video, it actually works and is far better than the official guide since they don't explain anything about the correct directories to select. I used it fo my academic project

  • @miamackenna5522
    @miamackenna5522 2 года назад +3

    can someone help? I don't know which pdf to cut and paste from GitHub -

  • @TimRex.
    @TimRex. 2 года назад +3

    I had issues with code signing on Xcode v14.. namely, a runtime isssue along the lines of ""mapping process and mapped file (non-platform) have different Team IDs)" regarding libvulkan.1.dylib
    "
    At first it seemed that enabling the checkbox to "Code sign on copy" was be suficient, and while that does avoid the runtime issue, it introduces other unintended consequences.. (for one, code signing the libraries in this way for some reason causes Vulkan to not be able to locate any extensions whatsoever).
    As others have suggested, the best play here is to "Disable Signing Capabilities" on the "Hardened Runtime" section of "Signing & Capabilities" and all should be well

    • @SonarSystemsCoUk
      @SonarSystemsCoUk  2 года назад +1

      Thanks for sharing this, I am certain it Will help many others.

    • @AvisPhoenix
      @AvisPhoenix Год назад

      I cannot find "Disable Signing Capabilities", but I found "Disable Library Validation", which works for me (Xcode v14.0.1). It is important to clean and then build it again.

    • @federicotorres6227
      @federicotorres6227 7 месяцев назад

      It worked for me, named "Disable Library Validation" in Xcode 15

  • @erikzorzin
    @erikzorzin 2 года назад +1

    I also have the problem that my Xcode (13.2.1, Big Sur, Macbook Air early 2014) cannot find the /usr/local/include path. I did exactly what you do in this video. If in main.cpp I use: #include then Xcode finds it BUT it throws another error because inside glfw there is an #include and again it cannot understand that header is in /usr/local/include. Same thing for all the other includes like . It looks it's a problem of Xcode, any idea how to solve it?

  • @lizachuyaozhang3824
    @lizachuyaozhang3824 Год назад +1

    I could'n find the file starting with libglfwn in the lib folder. Why is that the case?

    • @SonarSystemsCoUk
      @SonarSystemsCoUk  Год назад

      Try this
      gist.github.com/jxsl13/d23828f8dfa58dfb19504fb53b65c4e4

  • @sheldondalziel6758
    @sheldondalziel6758 2 года назад +1

    The Vulkan EXEC opened at the end but nothing mentioned "zero Metal Services found"

  • @gofudgeyourselves9024
    @gofudgeyourselves9024 3 года назад +1

    Should we expect a vulkan series or this is one off video?

    • @SonarSystemsCoUk
      @SonarSystemsCoUk  3 года назад

      Vulkan Series, Uploaded another video today, another company tomorrow
      Any questions feel free to post on Discord discord.gg/Qn4tSPD

  • @flocela
    @flocela Месяц назад

    I get a "Workspace GalaTutorial | Scheme Gala Tutorial | Destination My Mac. Build Failed from Cycle inside GalaTutorial; building could produce unreliable results." I also have a warning "Compile first_app.cpp (arm64) Declaration is marked with '@deprecated' command but does not have a deprecation attribute. @callback command should be used in a command attached to a pointer to function declaration." I have the same warning for main.cpp. If I change anything at all (Add a comment) Then the build is successful, but I always have the warnings. Then if I close the window and build again, the build fails with a cycle. If anyone ever comes up with a solution, please post. I'm just going to go along with the tutorial for now since it works half the time.

  • @tejedaAlex
    @tejedaAlex 2 года назад

    > pkg-config PACKAGENAME --modversion
    Can tell you the version being used for glfw, glm and vulkan, with that info, one can use the default installation paths and built those paths by using pkg-config, pkg-config works on linux and macos (not sure about windows) e.g.:
    > ls -l $HOME/VulkanSDK/$(pkg-config vulkan --modversion)/macOS/include

  • @reeceallen531
    @reeceallen531 Год назад

    I ended up with a Thread 1: signal SIGABRT error, anyone know how to fix?

    • @bankzkuma8901
      @bankzkuma8901 Год назад

      signing & capabilities > disable library validation

  • @Blink.M2Dev
    @Blink.M2Dev Год назад

    Unfortunately I cannot get any of the builds to work on El Capitan even with 10.11 set at the OS in Vulcan Xcode project. It says something about invalid file argument in a linked library for two dependencies. Which are there but apparently Xcode doesn’t see so now idk what to do. Guess it doesn’t work anymore

  • @shoryaagarwal561
    @shoryaagarwal561 2 года назад

    Do you know if renderdoc works with moltenvk ? I couldn't find any binaries for it.

  • @roelroel2k3
    @roelroel2k3 Год назад

    ican't install glfw it says command not found : brew

  • @flocela
    @flocela Месяц назад

    "'GLFW/glfw3.h' file not found error??? I had typed an extra '/' at the end of my path name. So erroneously used '/opt/homebrew/include/Applications/...macOS/include/'. Should have been '/opt/homebrew/include/Applications/...macOS/include'.

  • @doctor_cosmus
    @doctor_cosmus Год назад

    NOT WORKING!

  • @bobbyhill605
    @bobbyhill605 2 года назад

    I tried to do the brew install glfw but it can't be found

    • @bobbyhill605
      @bobbyhill605 2 года назад

      I fix the problem but I'm getting an error for line 2 include
      Also I don't see the same code you have on the screen.

    • @mad4234
      @mad4234 2 года назад

      @@bobbyhill605 Did you ever resolve this issue? Getting the same error

    • @bobbyhill605
      @bobbyhill605 2 года назад

      @@mad4234 no sadly

    • @mad4234
      @mad4234 2 года назад

      I resolved it.. Just look for the header file in your terminal and include the longer path name.. for me I did #include
      Ugly but it works. I'm getting a new error now that says "the linked and embedded library 'libglfw.3.3.dylib' is missing one or more architectures required by this target: arm64." :(

    • @bobbyhill605
      @bobbyhill605 2 года назад

      Dang I’m also trying to find the string of code he had to put in the Xcode screen

  • @yordi3945
    @yordi3945 2 года назад +1

    set speed to 1.50 ...

  • @choochootraiin
    @choochootraiin 18 дней назад

    man.. you install xcode for literally nothing like do you even know what you're doing??

  • @fritzhopper5145
    @fritzhopper5145 2 года назад

    Just to mention: If you are using Apple Silicon Mac, the glfw library is in opt/homebrew/lib/

  • @bobbyhill605
    @bobbyhill605 2 года назад

    So I ran the file but it can't find the