Browse Source

Merge pull request #29 from devnought/dev

Added glMapBuffer cast
shared-context
Mikko Mononen 11 years ago
parent
commit
3bc6c53ebd
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      src/nanovg_gl3buf.h

+ 1
- 1
src/nanovg_gl3buf.h View File

@@ -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;


Loading…
Cancel
Save