Comments (7)
huh :-/
I get log lines like this...
/home/Fragmentarium/test.frag(130) : warning C7011: implicit cast from "int" to "float"
edit: maybe the quotes? follow with empty line before #ifdef line ?? nVidia only ???
from fragm.
quote from https://www.khronos.org/opengl/wiki/Core_Language_(GLSL)#.23line_directive
#line directive
The #line directive allows you to change the current FILE and LINE values
from fragm.
I already quoted a bit from there. It only supports string numbers, not filenames, at least per the spec, which Mesa adheres to (NVIDIA is too lenient, leading to breakage elsewhere...).
I have some patches that print out a filename map before error messages with string numbers:
0 -> Unnamed
1 -> /home/claude/opt/fragm/glm/Fragmentarium-2.5.0/Examples/Include/MathUtils.frag
2 -> /home/claude/opt/fragm/glm/Fragmentarium-2.5.0/Examples/Include/DE-Raytracer.frag
3 -> /home/claude/opt/fragm/glm/Fragmentarium-2.5.0/Examples/Include/3D.frag
Could not create fragment shader: 0:6(40): error: syntax error, unexpected FLOATCONSTANT, expecting ')' or ','
So this error occured in an Unnamed
(unsaved) frag. Fixing it and adding an error in DE-Raytracer.frag
gives
0 -> Unnamed
1 -> /home/claude/opt/fragm/glm/Fragmentarium-2.5.0/Examples/Include/MathUtils.frag
2 -> /home/claude/opt/fragm/glm/Fragmentarium-2.5.0/Examples/Include/DE-Raytracer.frag
3 -> /home/claude/opt/fragm/glm/Fragmentarium-2.5.0/Examples/Include/3D.frag
Could not create fragment shader: 2:15(1): error: syntax error, unexpected NEW_IDENTIFIER, expecting $end
which I hope is better than nothing (or the total breakage from using filenames).
from fragm.
quote from https://www.khronos.org/opengl/wiki/Core_Language_(GLSL)#.23line_directive
#line directive
The #line directive allows you to change the current FILE and LINE values
a string is a string is a string so shouldn't matter if it's numbers or letters (but apparently it does)
If you are using nVidia gfx card I highly recomend using the nVidia driver, the installer builds a kernel module from source with a bit of proprietary stuff thrown in, using any other driver will not let you enjoy the full power of the gfx card and imho will always have problems. This is why I'm not really actively supporting anything other than manufacturers officially released drivers or hardware that doesn't support at least GL 4.0
from fragm.
full quote of that section, as you didn't pay attention to the part I quoted already:
#line directive
The #line directive allows you to change the current
__FILE__
and__LINE__
values, and is different from C. It has the forms:
#line line
#line line source-string-number
The line after the #line directive in the source will be set to the give line number. For example, if you have "#line 4" on one line and "error" on the next, then "error" will be on line 4 if it is an error. The #line directive does not support source files as in C.
(my emphasis)
from fragm.
nVidia driver/compiler has no problems with this (GL>4)
I have a working version that uses numbers as index into filename list and puts the correct filename in the log, should work for AMD too.
from fragm.
nVidia driver/compiler is known to accept out-of-spec input, which leads to issues everywhere else.
looking forward to test your fixes!
from fragm.
Related Issues (20)
- render time with ETA & progress per subframe
- Windows build of Fragmentarium 2.5.6 crashes at startup HOT 6
- Is there any homepage for FragM like there was for Fragmentarium HOT 2
- segfault on mouse click in dead window HOT 1
- Nothing showing HOT 3
- Attempting to build on google collab HOT 9
- frag/vert compatibility patches should handle `#extension` HOT 11
- cmake 3.20 is too new HOT 1
- Video encoding dialog bug
- Looping camera path
- Ping pong
- Easingcurve crash
- Easing curve loop off by 1
- Rewind animation
- Cannot find `rand` function HOT 4
- Undefined variable "time" when use #define USE_IQ_CLOUDS HOT 7
- The animation render doesn't rename the frames incrementally HOT 6
- glsl preprocessor directives not parsed
- Support exporting to shadertoy HOT 5
- Is "subframe" equivalent to "iFrame" in shadertoy? 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 fragm.