Comments (5)
Thank you for the detailed instructions.
For those using CMake:
Here is my solution to avoid manual project configuration.
See CMakeLists.txt for usage instructions.
from 3d-game-shaders-for-beginners.
don't forget to choose the solution platform to x64 if the original is x86
from 3d-game-shaders-for-beginners.
If using a different version of Panda3D, please note the filename prefix, may be different from “Panda3D-1.10.9-x64”
from 3d-game-shaders-for-beginners.
@StarJade-Park thanks to make this explicit for newbies. very appreciated!
from 3d-game-shaders-for-beginners.
Minor nitpick.
C:\Panda3D-1.10.9-x64\lib\libp3framework.lib
C:\Panda3D-1.10.9-x64\lib\libpanda.lib
C:\Panda3D-1.10.9-x64\lib\libpandaexpress.lib
C:\Panda3D-1.10.9-x64\lib\libp3dtool.lib
C:\Panda3D-1.10.9-x64\lib\libpandaphysics.lib
C:\Panda3D-1.10.9-x64\lib\libp3dtoolconfig.lib
C:\Panda3D-1.10.9-x64\lib\libp3openal_audio.lib
You don't have to hardcode the path. Since we define the path in the Additional Lib Directories, they will be found there.
Also, if you don't want to change the output directory, change current working directory in Debugging settings to $(ProjectDir)demonstration. Sidenote, this will work for everything apart Shaders. Shader::load expects a path next to the executable, so change the relative paths in loadShader by appending "../../demonstration/" to the "shaders/..." strings. I didn't go through the code, perhaps sth changes cwd prior to loading shaders and it's not a Shader::load issue.
UPDATE:
Upon further investigation, the prc file contains a model path ($MAIN_DIR) which seems to be the place that VFS defaults to and that MAIN_DIR points to the binary's path and is set here:
https://github.com/panda3d/panda3d/blob/4da2059758267a91cfa7fc91bc77b9332eb280dd/dtool/src/dtoolutil/executionEnvironment.cxx#L296
All loaders seem to call upon VFS (VirtualFileSystem) to resolve the relative filenames, although shader is the only place vfs::find_file is called, while all the others call resolve_filename which internally calls find_file....
VFS internally has its own cwd. Although I didn't figure out why the rest of the assets resolve properly while the shaders don't.
I think I'll stop here. To do anything further, I'd have to rebuild panda and navigate using debugger to make any sense and it just sounds like a lot of work xD.
from 3d-game-shaders-for-beginners.
Related Issues (20)
- Could I get the project file of the model? Like a blender project. HOT 2
- Shader version 150 not supported on MacOS HOT 6
- Need help in how to build on Windows HOT 3
- crash when load_font, windows 10, vs2017, debug x64 HOT 1
- sRGB Formula incorrect
- :display:gsg:glgsg(warning): Project runs but shaders do not load correctly HOT 9
- Windows, can't load shaders! HOT 4
- can't find p3pystub HOT 2
- Get Linkers for panda HOT 4
- Can't open the final package HOT 1
- Demo crash on M1 macbook HOT 5
- Crash on Manjaro KDE HOT 1
- compile error on win10 HOT 1
- osx compile error HOT 3
- Windows10 - Run Demo with 100% GPU usage?
- How to run on Windows visual studio 2019 since panda3d isnt supported on mingw g++ HOT 2
- Demo run crash, Intel iris, Ubuntu 20.04
- .
- No textures when running on MacOS 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 3d-game-shaders-for-beginners.