Fixed use of nvglImageHandlexx in GL utils from earlier PR

- nvglImageHandle was changes to contain GL postfix, changed GL utils
to use that too
- fixed silly failure check bug in FBO demo
master
Mikko Mononen 2016-02-01 21:41:24 +02:00
parent 2504509fb2
commit b83cf92652
2 changed files with 12 additions and 2 deletions

View File

@ -175,7 +175,7 @@ int main()
return -1;
}
if (!loadFonts(vg) == -1) {
if (loadFonts(vg) == -1) {
printf("Could not load fonts\n");
return -1;
}

View File

@ -64,7 +64,17 @@ NVGLUframebuffer* nvgluCreateFramebuffer(NVGcontext* ctx, int w, int h, int imag
memset(fb, 0, sizeof(NVGLUframebuffer));
fb->image = nvgCreateImageRGBA(ctx, w, h, imageFlags | NVG_IMAGE_FLIPY | NVG_IMAGE_PREMULTIPLIED, NULL);
fb->texture = nvglImageHandle(ctx, fb->image);
#if defined NANOVG_GL2
fb->texture = nvglImageHandleGL2(ctx, fb->image);
#elif defined NANOVG_GL3
fb->texture = nvglImageHandleGL3(ctx, fb->image);
#elif defined NANOVG_GLES2
fb->texture = nvglImageHandleGLES2(ctx, fb->image);
#elif defined NANOVG_GLES3
fb->texture = nvglImageHandleGLES3(ctx, fb->image);
#endif
fb->ctx = ctx;
// frame buffer object