Browse Source

Added quick hints on how to debug rendering issues

shared-context
Mikko Mononen 11 years ago
parent
commit
885844a845
1 changed files with 12 additions and 0 deletions
  1. +12
    -0
      README.md

+ 12
- 0
README.md 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.


Loading…
Cancel
Save