Vladimír Vondruš
51db425bdb
Shaders: use generic definitions also in GLSL sources.
...
So each sourcs doesn't need to be manually rewritten each time the
generic definition changes.
13 years ago
Vladimír Vondruš
81f02a24c6
Shaders: compile shaders also for GLSL 1.50 (GL 3.2).
...
It seems that ARB_explicit_attrib_location is not supported on GLSL 1.40
on OSX (even that the support is advertised).
13 years ago
Vladimír Vondruš
00a8383214
Shaders: ability to specify background color in Vector shader.
...
Makes it possible to use the shader without blending.
13 years ago
Vladimír Vondruš
0b4e6391a0
Shaders: extension support queries depend on selected GLSL version.
...
Also added GLSL 1.30 (GL 3.0) into version list. Should fix issues where
extension is supported but is not available in selected GLSL version.
13 years ago
Vladimír Vondruš
261250f074
Shaders: fix port of *Vector shaders to old GLSL.
...
Texture layer binding was never set and there were various GLSL
compilation errors.
13 years ago
Vladimír Vondruš
db71a23e3c
Bring whole Corrade namespace into Magnum namespace.
...
These projects are tightly interconnected anyway, this means a lot less
typing (yay!).
13 years ago
Vladimír Vondruš
6904b38b13
Reworked and cleaned up shader classes.
...
Removed unneeded member variables, removed wrong assertions and wrong
documentation (most of the state they were fobidding is actually valid).
Retrieving shader log with full length, properly printing non-error
messages to debug output.
Each shader must now be compiled explicitly using compile(), which is
slightly better for the user as it is possible to check compile status
instead of having it weirdly hidden inside attachShader(). link() now
also returns linking status.
13 years ago
Vladimír Vondruš
fd4ada4fc1
Method chaining in Shader.
...
The methods return reference instead of pointer, as the class is
commonly created on the stack. Removed static functions
Shader::fromFile() and Shader::fromData(), as they are not needed now.
Also asserting that the file exists and is readable in addFile().
13 years ago
Vladimír Vondruš
623fda0dc7
Shaders: removed superfluous `*Shader` suffix from class names.
13 years ago
Vladimír Vondruš
127910d537
Shaders: minor tweaks.
...
Non-matching number of opening and closing braces confused editors with
code folding feature.
13 years ago
Vladimír Vondruš
c5ab86794b
Relicensing to MIT/Expat license, part 3: source files.
...
Added license header also to shader sources. Hopefully it won't harm
compilation times too much.
13 years ago
Vladimír Vondruš
3c31519133
Shaders: cleanup of VectorShader.
...
Using this-> for accessing parent class members breaks KDevelop
autocompletion, using explicit class name instead (but the shorter one).
13 years ago
Vladimír Vondruš
b6caae10b0
Shaders: vertex VectorShader is implementation independent.
...
Renamed it to AbstractVectorShader.
13 years ago
Vladimír Vondruš
91f0d302c2
Shaders: renamed TextShader to VectorShader.
...
The code can be used for drawing any vector art, not only font glyphs.
13 years ago
Vladimír Vondruš
003e524a26
Shaders: using new type aliases in whole Shaders namespace.
13 years ago
Vladimír Vondruš
0cba8db268
Shaders: added missing 3D version of text shader.
13 years ago
Vladimír Vondruš
a22bf1bf4e
Shaders: don't use explicit attribute location on GL 2.1.
13 years ago
Vladimír Vondruš
29a07c7d62
GCC 4.6 compilation fixes.
14 years ago
Vladimír Vondruš
df1d8a95b4
Shaders: basic text shader.
14 years ago
Vladimír Vondruš
7a894e97a0
Using ARB_explicit_uniform_location in shaders.
...
The backwards compatibility fully kills the purpose, but at least I can
test the feature somewhere :-)
14 years ago
Vladimír Vondruš
231c002838
Explicitly use *Matrix in names when appropriate.
...
* In shader uniforms (projectionMatrix makes more sense than projection
alone)
* For underlying types for SceneGraph transformation. It is already
used in Drawable::clean() as transformationMatrix, so why not use it
also in AbstractFeature::clean(). Moreover, clean() could be in
future also done using something else, this helps to distinguish the
type just from parameter name.
* In Physics shapes - applyTransformationMatrix() (as it could be in
future also done using something else).
14 years ago
Vladimír Vondruš
e4a6832eab
Accidentaly forgot commented-out code.
14 years ago
Vladimír Vondruš
2dd0a68329
Internal "traits" cleanup.
...
Don't use constexpr class members, as their usage is not so convenient
compared to classic inline functions.
14 years ago
Vladimír Vondruš
6f6d3d09b2
Blind port of FlatShader to OpenGL 2.1 and OpenGL ES 2.0.
14 years ago
Vladimír Vondruš
d46bc34390
Moved flat shader from internal physics implementation to Shaders.
...
It is so general that it can be reused elsewhere.
14 years ago
Vladimír Vondruš
f85a7fc568
Physics: Minimal initial implementation of debug draw.
14 years ago