Giter Club home page Giter Club logo

Comments (5)

Nebe avatar Nebe commented on May 14, 2024 1

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.

just44fun avatar just44fun commented on May 14, 2024

don't forget to choose the solution platform to x64 if the original is x86

from 3d-game-shaders-for-beginners.

CesarO-k avatar CesarO-k commented on May 14, 2024

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.

dmitrykolesnikovich avatar dmitrykolesnikovich commented on May 14, 2024

@StarJade-Park thanks to make this explicit for newbies. very appreciated!

from 3d-game-shaders-for-beginners.

NPatch avatar NPatch commented on May 14, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.