gl: Memoize the bound range for a buffer

This commit is contained in:
kd-11 2024-04-23 05:02:10 +03:00 committed by kd-11
parent 3ef1eb8529
commit 4cf7b7022e
2 changed files with 6 additions and 0 deletions

View file

@ -146,11 +146,13 @@ namespace gl
void buffer::bind_range(u32 index, u32 offset, u32 size) const
{
m_bound_range = { offset, size };
glBindBufferRange(static_cast<GLenum>(current_target()), index, id(), offset, size);
}
void buffer::bind_range(target target_, u32 index, u32 offset, u32 size) const
{
m_bound_range = { offset, size };
glBindBufferRange(static_cast<GLenum>(target_), index, id(), offset, size);
}