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)
- 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
- 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