Browse Source

Merge pull request #28 from jtilander/master

Fixed some warnings with MS compiler
shared-context
Mikko Mononen 11 years ago
parent
commit
79c0746285
2 changed files with 9 additions and 2 deletions
  1. +8
    -1
      src/nanovg.h
  2. +1
    -1
      src/nanovg_gl2.h

+ 8
- 1
src/nanovg.h View File

@@ -437,7 +437,14 @@ struct NVGparams {
struct NVGcontext* nvgCreateInternal(struct NVGparams* params);
void nvgDeleteInternal(struct NVGcontext* ctx);

#define NVG_NOTUSED(v) (void)sizeof(v)
// Compiler references
// http://sourceforge.net/p/predef/wiki/Compilers/
#if _MSC_VER >= 1800
// VS 2013 seems to be too smart for school, it will still list the variable as unused if passed into sizeof().
#define NVG_NOTUSED(v) do { (void)(v); } while(0)
#else
#define NVG_NOTUSED(v) (void)sizeof(v)
#endif

#ifdef __cplusplus
}


+ 1
- 1
src/nanovg_gl2.h View File

@@ -728,7 +728,7 @@ static void glnvg__renderFill(void* uptr, struct NVGpaint* paint, struct NVGscis
glDisable(GL_BLEND);
glEnable(GL_STENCIL_TEST);
glStencilMask(0xff);
glStencilFunc(GL_ALWAYS, 0, ~0);
glStencilFunc(GL_ALWAYS, 0, ~0U);
glColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE);

glUseProgram(gl->shader.prog);


Loading…
Cancel
Save