mirror of
https://github.com/memononen/nanovg
synced 2026-09-26 16:19:07 +03:00
Added quick hints on how to debug rendering issues
This commit is contained in:
parent
b47f256607
commit
885844a845
1 changed files with 12 additions and 0 deletions
12
README.md
12
README.md
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue