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
Vladimír Vondruš
6ae88e22c5
Removed forgotten traces of debug draw from ShapedObject.
14 years ago
Vladimír Vondruš
706db2b560
Physics: Accessors to ShapeGroup members.
14 years ago
Vladimír Vondruš
71d90580b0
Physics: Shape type is public function.
14 years ago
Vladimír Vondruš
ef6858aeca
Warn about self-initialization.
14 years ago
Vladimír Vondruš
f28f5398d3
Added some @todos .
14 years ago
Vladimír Vondruš
602a9be75e
Don't duplicate CubeMapTexture functionality in CubeMapTextureArray.
14 years ago
Vladimír Vondruš
b97e6f8bce
Updated and simplified AbstractShaderProgram documentation.
14 years ago
Vladimír Vondruš
beea8235b1
Using EXT_direct_state_access/ARB_separate_shader_objects for uniforms.
...
Also explicitly calling use() on default (non-DSA) setUniform()
implementation. Because of that, it is now possible to conveniently call
use() at the end, instead of at the beginning of uniform setting chain,
for example:
// before
shader->use();
shader->setTransformation(transformation)
->setProjection(projection)
->setColor(color);
// now
shader->setTransformation(transformation)
->setProjection(projection)
->setColor(color)
->use();
Note that you still have to explicitly call use(), because if DSA is
available, no use() is called explicitly on any setUniform(). If DSA is
not available, use() is called on first setUniform() and subsequent
calls have no negative performance impacts.
14 years ago
Vladimír Vondruš
2dde4b9bf8
Tracking AbstractShaderProgram state.
...
Reduces OpenGL call count when subsequently using the same shader for
rendering.
14 years ago
Vladimír Vondruš
6b3781b97f
Tracking Buffer state.
...
Reduces OpenGL call count if subsequently binding the same Buffer into
the same Target.
14 years ago
Vladimír Vondruš
193246e533
Private (implementation-only) OpenGL state tracker.
14 years ago
Vladimír Vondruš
4d8825bee0
Removed WTF todo. It was the case only for ES.
14 years ago
Vladimír Vondruš
7004ebdd50
Using EXT_direct_state_access also for Buffer::set*Data().
14 years ago
Vladimír Vondruš
684a1ee712
Removed set*Data(Target, ...) functions from Buffer.
...
They didn't make sense at all (and even less with DSA, where target
doesn't need to be specified anywhere), the only usage in BufferedImage
was misunderstood from the beginning.
14 years ago
Vladimír Vondruš
806828f173
First extension-aware functionality - Buffer::copy().
...
If EXT_direct_state_access is supported, it uses faster alternative to
explicit binding.
14 years ago
Vladimír Vondruš
c47b416bcf
Added EXT_direct_state_access to Extensions list.
14 years ago