Update README.md
Highlighted the need for render target stencil buffer.
This commit is contained in:
parent
c75fc0bfcf
commit
72bac5d98b
@ -1,6 +1,3 @@
|
||||
/work in progress.../
|
||||
|
||||
|
||||
NanoVG
|
||||
==========
|
||||
|
||||
@ -32,6 +29,8 @@ The first parameter defines flags for creating the renderer.
|
||||
|
||||
Currently there is an OpenGL back-end for NanoVG: [nanovg_gl.h](/src/nanovg_gl.h) for OpenGL 2.0, OpenGL ES 2.0, OpenGL 3.2 core profile and OpenGL ES 3. The implementation can be chosen using a define as in above example. See the header file and examples for further info.
|
||||
|
||||
*NOTE:* The render target you're rendering to must have stencil buffer.
|
||||
|
||||
## Drawing shapes with NanoVG
|
||||
|
||||
Drawing a simple shape using NanoVG consists of four steps: 1) begin a new shape, 2) define the path to draw, 3) set fill or stroke, 4) and finally fill or stroke the path.
|
||||
@ -61,7 +60,7 @@ nvgFill(vg);
|
||||
## Rendering is wrong, what to do?
|
||||
|
||||
- make sure you have created NanoVG context using one of the `nvgCreatexxx()` calls
|
||||
- make sure you have initialised OpenGL with stencil buffer
|
||||
- make sure you have initialised OpenGL with *stencil buffer*
|
||||
- make sure you have cleared stencil buffer
|
||||
- make sure all rendering calls happen between `nvgBeginFrame()` and `nvgEndFrame()`
|
||||
- to enable more checks for OpenGL errors, add `NVG_DEBUG` flag to `nvgCreatexxx()`
|
||||
|
Loading…
x
Reference in New Issue
Block a user