Added quick hints on how to debug rendering issues

This commit is contained in:
Mikko Mononen 2014-04-01 16:33:49 +03:00
parent b47f256607
commit 885844a845

View File

@ -51,6 +51,18 @@ nvgFillColor(vg, nvgRGBA(255,192,0,255));
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 cleared stencil buffer
- make sure you have following OpenGL state between calls to `nvgBeginFrame()` and `nvgEndFrame()`:
- `glEnable(GL_CULL_FACE)`
- `glCullFace(GL_BACK)`
- `glEnable(GL_BLEND)`
- `glDisable(GL_DEPTH_TEST)`
- if the problem still persists, please report an issue!
## API Reference
See the header file [nanovg.h](/src/nanovg.h) for API reference.