-
Notifications
You must be signed in to change notification settings - Fork 618
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
--data-path command line option not working #1056
Comments
Thanks for bringing this up. And yes, you're right, I guess this was broken with #894 or maybe never worked at all. We'll take a look. |
@SRSaunders I'll have a look at this as you mentioned it was still an issue. Likely not a huge fix |
@tomadamatkinson any updates? I have prototyped a solution to this problem, but it's the opposite to what the comments in the code imply. The existing comments seem to indicate that Instead I took the opposite approach and added a new
By doing this, any future call to
This cleans things up and completely removes the need for |
I decided to create a pull request so @tomadamatkinson can review my proposed changes. I have tested on all platforms except for Android. Seems to work properly. Happy to receive comments/feedback and make changes as required. With this change I can now debug/run under Xcode (where cwd is the bin dir and not project root), and similarly on linux. Neutral on Windows since VS automatically handles cwd so that executable appears to be running from project root. Note that Xcode *can* be manually configured with a custom working directory (under Scheme: Options), but the --data-path solution is more general and works with all platforms. |
It appears the
--data-path
command line option is not hooked up inside the code. I can successfully run the samples via the command line when my working dir is the home installation directory (i.e. Vulkan-Samples). However, if I cd to the executable dir and try to run from there using the--data-path
option, the samples fail to load the shaders.Looking at the code,
--data-path
does successfully set theexternal_storage_directory
static variable inside platform.h but that's about it. When the shaders are loaded the code uses_external_storage_directory
from std_filesystem.h to form the path which does not equalexternal_storage_directory
from platform.h.I am running on macOS, but I suspect this is also a problem on linux. Note this prevents me from using Xcode to run and debug.
The text was updated successfully, but these errors were encountered: