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...
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.
thanks a lot !
also "command + shift + K" can help if you get a "Cycle inside ..." error
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.
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.
You saved me so much time, thank you!
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.
Thank you for this great tutuorial. Now I can continue to do graphics programming in C++ on my MacBook pro M1 laptop.
Is it really working good with the M1 ?
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.
Ah thanks for sharing
Any questions feel free to post on Discord discord.gg/Qn4tSPD
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.
Thanks so much! My program was not creating instances probably because of the incomplete paths from the tutorial. This saved me thanks!!
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
can someone help? I don't know which pdf to cut and paste from GitHub -
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
Thanks for sharing this, I am certain it Will help many others.
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.
It worked for me, named "Disable Library Validation" in Xcode 15
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?
I could'n find the file starting with libglfwn in the lib folder. Why is that the case?
Try this
gist.github.com/jxsl13/d23828f8dfa58dfb19504fb53b65c4e4
The Vulkan EXEC opened at the end but nothing mentioned "zero Metal Services found"
Should we expect a vulkan series or this is one off video?
Vulkan Series, Uploaded another video today, another company tomorrow
Any questions feel free to post on Discord discord.gg/Qn4tSPD
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.
> 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
I ended up with a Thread 1: signal SIGABRT error, anyone know how to fix?
signing & capabilities > disable library validation
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
On Intel of course
Do you know if renderdoc works with moltenvk ? I couldn't find any binaries for it.
ican't install glfw it says command not found : brew
Have you installed Homebrew?
"'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'.
NOT WORKING!
I tried to do the brew install glfw but it can't be found
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.
@@bobbyhill605 Did you ever resolve this issue? Getting the same error
@@mad4234 no sadly
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." :(
Dang I’m also trying to find the string of code he had to put in the Xcode screen
set speed to 1.50 ...
man.. you install xcode for literally nothing like do you even know what you're doing??
Just to mention: If you are using Apple Silicon Mac, the glfw library is in opt/homebrew/lib/
So I ran the file but it can't find the
It should be
@@SonarSystemsCoUk that correct typo on comments