- nvgTextBreakLines: wordMinX was relative to rowStartX, which caused
problems when rowStartX change on line break, but wordMinX was still
relative to the previous rowStartX
- fixed font size on perf graphs
- made demo to use row minx/maxx instead of row->width
- fixed demo hover distance
This commit fixes the demo’s font sizes for the changes in #558, which makes the rendered font size matches what you saw on other native apps. The demo used bigger font sizes than they actually were. This commit deduces the font sizes to match the original demo’s look.
The `NVGLUframebuffer` structure contains a `ctx` member but was actually never used. This commit takes advantage of the `ctx` property so there is no need to keep the reference of the context elsewhere after calling `nvgluCreateFramebuffer()`, or it would add difficulty for maintenance. As a result, the `nvgluDeleteFramebuffer()` function only needs to take one `NVGLUframebuffer` instance as the parameter.
- API changed!
- moved image repeat from nvgImagePattern() into image creation
nvgCreateImage*()
- made flip-y and premultiplied common image flags (not just GL)
- removed nvglImageFlags(), flags passed in via
nvglCreateImageFromHandle() flags
- nvgluCreateFramebuffer takes image flags as param
- all colors in the shader is handled as premultiplied
- removed alphaBlend param from nvgBeginFrame(), it became obsolete
- added NVGL_TEXTURE_PREMULTIPLIED flag
- separated FBO example
- FBOs are treated as premultipied for correct alpha
- changed FBO storage from depth/stencil 24/8 to stencil 8
- moved discard to end of shader which restores the render speed again
- fixed flags setup in nvglCreateImageFromHandle
- changed frame buffer to only compile on GL3
- changed nvgluCreateFramebuffer() to return FBO struct instead of
filling existing one (for consistency)
- nvgTextBounds() API changed, assumes x,y as input too
- fixed nvgTextBounds() return values
- added nvgTextBoxBounds()
- text line width is handle more consistently
- added note about return values of text measure funds
- changed demo to show text(box)bounds usage
- made uniform buffer support behind separate define for easier toggling
- calculate scissor and stroke alpha outside type selection to simplify
the shader (or else it produces rendering artefacts)
- restore default pixel store settings instead of restoring old state
- set active texture to 0 when starting to render a frame
- added support for GL(ES)2 for nanovg_gl3buf (something is still not
quite there)
- nanovg now sets all required GL state
- removed compiler warnings about unused vars
- added debug configs for the lib
- added more data for font stash text iterator (ptr to current and next
position in string, code point)
- renamed nvgVertMetrics() to nvgTextMetrics()
- added nvgTextGlyphPositions() which returns glyph x position for the
text
- added nvgTextBreakLines breaks a text into multiple rows based on
newlines and max row width
- tweaked tessellation tolerance