NVG_ANTIALIAS
means that the renderer adjusts the geometry to include anti-aliasing. If you're using MSAA, you can omit this flags.NVG_STENCIL_STROKES
means that the render uses better quality rendering for (overlapping) strokes. The quality is mostly visible on wider strokes. If you want speed, you can omit this flag.nvgBeginPath()
will clear any existing paths and start drawing from blank slate. There are number of number of functions to define the path to draw, such as rectangle, rounded rectangle and ellipse, or you can use the common moveTo, lineTo, bezierTo and arcTo API to compose the paths step by step.nvgPathWinding(vg, NVG_HOLE)
, or nvgPathWinding(vg, NVG_CW)
after defining the path.nvgCreatexxx()
callsnvgBeginFrame()
and nvgEndFrame()
NVG_DEBUG
flag to nvgCreatexxx()
GL_UNPACK_ALIGNMENT
, GL_UNPACK_ROW_LENGTH
, GL_UNPACK_SKIP_PIXELS
, GL_UNPACK_SKIP_ROWS
. Texture binding is also affected. Texture updates can happen when the user loads images, or when new font glyphs are added. Glyphs are added as needed between calls to nvgBeginFrame()
and nvgEndFrame()
.nvgEndFrame()
. The following code illustrates the OpenGL state touched by the rendering code: