mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2024-11-30 01:25:51 +00:00
Common: Add Unbind() to GL::StreamBuffer
This commit is contained in:
parent
60281eb67e
commit
f59e08b564
|
@ -17,6 +17,11 @@ void StreamBuffer::Bind()
|
||||||
glBindBuffer(m_target, m_buffer_id);
|
glBindBuffer(m_target, m_buffer_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void StreamBuffer::Unbind()
|
||||||
|
{
|
||||||
|
glBindBuffer(m_target, 0);
|
||||||
|
}
|
||||||
|
|
||||||
StreamBuffer::MappingResult StreamBuffer::Map(u32 alignment, u32 min_size)
|
StreamBuffer::MappingResult StreamBuffer::Map(u32 alignment, u32 min_size)
|
||||||
{
|
{
|
||||||
return MappingResult{static_cast<void*>(m_cpu_buffer.data()), 0, m_size / alignment};
|
return MappingResult{static_cast<void*>(m_cpu_buffer.data()), 0, m_size / alignment};
|
||||||
|
|
|
@ -17,6 +17,7 @@ public:
|
||||||
ALWAYS_INLINE u32 GetSize() const { return m_size; }
|
ALWAYS_INLINE u32 GetSize() const { return m_size; }
|
||||||
|
|
||||||
void Bind();
|
void Bind();
|
||||||
|
void Unbind();
|
||||||
|
|
||||||
struct MappingResult
|
struct MappingResult
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue