Comments (2)
Had the same problem using Visual Studio from /build folder. I had to replace ./../data with ../../data in four places because the working folder cmake creates in visual studio projects is relative to the vcxproj, which is under build/src. So to get to data you need to drop down two levels of folders, not one.
In general, relative paths should work both within Visual Studio debugger and if you click on the .bin directly. So the working folder should be the solution folder, which should be assumed to be under the root in /build probably. The current build dir dumps the .exe three levels deep at /build/bin/debug (or release), but the vcproj is at build/src, two levels deep, so there is no common path that works with or without visual studio debugger attached OOTB.
Lots of other samples do this relative path searching dynamically at runtime, which is a bit clunky and hacky TBH.
I'm not sure what command line change is to make solution dir the default working dir in cmake, but it would be worth adding it to the README..
The one improvement I do think should be made to this repo, is to remove the duplicated / hardcoded "./../data" prefix and make it a define so you only need to change it in one place, and any time you try to read an asset it concatenates the string. Could be done at runtime (or at compile time with some macros).
Anyway, the main problem in this codebase for me is that I had to modify several files and places to fix what should've been a single character missing (.. instead of .). It's best not to hardcode paths anyway, or if you do hardcode something, hardcode it once and only once, period. Never have magic numbers sprinkled around in several places either, that's what defines or constexpressions are for.
from vulkan-gltf-pbr.
Same for building on macOS or Linux using CMake where the build directory is a child of the main project directory.
from vulkan-gltf-pbr.
Related Issues (20)
- `getMatrix` become too slow when the scene contains deeper node hierarchies. HOT 5
- animationTimer is scaled by 0.75 HOT 2
- When I create a offscreen Render pass to save the scene, the program always stucks. HOT 1
- Crash in Model::destroy, vkFreeMemory when unloading specific model HOT 1
- Invalid Joint Indices/Broken Animation HOT 3
- assigning signed value to unsigned int HOT 2
- why is the diffuseColor scaled by (vec3(1.0) - f0)? HOT 1
- questions about shading and input parameters HOT 6
- Two-sided triangles or depth issue HOT 5
- How to make the backgrund sharp? HOT 1
- weird cone-shaped shading illusion HOT 2
- Materials PBR loading in VulkanglTFModel.cpp HOT 1
- [Question] Using this code as a guide to writing a glTF scene loader HOT 2
- android studio build error HOT 1
- Color_0 values not rendered HOT 4
- Forget to add reference& on the parentBvh in void Model::calculateBoundingBox(Node *node, Node *parent) ? HOT 1
- Effect of SRGBtoLinear HOT 2
- redundant call to generateCubemaps()
- Problem with animations HOT 4
- Compilation error on Linux HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vulkan-gltf-pbr.