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š
fe8d36db56
Doc++
14 years ago
Vladimír Vondruš
e9329745e8
Using `override` keyword in all places I can think of at this time.
14 years ago
Vladimír Vondruš
6ebe42c3a9
Compatibility mode for GCC 4.6.
...
4.6 doesn't support `override` keyword, using preprocessor macro to
simply hide it. The compatibility mode must be explicitly enabled,
though, using GCC46_COMPATIBILITY CMake option.
14 years ago
Vladimír Vondruš
b5fc786478
Renamed Matrix4::[xyz]Rotation() to Matrix4::rotation[XYZ]().
...
* "Rotation around [XYZ]" makes more sense than "[XYZ] axis rotation".
* This naming will appear in autocompletion.
* SceneGraph transformation methods will be named similarly
rotate[XYZ]() (because [xyz]Rotate() is weird even more).
14 years ago
Vladimír Vondruš
f707e91599
Better parameter names in Matrix transformation methods.
...
Mainly it is now explicitly stated in parameter name that rotation axis
must be normalized.
14 years ago
Vladimír Vondruš
c460fdc059
Doc++
14 years ago
Vladimír Vondruš
bf55b5854b
TypeTraits: Default inheritance type for structs is public.
...
Simplified already too long lines.
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š
cb1c3f0b2b
Preparation for type checked vertex attributes.
...
Currently it was possible to pass e.g. five-component vector or 2x1
matrix to shader, we don't want that.
14 years ago
Vladimír Vondruš
42af2c1a49
Fixed serious copy/paste error.
...
Unnoticed since c1cf94fb46 .
14 years ago
Vladimír Vondruš
adb4d06b95
Have consistent template order (first size, then type).
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š
84850b5bf9
Updated AbstractShaderProgram documentation.
...
* #version directive doesn't belong to shader sources, since it is
specified in Shader constructor.
* It's not needed to call use() before setUniform() anymore.
14 years ago
Vladimír Vondruš
6278db11e2
Don't show links to extension functions in non-proportional font.
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š
14192fa40f
Mesh rework, part 6: don't rebind default VAO after draw call.
...
There are a few corner cases namely with binding element buffer, which
should be resolved as soon as possible.
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š
eb0565b5d9
Minor code cleanup.
14 years ago
Vladimír Vondruš
3367b3636c
Disable "extern template" for ResourceManager in MinGW GCC.
...
MinGW GCC probably has a bug which causes linker errors - complains
about conflicting symbols (inline functions instantiated more than
once).
14 years ago
Vladimír Vondruš
c4f321d911
Don't use extern template where it is not necessary.
...
Extern template probably causes even inline functions to be
instantiated, because MinGW's GCC 4.7.0 then complains about conflicting
symbols, removing them fixes the issue.
Extern template is not necessary here, as the needed functions are
explicitly instantiated in source file only anyway and we don't care
about instantiation count of inline functions.
14 years ago
Vladimír Vondruš
1cf0179377
Avoid linker errors with *WindowContext on mingw.
14 years ago
Vladimír Vondruš
dbe4c22645
Don't use constexpr in AbstractImage subclasses.
...
AbstractImage has virtual destructor, thus it is not possible to
instantiate it in constant expression.
14 years ago
Vladimír Vondruš
373b279278
Another fix for Clang compilation.
14 years ago
Vladimír Vondruš
69421f9187
Provide default constructor for AbstractShaderProgram::Attribute.
...
Fixes compilation with clang.
14 years ago
Vladimír Vondruš
365c664ef9
Mesh rework, part 4: don't manage index buffer in IndexedMesh.
...
The user now has to manage the buffer, similarly to vertex buffers
in Mesh itself.
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š
4aa01e073e
Code cleanup, doc++
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š
53d82bda19
Got rid of default Buffer target.
...
For non-DSA access user can now specify target hint, which will be used
when binding the buffer internally.
14 years ago
Vladimír Vondruš
45f349644f
Ability to easily get pointer to data from Resource.
...
Neither operator*() nor operator->() can be used to pass plain pointer
to function or store it in variable. Now it should be converted
automatically.
14 years ago
Vladimír Vondruš
5ad3844626
PhongShader: fall back to GLSL 1.20 if 3.30/3.20 is not supported.
14 years ago
Vladimír Vondruš
40523e530c
PhongShader: using `position` for vertex position.
14 years ago
Vladimír Vondruš
f5a63d7fc1
Updated PhongShader to recent coding standards.
...
Namely removed *Uniform from setter names and enabled method chaining.
14 years ago
Vladimír Vondruš
dfa92c2998
Physics: Box2D debug renderer.
14 years ago
Vladimír Vondruš
f85a7fc568
Physics: Minimal initial implementation of debug draw.
14 years ago
Vladimír Vondruš
9f7ae0b34f
Overloaded AbstractTexture methods in subclasses for better chaining.
...
Allows to conveniently set the data after fully configuring the texture,
so OpenGL can optimize the data to match the settings. Advice taken from
http://developer.apple.com/library/ios/#documentation/3DDrawing/Conceptual/OpenGLES_ProgrammingGuide/TechniquesForWorkingWithTextureData/TechniquesForWorkingWithTextureData.html#//apple_ref/doc/uid/TP40008793-CH104-SW1
14 years ago
Vladimír Vondruš
1f43839e04
Using EXT_direct_state_access in textures.
...
Saves unnecessary calls to glActiveTexture() and glBindTexture().
14 years ago
Vladimír Vondruš
1f3c360cb2
Using bindInternal() directly in AbstractTexture::DataHelper.
14 years ago
Vladimír Vondruš
ddbfca2f95
Don't export private symbols.
14 years ago
Vladimír Vondruš
733e02b07b
Documented internal shader program state tracking.
14 years ago
Vladimír Vondruš
b9e96d3b08
Documented internal buffer state tracking.
14 years ago
Vladimír Vondruš
f9099a86bf
Tracking texture state - bindings and limits.
14 years ago
Vladimír Vondruš
676f89127f
BufferedTexture is now privately based on AbstractTexture.
...
Don't duplicate the functionality when it is not necessarily needed.
14 years ago
Vladimír Vondruš
803ebfd2ab
Removed unneeded #include.
14 years ago
Vladimír Vondruš
c0aa6a3ba5
Don't forget to set ShapedObject as dirty after setting shape.
...
Also inlined the function and allowed method chaining.
14 years ago