Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/gpu/opengl/gl_storage_buffer.cc')
-rw-r--r--source/blender/gpu/opengl/gl_storage_buffer.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/gpu/opengl/gl_storage_buffer.cc b/source/blender/gpu/opengl/gl_storage_buffer.cc
index 9cdde0b5734..a461d834790 100644
--- a/source/blender/gpu/opengl/gl_storage_buffer.cc
+++ b/source/blender/gpu/opengl/gl_storage_buffer.cc
@@ -100,6 +100,13 @@ void GLStorageBuf::bind(int slot)
#endif
}
+void GLStorageBuf::bind_as(GLenum target)
+{
+ BLI_assert_msg(ssbo_id_ != 0,
+ "Trying to use storage buf as indirect buffer but buffer was never filled.");
+ glBindBuffer(target, ssbo_id_);
+}
+
void GLStorageBuf::unbind()
{
#ifdef DEBUG