mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-27 01:02:48 +01:00
renderer_opengl/utils: Skip empty binds
This commit is contained in:
parent
b631c09e72
commit
34c3e2c786
1 changed files with 3 additions and 0 deletions
|
@ -31,6 +31,9 @@ void BindBuffersRangePushBuffer::Push(GLuint buffer, GLintptr offset, GLsizeiptr
|
||||||
void BindBuffersRangePushBuffer::Bind() const {
|
void BindBuffersRangePushBuffer::Bind() const {
|
||||||
const std::size_t count{buffers.size()};
|
const std::size_t count{buffers.size()};
|
||||||
DEBUG_ASSERT(count == offsets.size() && count == sizes.size());
|
DEBUG_ASSERT(count == offsets.size() && count == sizes.size());
|
||||||
|
if (count == 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
glBindBuffersRange(target, first, static_cast<GLsizei>(count), buffers.data(), offsets.data(),
|
glBindBuffersRange(target, first, static_cast<GLsizei>(count), buffers.data(), offsets.data(),
|
||||||
sizes.data());
|
sizes.data());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue