Vladimír Vondruš
cd4fce8926
AbstractShaderProgram documentation: number attributes from 0.
...
According to my observations (and crazy bugfixing madness) ATI cards
don't support anything else than attributes numbered from 0 with
successive numbers.
Also fixed (pedantic) comma at the end of enum.
14 years ago
Vladimír Vondruš
62fb2d5470
Using MurmurHash in MeshTools::Clean.
...
SubdivideCleanBenchmark times are untouched with this change, but the
hash should be better for MeshTools::CombineIndices, where the previous
hash generated all zeros in most cases.
14 years ago
Vladimír Vondruš
7c2f1bec77
Cleaned up CMakeLists.
14 years ago
Vladimír Vondruš
1f2aa86be3
Fixed awesome bug in Vector3 constructor.
...
Updated unit test to make sure it won't happen again.
14 years ago
Vladimír Vondruš
05107f383b
Doc: some workarounds for Doxygen C++11 support etc.
14 years ago
Vladimír Vondruš
171c75aca9
Naming consistency for variadic templates.
14 years ago
Vladimír Vondruš
ac4a6fd31d
Doc++
14 years ago
Vladimír Vondruš
b6ac0125dc
"Initializer-list" constructor also for Matrix.
14 years ago
Vladimír Vondruš
f8d44a19ed
Removed wrong TODO.
...
Math types cannot be implicitly shared, because they often need to be
casted to float[], for example.
14 years ago
Vladimír Vondruš
7a03e48df8
Finally "initializer-list" constructor for Vector.
...
It's not actually initializer list, because it is only for
variable-length types, which is unusable here. Variadic templates do
better job here.
14 years ago
Vladimír Vondruš
7911c22eff
Removed convenience functions with "unwrapped" Vector parameters.
...
With C++11, objects can be passed nearly as easy as without these
convenience functions, for example:
Matrix4::scaling({0.5f, 1.0f, 0.5f});
which is nearly the same as the following, using convenience function:
Matrix4::scaling(0.5f, 1.0f, 0.5f);
Convenience functions can also be pretty confusing, for example:
Matrix4::rotation(1.0f, -1.0f, 2.0f, 2.0f); // wtf?
Matrix4::rotation(1.0f, {-1.0f, 2.0f, 2.0f}); // ah, okay!
There are also a few neat tricks, which cannot be done using convenience
functions, for example:
Matrix4::translate(Vector3::xAxis(3.0f)); // {3.0f, 0.0f, 0.0f}
Camera::setClearColor({0.1f, 0.1f, 0.1f}); // default 1.0f for alpha
14 years ago
Vladimír Vondruš
28adf2c98b
Added length parameter to Vector3::[xyz]Axis().
...
Now you can write e.g.
Matrix4::translation(Vector3::xAxis(5.0f));
instead of these:
Matrix4::translation(Vector3::xAxis()*5.0f); // slow!
Matrix4::translation({5.0f, 0.0f, 0.0f}); // boring!
14 years ago
Vladimír Vondruš
aedc90e712
Doc++
...
Fixed mainly unwanted Doxygen autolinks.
14 years ago
Vladimír Vondruš
5d3f54edb2
Warn and assertion fail when mesh has no vertices/indexes before drawing.
14 years ago
Vladimír Vondruš
45200899ed
Assertion fail when user is doing something wrong with shaders.
...
Non-assertion-failing error switched to warning, as it is not fatal.
14 years ago
Vladimír Vondruš
e3f0edd418
Convenience functions for setting buffer data from vector.
14 years ago
Vladimír Vondruš
8d7a6078c3
Doc++
14 years ago
Vladimír Vondruš
eacad4895f
Added normals array to Icosphere primitive.
14 years ago
Vladimír Vondruš
596ab6b6a6
Removed MeshBuilder class, as it is finally not used anymore.
...
All features once provided by MeshBuilder are now part of MeshTools,
this class was just too complicated and required unnecessary data
copying.
14 years ago
Vladimír Vondruš
9418ff6e97
Removed unused AbstractPrimitive class.
...
Moved Primitives namespace documentation to doc/namespaces.dox.
14 years ago
Vladimír Vondruš
7dae98ded1
Primitives: using MeshData instead of AbstractPrimitive.
...
The classes now provide better access to the data. Also fixed
SubdivideCleanBenchmark from MeshTools.
14 years ago
Vladimír Vondruš
c1158e0995
MeshData: use four-component vectors for vertices.
...
Don't trade usability for space efficiency.
14 years ago
Vladimír Vondruš
5306d46b49
Removed MeshTools::AbstractTool, as nothing depends on it.
...
MeshTools namespace documentation moved to doc/namespaces.dox.
14 years ago
Vladimír Vondruš
02b71d6b15
MeshTools: removed dependency on MeshBuilder in Clean and Subdivide.
...
SubdivideCleanBenchmark and Primitives library currently doesn't
compile, will be fixed in next commits.
14 years ago
Vladimír Vondruš
9e81d4b6c3
Fixed awesome mistake in Math::TypeTraits.
...
Epsilon value for integral types should be 1, not 0. Updated
documentation and test to reflect the change.
14 years ago
Vladimír Vondruš
571f41f53f
MeshTools: removed dependency on MeshBuilder in Tipsify.
14 years ago
Vladimír Vondruš
fb0c4f0d15
MeshTools: tool for interleaving attribute arrays.
...
All passed attribute arrays must have the same length, otherwise zero
length array is generated.
14 years ago
Vladimír Vondruš
9ea3a36105
Added function Mesh::isInterleaved().
14 years ago
Vladimír Vondruš
bca691f2b7
MeshTools: tool for compressing index array.
...
The same functionality which is buried inside MeshBuilder, but properly
tested and more usable.
14 years ago
Vladimír Vondruš
f7ba048c06
Using operator() instead of run() in MeshTools.
...
In other words I finally discovered how to work around C++'s most vexing
parse.
14 years ago
Vladimír Vondruš
b0b1a401d1
Counting attributes from 0, not from 1.
...
Caused awesome black screen on AMD cards.
14 years ago
Vladimír Vondruš
36254a3806
Win fixes: don't export nonexported classes and export exported classes.
14 years ago
Vladimír Vondruš
6504aecf0c
Added classes Image and BufferedImage.
...
These classes are meant to be used in the same texture updating
functions as Trade::ImageData due to static polymorphism. In addition to
Trade::ImageData, which is read-only, these classes support updating the
dimensions and data. Image2D and ImageBuffer2D can update the data also
from framebuffer.
14 years ago
Vladimír Vondruš
c1374155b0
Math: function to compute product of all values in the vector.
...
Is this mathematic operation at all?
14 years ago
Vladimír Vondruš
62d0fa96a8
Added Buffer:setSubData() functions.
14 years ago
Vladimír Vondruš
0feebe3f7c
Function for unbinding given buffer target.
14 years ago
Vladimír Vondruš
10b8eda20a
Inlined functions.
14 years ago
Vladimír Vondruš
7bae1a3f8a
Renamed data access classes in Trade to avoid confusion.
14 years ago
Vladimír Vondruš
42b10e775b
Removed old untrue documentation from Trade::AbstractImporter.
14 years ago
Vladimír Vondruš
5fa2f2e03f
Optimized #include.
14 years ago
Vladimír Vondruš
33e822a397
Function for pixel size of given color format and data type per channel.
...
Also documented the formats a little.
14 years ago
Vladimír Vondruš
d7a497b87b
Make Camera::setViewport() virtual.
14 years ago
Vladimír Vondruš
d702c13195
Added Object::scale() for scaling proportionally in all dimensions.
14 years ago
Vladimír Vondruš
a64fbfbe63
Use OpenGL-compatible types in camera viewport size.
14 years ago
Vladimír Vondruš
91cbe3040d
Cleaned up alien stuff from CMakeLists.txt
14 years ago
Vladimír Vondruš
e43c1fae33
Strongly-typed Primitive enum in Mesh.
...
Also updated "default" constructor to include primitive type, as in many
cases only the primitive is specified and not the counts and types of
data.
14 years ago
Vladimír Vondruš
fb9b003e24
Buffer rework.
...
* Renamed Type enum to Target to be consistent with OpenGL naming
* Strongly typed enums
* Ability to specify different type when binding/setting data
* Added missing buffer targets
14 years ago
Vladimír Vondruš
e98ca5b03a
Moved drawing functions from Scene to Camera.
...
Also removed non-trivial orthographic projection and clear color
defaults, addded GL_STENCIL_BUFFER_BIT to glClear().
14 years ago
Vladimír Vondruš
a0ba7663b0
Doc++
14 years ago
Vladimír Vondruš
62d1860db1
Don't use virtual when reimplementing virtual function.
14 years ago