Vladimír Vondruš
ea2faa91b7
Explicit offset also in Mesh::addVertexBuffer().
...
The offset is present in all other functions, adding it just for
consistency (although it is redundant here).
13 years ago
Vladimír Vondruš
c593594c3f
Doc++
13 years ago
Vladimír Vondruš
dc5a4d83d9
Removing IndexedMesh, part 5: merged documentation, removed IndexedMesh.
13 years ago
Vladimír Vondruš
a8abbdb7d3
Removing IndexedMesh, part 4: merged draw algorithm.
...
Still source-compatible, next step is to merge the documentation and
remove IndexedMesh stub altogether.
13 years ago
Vladimír Vondruš
a2a66803be
Removing IndexedMesh, part 3: moved last remaining setter to Mesh.
...
Now only the drawing mess needs to be merged.
13 years ago
Vladimír Vondruš
dfb9491433
Saving vertex attribute parameters only if not using VAOs.
...
Same reasoning as in previous commit.
13 years ago
Vladimír Vondruš
b20c83f258
Removing IndexedMesh, part 2: moved all member variables to Mesh.
...
As Mesh constructor is not exactly trivial, moved it to source, allowing
to hide another function pointer variable.
13 years ago
Vladimír Vondruš
e4fc418db1
Properly specify pointers for all matrix attribute columns.
...
Really need some tests for that.
13 years ago
Vladimír Vondruš
3f1592c23d
Inlined Mesh::setVertexCount().
13 years ago
Vladimír Vondruš
688251add9
Removing IndexedMesh, part 1: moved enums and related stuff to Mesh.
13 years ago
Vladimír Vondruš
976377f0a4
Moved code to check allowed attribute types to internal implementation.
...
TypeTraits class is now not needed at all.
14 years ago
Vladimír Vondruš
a9d25c995f
Mesh: fixed attribute stride computation.
...
The stride was computed always for resulting GLSL type (e.g. vec4) even
if the data were of anoother type (e.g. std::uint8_t[4]). The code is
exceptionally ugly now, time to wrap it with unit tests.
14 years ago
Vladimír Vondruš
fbeb7b02bc
Minor renaming in shader/mesh guts.
...
Function size() will be used later for commputing size of the attribute,
renaming the original to components().
14 years ago
Vladimír Vondruš
aef9b16c62
Don't allow removing vertex/index buffer from meshes.
...
Would cause weird issues with state, it's better to just not allow it
and follow KISS principle than trying to implementing it. Also
crosslinked required function calls in documentation.
14 years ago
Vladimír Vondruš
3f727b4abc
Doc: fixed a few issues with OpenGL ES extensions.
14 years ago
Vladimír Vondruš
ef81b1035c
Doc++
14 years ago
Vladimír Vondruš
7d04b7d511
Doc++
...
Basic framebuffer usage, mentioned framebuffer attachments in shader
documentation.
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š
3b37dfa6b8
Deleted constructors of classes with only static members.
...
They shouldn't be instantiated, prevent mistakes with this.
14 years ago
Vladimír Vondruš
dc1ab80cda
Doc++
14 years ago
Vladimír Vondruš
9ead1e9deb
Thorough documentation review and update.
...
Now whole Magnum, Magnum::SceneGraph and Magnum::Math namespaces are
fully documented -- each class has at least "getting started"
documentation, larger modules are documented on separate pages.
14 years ago
Vladimír Vondruš
ae013effff
Adapted to Corrade changes.
...
Optimalizations in Corrade::TestSuite and Corrade::Utility::Debug leaded
to significant reduction of compilation time - on my machine it was
~5:38 before with building of unit tests enabled, now only ~5:00.
14 years ago
Vladimír Vondruš
8f13362f7a
Allow attribute-less Mesh.
...
For e.g. fullscreen triangle with no vertex data.
14 years ago
Vladimír Vondruš
35d8905790
Debug output and configuration parser for Mesh::Primitive.
14 years ago
Vladimír Vondruš
4545eb8987
Doc++
14 years ago
Vladimír Vondruš
5b707d3524
Using GLfloat as default template parameter also in Color.
14 years ago
Vladimír Vondruš
8abc836ae4
Allow passing nullptr to IndexedMesh::setIndexBuffer().
...
Similar functionality should be in Mesh itself for unbinding vertex
buffers.
14 years ago
Vladimír Vondruš
8f83485653
Forward declarations for Magnum namespace in Magnum.h header.
14 years ago
Vladimír Vondruš
a3c37cd277
Doc++, minor cleanup.
14 years ago
Vladimír Vondruš
50a0e5558e
Updated OpenGL ES support in Mesh and IndexedMesh.
...
VAOs could be supported with extensions, thus not disabling them for
ES2.
14 years ago
Vladimír Vondruš
259a9f6666
Type-checked vertex attributes with type conversion possibility.
...
* Normalization of e.g. color components passed as unsigned byte to
float values is possible.
* BGRA vector component ordering is possible.
* Proper type checking, allowing only GLSL-equivalent types to be used
as attributes.
* Reverted back to typedef'ing shader attributes, as type conversion
can now be specified in constructor.
14 years ago
Vladimír Vondruš
eec4e7d099
Implementation of double vertex attributes in Mesh.
14 years ago
Vladimír Vondruš
5efa8402e5
Marking some non-implemented features as "won't be supported".
14 years ago
Vladimír Vondruš
9f48ba1d53
Added @todo and new extension.
14 years ago
Vladimír Vondruš
77716dacdd
Mesh rework, part 7: using EXT_direct_state_access for vertex pointers.
14 years ago
Vladimír Vondruš
56bc8825cc
Mesh rework, part 5: tracking currently bound VAO.
...
If the VAO is already bound, not calling glBindVertexArray() again.
14 years ago
Vladimír Vondruš
2871222b86
Mesh rework, part 3: don't specify vertex/index count in constructor.
...
In most cases the constructor is called at a very different place than
where the mesh is configured, leading to mistakes and/or confusion.
14 years ago
Vladimír Vondruš
10e64d2d27
Mesh rework, part 2: reworked internals.
...
* VAOs are used only if the extension is supported.
* Removed finalize() and other already useless stuff.
* Preparation for DSA and state tracking.
14 years ago
Vladimír Vondruš
5cf2428082
Merged two mesh constructors into one.
14 years ago
Vladimír Vondruš
21acb3edc6
Mesh rework, part 1: better vertex attribute management.
...
* Instead of "binding attributes" the user now "adds vertex buffer". It
corresponds better with what OpenGL itself does.
* Vertex buffers now must be managed by the user.
* Shader attributes are now static const members instead of typedefs to
allow more convenient add*VertexBuffer*() calls.
14 years ago
Vladimír Vondruš
b3517eda01
Doc: crosslinking MeshTools and relevant Mesh functions.
14 years ago
Vladimír Vondruš
02f0de619a
Method chaining for Mesh.
14 years ago
Vladimír Vondruš
04829da616
Mesh::setFrontFace() should be static (and inline).
14 years ago
Vladimír Vondruš
e213979559
Fixed compilation on OpenGL ES.
14 years ago
Vladimír Vondruš
035bd4d376
Links to documentation of related gl*() function.
...
Each function touching OpenGL now has list of all related functions
touching OpenGL.
14 years ago
Vladimír Vondruš
dfb4e0f807
Mesh: ability to specify which polygons are front facing.
14 years ago
Vladimír Vondruš
d5614a2f2c
Mesh: added support for polygon offset.
14 years ago
Vladimír Vondruš
fd1ae3f775
Mesh: added support for provoking vertex selection.
14 years ago
Vladimír Vondruš
092d2fc897
Doc++
...
* Workarounds for unsupported features in OpenGL ES.
* Initial values for some states.
14 years ago
Vladimír Vondruš
6b5c20bc83
Grouped global mesh settings together.
14 years ago