Skip to content

Commit

Permalink
Don't use BindBufferBase when binding a buffer for mapping. Refs #344
Browse files Browse the repository at this point in the history
  • Loading branch information
baldurk committed Feb 20, 2017
1 parent 2043755 commit ec2e3cc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions renderdoc/driver/gl/gl_driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1750,7 +1750,7 @@ void WrappedOpenGL::RenderOverlayStr(float x, float y, const char *text)
// if it's reasonably modern context, assume we can use buffers and UBOs
if(ctxdata.Modern())
{
gl.glBindBufferBase(eGL_UNIFORM_BUFFER, 0, ctxdata.GeneralUBO);
gl.glBindBuffer(eGL_UNIFORM_BUFFER, ctxdata.GeneralUBO);

FontUBOData *ubo = (FontUBOData *)gl.glMapBufferRange(
eGL_UNIFORM_BUFFER, 0, sizeof(FontUBOData), GL_MAP_WRITE_BIT | GL_MAP_INVALIDATE_BUFFER_BIT);
Expand Down Expand Up @@ -1784,7 +1784,7 @@ void WrappedOpenGL::RenderOverlayStr(float x, float y, const char *text)
len = FONT_MAX_CHARS;
}

gl.glBindBufferBase(eGL_UNIFORM_BUFFER, 0, ctxdata.StringUBO);
gl.glBindBuffer(eGL_UNIFORM_BUFFER, ctxdata.StringUBO);
uint32_t *texs =
(uint32_t *)gl.glMapBufferRange(eGL_UNIFORM_BUFFER, 0, len * 4 * sizeof(uint32_t),
GL_MAP_WRITE_BIT | GL_MAP_INVALIDATE_BUFFER_BIT);
Expand Down

0 comments on commit ec2e3cc

Please sign in to comment.