mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-24 15:36:33 +00:00
Restore previous bind when binding to glGet params. Refs #278
This commit is contained in:
@@ -743,6 +743,9 @@ FetchBuffer GLReplay::GetBuffer(ResourceId id)
|
||||
return ret;
|
||||
}
|
||||
|
||||
GLint prevBind = 0;
|
||||
gl.glGetIntegerv(BufferBinding(res.curType), &prevBind);
|
||||
|
||||
gl.glBindBuffer(res.curType, res.resource.name);
|
||||
|
||||
ret.structureSize = 0;
|
||||
@@ -793,6 +796,8 @@ FetchBuffer GLReplay::GetBuffer(ResourceId id)
|
||||
|
||||
ret.name = str;
|
||||
|
||||
gl.glBindBuffer(res.curType, prevBind);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user