Comments (2)
Compiling included files is intentional, it allows us to diagnose exactly where an issue occurs without having to do more complicated line mappings. When we added this I was thinking from a C++ programmer's perspective where a scenario that you describe is kinda bad engineering, as your code written in an include suddenly depends on client code. But I don't know if it's common in the graphics world. So I'll add a setting to skip this extra step, but you can expect worse diagnostics if your included files contain errors.
from shader-toy.
Thank you very much for the recent update.
Just a little thing about the "bad engineering" point of view of yours:
I don't know much what's your experience in cpp but I will guess you already used headers and inlines.
You know that in cpp you can use forward declaration which will produce undefined symbols which will be resolved at link.
Sadly in graphics programming, you often have to compile one unit directly to your program and not assemble multiple compile units into one at a link step. That's why using forward declare does not really work in this case, they expect that your compile unit contains no unresolved symbols. Except when all includes are contained into one unit which will be compiled and resolve the forward declaration in that same unit.
You might think this is bad engineering, but it's common engineering to use such forward declaration with definition in multiple compil units. (especially in cpp: all declarations in headers does not have symbols resolved in all compile unit of each cpp file, they are only resolved at link step)
from shader-toy.
Related Issues (20)
- iMouse.w behavior is different from Shadertoy
- Make available as web extension HOT 2
- Feature request: setting to start the shader paused HOT 5
- Feature request: leave the preview alone if compilation fails HOT 2
- Feature request: GLSL ES 3.0 Support HOT 1
- bug report on self-input-buffer and solution to it HOT 1
- Feature request: import from shadertoy url and from shadertoy export json HOT 2
- Frametime panel blocks the Controls panel
- Feature request: export as video HOT 7
- Feature request: breakpoint debug shaders HOT 1
- Feature request: reload texture when the image changes
- Recording w/ the framerate graph enabled errantly records the framerate graph and not the shader HOT 1
- Feature request: Export Frames as PNG for High-Resolution Video Creation HOT 1
- Add .reloadOnSave HOT 1
- can't run glslify example HOT 5
- Cant preview any shader HOT 1
- Compilation error when using #define HOT 1
- Weird Artifact on Custom Screenshot Resolutions
- The menu is displayed even for files other than .glsl.
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 shader-toy.