Previously it would discard them, which needed the user to call love.graphics.clear afterward to get them into a valid state.
The current code has suboptimal performance if the user still calls clear after setCanvas (a common situation), so more optimizations will probably be needed.
Fixes#1843.
This a significant refactor / rewrite of much of the love.graphics Font code.
Text positioning is now split into TextShaper classes in the love.font module. This isn't exposed to users yet.
BMFonts and ImageFonts use the same text shaping as before (in the new TextShaper API). Fonts loaded via FreeType now use Harfbuzz for text shaping.
The new code isn't at feature-parity with the old code yet. Harfbuzz-based text shaping enables kerning support in more fonts, character combining into ligature glyphs, and directions other than left-to-right (this isn't supported in love yet).
The only field currently read from the table is 'defines', which can contain either an array of define names, or name-value pairs.
For example: newShader(file, {defines={"MYFEATURE_ENABLED", MYSETTING=1}})
Fixes#1577
- Add setStencilMode(drawaction, comparemode, value = 0, readmask = 0xFF, writemask = 0xFF).
- Add getStencilMode.
- Remove love.graphics.stencil.
- Remove love.graphics.set/getStencilTest.
Note that the new setStencilMode API does not clear the stencil buffer, and does not turn off color writes (it can still be done manually), unlike love.graphics.stencil.
Fixes#1161.
Fixes#1251.
- Added love.graphics.setOrthoProjection.
- Added love.graphics.setPerspectiveProjection.
- Added love.graphics.resetProjection.
Note that the projection is reset whenever the canvas changes.
- Add t.renderers and t.excluderenderers love.conf fields. They can be an array of renderer names.
- Add --renderers a,list,of,renderernames and --excluderenderers more,renderers argument options.
love's pre-generated quad index buffer is useful when combined with drawShaderVertices. Note that it uses 16 bit indices so it can only draw up to 16k quads in a single call.
It draws a number of vertices, or a number of indices from an index buffer, without using any vertex data from a vertex buffer. A custom shader is required while using it.
It is useful when a custom GLSL3 vertex shader which uses love_VertexID is used to pull or compute per-vertex information from other sources.
- rx and ry parameters are set to 0 if they're negative.
- automatic points calculation doesn't cause an unnecessarily large amount of points when rx or ry are greater than half the rectangle's size.