Mikko Mononen
02ca24ad75
Fix to update alloc count after successful alloc
11 years ago
Mikko Mononen
7f55decf8f
More error checking on allocations
- changed remainder of allocations to follow same 1.5x patters
- do not leak memory when realloc() fails
- added error handling in case allocations fail
11 years ago
Mikko Mononen
b2d93429e5
Fixed issue #80
- increased initial buffer sizes
- change all allocator patterns to over allocate by 1.5x
- fixes bug where nvgl back-end was not allocating +n as requested
11 years ago
Mikko Mononen
4cc5fd68d1
Improved nvgTextGlyphPositions()
- added glyph min/max x
- fixed first glyph position
11 years ago
Mikko Mononen
5a4e5a3d7c
Added nvgCurrentTransform() and exposed matrix functions
- added nvgCurrentTransform() which allows to get the current
transformation matrix
- added skew x/y transforms
- exposed functions 2x3 matrix functions
- exposed point transform
- added deg/rad conversion functions
11 years ago
Mikko Mononen
be16b4dff3
Made old GL backends obsolete, added docs
- added documentation about changed GL state
- made old GL2 and GL3 backends obsolete
11 years ago
Mikko Mononen
6edc46e5b0
Allow small strokes, fixed textBoxBounds()
- added test for multiple stroke widths
- allow stroke width down to 1px size, then scale with alpha
- fixed textBoxBounds() in hi-dpi
11 years ago
Mikko Mononen
b416f76b1c
Added nvgTextBoxBounds, fixed nvgTextBounds
- 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
11 years ago
Mikko Mononen
9d367dcb81
GL3buf backend supports GL2 too (not yet enabled)
- 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
11 years ago
Mikko Mononen
fdb96903c8
Fixed text related calculations for hi-dpi rendering
- calculate all text related stuff using scaling
- removed a couple of compiler warnings
- tweaked caret picking
11 years ago
Mikko Mononen
7a282bd934
Added some TODOs, no return value for textbox
11 years ago
Mikko Mononen
635f4a4afb
Added multi-line text drawing
- fixed some warnings
- changed nvgLetterSpacing() to nvgTextLetterSpacing()
- added nvgTextBox()
- added nvgTextLineHeight()
- added some documentation
11 years ago
Mikko Mononen
ff8b521506
Added text break line and glyph position functions
- 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
11 years ago
Mikko Mononen
888103db39
Adjusted tessellation
- changed tessellation flatness test which produces less vertices
(especially when using straight lines)
- added nvgDebugDumpPathCache which allows to dump path cache state to
stout
11 years ago
Doug Binks
f398f26018
Bugfix to nvgRGBf
11 years ago
Doug Binks
c3f50b9c01
Removed nvgIsBlack, and added isBlack to demo.c
11 years ago
Doug Binks
253dc627e7
Added nvgTransRGBAf
11 years ago
Doug Binks
a83913bc87
Added nvgRGBf and nvgRGBAf constructor functions.
11 years ago
Doug Binks
466ab4b19a
Converted spaces to tabs.
11 years ago
Doug Binks
d16b4df7fd
Warning/Error fix: added int return type to nvgIsBlack
11 years ago
Doug Binks
3d3582cd9a
Moved to floating point color via NVGcolor structure.
Currently working with gl3buf backend.
11 years ago
Mikko Mononen
0262883c55
Fixes for AA on retina, a bit finer tessellation
- changed tessellation threshold from 0.3 to 0.25
- fixed scissor AA on retina
- fixed stroke AA on retina
11 years ago
Kyle Gretchev
db5c78fb00
Variable initialization, unused var removal, and casts.
Removed some unused variables to silence compiler warnings, initialized
variables to 0, added varialbe casts to silence additional compiler
warnings.
11 years ago
Mikko Mononen
8b55ae414e
Improved miter and bevel line joins
11 years ago
Mikko Mononen
ba3c0cbce1
Fix for issue #40 : Added support to render using premultiplied alpha
- added support to take screen shots
- added support to render to frame buffer using premultiplied alpha
- fixed spelling NVGaling -> NVGalign
11 years ago
Mikko Mononen
5de5c1d2a0
Improve stroke rendering
- added better logic for inner bevels
- tweaks to reduce overdraw at edges
- fixed convex shape logic
11 years ago
Andrew Corrigan
38bb65617e
reduces warnings
11 years ago
Caleb Gingles
731cb55221
Update nanovg.c
11 years ago
Mikko Mononen
99bd7b358e
Moving variables at top of blocks for better VC support
11 years ago
Mikko Mononen
4a1e66a515
Do bevels only at control points
11 years ago
Mikko Mononen
0ec2be7a6c
Added support for line caps and joins
11 years ago
Mikko Mononen
9576341b7e
Reversed path winding to make it actually ccw
11 years ago
Mikko Mononen
6840bf8478
Simplified back-end API a little
- removed assize from the back-end api
- moved image to paint in renderTriangles call
11 years ago
Mikko Mononen
d41083886a
Added retina/hi-dpi support
- fixed off-by-one pixels from demo
- added device-pixel-ratio support (retina support)
- added nvgEndFrame()
11 years ago
Mikko Mononen
ecb0a9c394
Removed scaling from nvgTextBounds and nvgVertMetrics and commented the behavior
11 years ago
Mikko Mononen
cd376082ba
Added MSAA option for backends
- added option to turn off AA fringe generation
- added examples which use no AA fringes and MSAA
11 years ago
Mikko Mononen
56574f6eb3
Apply font scaling to nvgTextBounds and nvgVertMetrics
11 years ago
Mikko Mononen
336de19a16
Better rounding for quantization to remove text rendering jitter
11 years ago
Mikko Mononen
8b234ca953
Improved rendering performance of convex shapes and on gl3 back-end
- set swap interval to 0 to better see performance
- draw convex shapes without stencil to speed things up
- improve vertex buffer upload for gl3
11 years ago
Mikko Mononen
9b00b7aaf5
Implemented OGL 3.2 core profile back-end
- moved demo stuff to separate file
- created two separate examples for gl2 and gl3
- initial stab at OGL 3.2 core profile back-end (currently twice as
slows as 2.0)
- API change: glBeginFrame() takes view witdth and height as input
- added FPS counter to demo
11 years ago
Mikko Mononen
c8e2466447
Fix text rendering flickering under rotation
- quantize font rendering scale
- round kerning values for less flicker
11 years ago
Mikko Mononen
4431218724
Fixed issue #6, font atlas size was not passed to create texture
11 years ago
Mikko Mononen
4b9dc973f7
Fixed arcTo, small additions to API
- fixed nvgArcTo
- added nvgTransRGBA, allows to change alpha of color
- added nvgFindFont, allows to find font id by name
11 years ago
Mikko Mononen
99e7d9b21d
added texture atlas size to glnvgCreate()
11 years ago
Mikko Mononen
68d27124a8
- decorated math functions
- updated font stash
- added end parameter to text (can draw substring)
- text and text measure return advance/width
11 years ago
Mikko Mononen
6c0d41a124
Fixed small arc rendering, improved example, added screenshot
- fixed arc rendering for small arcs
- added color wheel to example
- added screenshot
11 years ago
Mikko Mononen
b89907ba6b
First commit
11 years ago