Vladimír Vondruš
14c6790701
Shaders: set default values for VertexColorShader uniforms.
...
Default value for matrix uniform would be zero uniform which would cause
"black screen of death".
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š
777f67ab9f
GCC 4.5 compatibility: can't use initializer list here.
...
Don't know why.
13 years ago
Vladimír Vondruš
a0b83edd2b
Relicensing to MIT/Expat license, part 4: CMake and documentation files.
...
They didn't contain license header before, but I think adding it also
there wouldn't do any harm. Documentation is also integral part of the
codebase.
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š
6a5d75d1e4
Relicensing to MIT/Expat license, part 2: headers.
13 years ago
Vladimír Vondruš
90dbb28763
Thorough CMakeLists cleanup.
...
* Calling enable_testing() only in root path.
* Using CORRADE_CXX_FLAGS instead of our own set to make things easier
to maintain.
* Various cleanup and reorganization.
13 years ago
Vladimír Vondruš
2d98dadb0a
Shaders: first DistanceFieldVectorShader implementation.
...
Currently only fill and outline can be specified. Also crosslinked from
documentation of VectorShader and TextureTools::distanceField().
13 years ago
Vladimír Vondruš
549558b502
Shaders: doc++
13 years ago
Vladimír Vondruš
d256d7a0c4
Shaders: missing virtual keyword.
...
This was compiling?! It seems that I don't know more than I think.
13 years ago
Vladimír Vondruš
e891bd9b31
Shaders: use Int instead of GLint.
...
Don't know how this only place got forgotten.
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š
5a374dd73e
Shaders: support alpha in VectorShader::setColor().
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š
616a31f4d2
Shaders: got rid of Point2D/3D in positions in favor of Vector2/Vector3.
...
Originally it was for more convenient usage of homogeneous coordinates
in shaders themselves, but it is actually not needed:
* When passing three-component vector (3D position) to `vec4`, the last
coordinate is implicitly set to `1`, thus there is no need to pass it
explicitly in each attribute.
* On the other hand, when passing three-component vector (2D position
in homogeneous coordinates) to `vec3` with Z explicitly set to `1`,
it still needs some swizzle magic to extend it to `vec4` gl_Position.
Passing it as two-component vector results in nearly the same magic
while saving precious memory.
13 years ago
Vladimír Vondruš
0cba8db268
Shaders: added missing 3D version of text shader.
13 years ago
Vladimír Vondruš
dc798b7320
Shaders: added missing 3D version of FlatShader vertex shader.
...
Fragment shader is common for both 2D and 3D.
13 years ago
Vladimír Vondruš
a22bf1bf4e
Shaders: don't use explicit attribute location on GL 2.1.
13 years ago
Vladimír Vondruš
1d88310521
Shaders: off-by-one error.
...
Explicit attrib location is supported on GLSL >= 130, not >= 120.
13 years ago
Vladimír Vondruš
d175dd1054
Updated workarounds for Doxygen 1.8.2.
...
Removed workarounds for alias templates, variadic templates and
anonymous enums, but 1.8.2 has some bug with forward declarations
causing classes to appear in default namespace, breaking
cross-references.
14 years ago
Vladimír Vondruš
f9f95946b1
Shaders: 3D version of VertexColorShader.
...
Fragment shader can be shared for 2D and 3D version, modified the
sources accordingly.
14 years ago
Vladimír Vondruš
7151486e02
Another Doxygen parsing workaround.
14 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š
06d6032300
Shaders: base for text shaders.
14 years ago
Vladimír Vondruš
c3bcaee6a7
Shaders compatibility: check for explicit texture layer support.
14 years ago
Vladimír Vondruš
7e66a09461
Marking all constructors explicit, except for matrix and vector classes.
...
It prevents unwanted implicit conversions from e.g. nullptr to Camera,
Vector2 to Physics::Point etc. By making all the constructors explicit
it is easier to routinely add the keyword to all new classes instead of
thinking about cases when to add and when not to.
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š
2f4092bde0
Prefix *_EXPORT macros with MAGNUM_ to avoid collisions.
14 years ago
Vladimír Vondruš
5b707d3524
Using GLfloat as default template parameter also in Color.
14 years ago
Vladimír Vondruš
d2f0a2a045
Using default template arguments instead of GLfloat everywhere.
...
It was mainly in DimensionTraits usage. Also using DimensionTraits::*Type
for private members of physics shapes instead of manually specified
superclasses. The header is still included because of all the inline
accessors, so why not use the same type inside the class.
14 years ago
Vladimír Vondruš
642ab3b74d
WTF?
14 years ago
Vladimír Vondruš
308a92a911
Shaders: pass normal matrix the right way.
...
Besides that this was long overdue, GLSL ES doesn't have mat3x3().
14 years ago
Vladimír Vondruš
69ee2f3ebb
Shaders: don't compare ints and floats.
...
Fails on GLSL ES.
14 years ago
Vladimír Vondruš
57f3175b06
Shaders: GLSL ES doesn't have default values for uniforms.
...
If targetting GLSL ES the values are set on initialization explicitly
from application.
14 years ago
Vladimír Vondruš
681914e2d0
Forward declarations for Shaders namespace in Shaders/Shaders.h.
14 years ago
Vladimír Vondruš
68a28f5098
Shaders: Fixed FlatShader fragment shader compilation.
14 years ago
Vladimír Vondruš
5f4822bfd7
GCC 4.5 compatibility: another initializer-list issue in shader.
14 years ago
Vladimír Vondruš
17ee1d7fd8
Shaders: portable vertex color shader (currently 2D only).
14 years ago
Vladimír Vondruš
81b69f17e1
Shaders: another iteration in porting of Phong and Flat shaders to GLES.
...
Hope the reduced precision won't hurt.
14 years ago
Vladimír Vondruš
dfccdf9b7e
Minor pedantic ordering fix.
14 years ago
Vladimír Vondruš
02158cd0f9
GCC 4.5 compatibility: fixed initializer-list issues.
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š
084294e60b
Blind port of PhongShader to OpenGL ES 2.0.
14 years ago
Vladimír Vondruš
3191b477df
Typedef 2D and 3D alternatives of FlatShader.
...
More intuitive than e.g. FlatShader<2>.
14 years ago