Vladimír Vondruš
27a80cb76e
Shaders: doc++
13 years ago
Vladimír Vondruš
dfeeff779b
Shaders: oops.
13 years ago
Miguel Martin
0670f59c95
Added colour uniform to flat shader (event when texturing is enabled)
...
This enables blending and transparency
Default colour is white (and fully opaque)
13 years ago
Vladimír Vondruš
ef83211c46
Shaders: fix textured Flat on systems w/o ARB_explicit_attribute_location.
...
How could I possibly overlook this.
13 years ago
Vladimír Vondruš
8d01723084
Fixed static build.
13 years ago
Vladimír Vondruš
f86a60c82d
Fix static build on Windows.
13 years ago
Vladimír Vondruš
0611f58569
Shaders: fix tests in static build.
13 years ago
Vladimír Vondruš
01194d4316
Rename also classes and files for GL tests.
13 years ago
Vladimír Vondruš
60a064c920
Ensure that all GL tests have `*GLTest` suffix.
...
Makes it easier to selectively run GL/non-GL tests.
13 years ago
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š
3eb7f6f2b8
Shaders: added generic shader definition.
...
Defines common attributes which are shared by majority of the shaders,
allowing mesh to be configured for the generic shader to be used with any
of them.
13 years ago
Vladimír Vondruš
4d68547cbe
Shaders: set VertexColor::Color attribute location to 3.
...
Locations 0, 1 and 2 are reserved for positions, texture coordinates and
normals.
13 years ago
Vladimír Vondruš
ef42287cf9
Shaders: use location 1 for texture coordinates and location 2 for normals.
13 years ago
Vladimír Vondruš
5542f82d9f
Shaders: set MeshVisualizer::VertexIndex attribute location to 3.
...
Locations 0, 1 and 2 will be reserved for positions, texture coordinates
and normals.
13 years ago
Vladimír Vondruš
0a09b496ca
Shaders: include cleanup.
13 years ago
Vladimír Vondruš
a125964273
Doc++
13 years ago
Vladimír Vondruš
fd3f7febae
Shaders: what the hell.
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š
c9e8d270a5
Shaders: okay, I admit, my NVidia really _is_ forgiving in GLSL ES.
...
The tests didn't catch this at all.
13 years ago
Vladimír Vondruš
da0f4de5ff
Shaders: fixed Flat shader.
...
It is now [0] days since last copypaste error.
13 years ago
Vladimír Vondruš
0f60325126
Shaders: minor cleanup.
13 years ago
Vladimír Vondruš
016c190607
Shaders: doc++
13 years ago
Vladimír Vondruš
f130ce5891
Added convenience Matrix2x2, Matrix3x3 and Matrix4x4 aliases.
...
Unlike Matrix3/Matrix4 these don't have any transformation-related
functions. Deprecated the old Matrix2 typedef, which is now replaced
with Matrix2x2 and will be removed in future release.
13 years ago
Vladimír Vondruš
60d8d1af16
Shaders: textured version of Flat shader.
13 years ago
Vladimír Vondruš
593864be5c
Shaders: doc++
13 years ago
Vladimír Vondruš
e4790eaec9
Fix installation dir for DLLs on Windows.
...
Similar change to mosra/corrade@8fbedb0df2557e8b18acbb358b83bd93d7da7e20.
13 years ago
Vladimír Vondruš
66a756a958
Shaders: extension queries depending on GLSL version in MeshVisualizer.
...
The geometry shader implementation somehow expects GLSL 1.50 and is not
working on GLSL 1.40 (probably inconsistent variable naming in
extension and core specification). Added checks for that. Might fix this
properly someday when there is need for geometry shader in GL 3.1.
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š
0d28913731
Allow shader layout qualifiers only with GLSL 1.40 (GL 3.1) and above.
...
Even if the extension specification describes the minimum required
version as GL 2.1 (or doesn't mention it at all), most compilers can't
handle `layout(...)` before input/output declaration. These drivers mark
the extensions as supported on GL < 3.1, but then can't handle them at
all: Mesa fails to compile it with GLSL 1.20, NVidia fails with GLSL
1.30.
Also updated `EXPLICIT_*` defines in Shaders/compatibility.glsl to
reflect this change.
13 years ago
Vladimír Vondruš
06f0433250
Shaders: better preprocessor code formatting.
13 years ago
Vladimír Vondruš
2c0e7da5a0
Shaders: fix compilation of textured Phong shader on OpenGL ES.
13 years ago
Vladimír Vondruš
51ca4be9a9
Shaders: fix Phong shader compilation for more than one texture.
13 years ago
Vladimír Vondruš
9e2dc3cc2f
Shaders: test compilation of Phong shader.
...
Currently fails for some combinations.
13 years ago
Vladimír Vondruš
55a557f419
Shaders: test compilation of MeshVisualizer shader.
13 years ago
Vladimír Vondruš
c2f69b20e8
Shaders: test compilation of Flat and VertexColor shaders.
13 years ago
Vladimír Vondruš
c13f8a77f5
Shaders: test compilation of *Vector shaders.
13 years ago
Vladimír Vondruš
f4de432ac4
Shaders: `const` for readonly vars is in ARB_shading_language_420pack.
...
In the end it wasn't my NVidia shader compiler being too forgiving.
13 years ago
Vladimír Vondruš
fd1d067c36
Shaders: fix textured Phong for GLSL 1.20 and GLSL ES 1.0.
...
I desperately need unit tests for shader compilation.
13 years ago
Vladimír Vondruš
f166d006c2
Shaders: `const` for readonly variables is since GLSL 4.20.
13 years ago
Vladimír Vondruš
ac3fe7cdf5
Removed Doxygen workarounds for forward declarations.
13 years ago
Vladimír Vondruš
13d5e2a50f
Removed enum-referencing Doxygen workarounds.
...
In 1.8.5 it is now possible to reference directly to enum member.
Hooray! Also added explicit @ref here and there, fixing some referencing
bugs along the way.
13 years ago
Vladimír Vondruš
3f53a7a1ca
Shaders: don't set uniform if not used.
13 years ago
Vladimír Vondruš
d04b308aa3
Reducing pointer chasings, part 1: method chaining via references.
...
Makes some cases less consistent (and some convenience shortcuts
impossible), but goes well with the attitude "don't use pointer when it
can't be null".
13 years ago
Vladimír Vondruš
41f7784dc5
Shaders: ambient, diffuse and specular texture support in Phong.
13 years ago
Vladimír Vondruš
b349ca54ad
Shaders: explicitly setting normal matrix in Phong shader.
...
Currently the most used scene graph transformation implementation are
dual quaternions, which don't allow any scaling. The original code
normalized the rotation matrix, involving three dot products and one
sqrt, even if it wasn't needed in most cases -- even if using scene
graph with matrices mostly you don't scale at all and thus the shader
internally renormalized already normalized vectors for _each object_ in
each frame.
This _will_ break things, don't forget to update the code and call
`setNormalMatrix()` along with `setTransformationMatrix()`.
13 years ago
Vladimír Vondruš
e5d0904417
Shaders: no need to have virtual destructor here.
...
Protected constructor and destructor is sufficient, AbstractVector
itself isn't meant to be deleted (via pointer).
13 years ago
Vladimír Vondruš
fc0bde4f47
Wrap CMAKE_SHARED_LIBRARY_CXX_FLAGS in quotes.
...
The variable is empty on some platforms (Windows), would cause issues.
13 years ago
Vladimír Vondruš
771968c69a
Shaders: forgot this.
...
Follow up to 2eb4e3c8ba . Damn.
13 years ago
Vladimír Vondruš
2eb4e3c8ba
Removed default template argument from DimensionTraits.
...
It's not obvious what should be the default and thus it is confusing.
Sometimes Int, sometimes Float, no clear winner.
13 years ago