From fa8d2a9d03c4eb4a59511d80f1acde1173a97986 Mon Sep 17 00:00:00 2001 From: Kyle Gretchev Date: Mon, 17 Feb 2014 03:15:08 -0500 Subject: [PATCH] Added glMapBuffer cast Cast void* to char* to remove compiler warning in C++ project in VS2013 --- src/nanovg_gl3buf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nanovg_gl3buf.h b/src/nanovg_gl3buf.h index d361cba..ba70151 100644 --- a/src/nanovg_gl3buf.h +++ b/src/nanovg_gl3buf.h @@ -798,7 +798,7 @@ static void glnvg__renderFlush(void* uptr) // upload ubo for frag shaders - maximum ubos is 2x num calls glBindBuffer(GL_UNIFORM_BUFFER, gl->uboFragBuf); glBufferData(GL_UNIFORM_BUFFER, 2 * gl->ncalls * sizeof(struct GLNVGuboFrag), 0, GL_STREAM_DRAW); - char* buff = glMapBuffer( GL_UNIFORM_BUFFER, GL_WRITE_ONLY ); + char* buff = (char*)glMapBuffer( GL_UNIFORM_BUFFER, GL_WRITE_ONLY ); for (i = 0; i < gl->ncalls; i++) { struct GLNVGcall* call = &gl->calls[i]; struct GLNVGuboFrag* ubo = (struct GLNVGuboFrag*)buff;