mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-09-08 04:08:32 +09:00
[Fix] (MG_State/Buffer): fix some typo
This commit is contained in:
@@ -71,8 +71,8 @@ namespace MobileGL {
|
||||
SizeT GetSize() const;
|
||||
BufferUsage GetUsage() const;
|
||||
Range1D GetDirtyRange() const;
|
||||
void* AquireMemory(Bool markMapped, Bool read, Bool write);
|
||||
void* AquireMemoryRange(Range1D range, BufferMappingAccessBit access);
|
||||
void* AcquireMemory(Bool markMapped, Bool read, Bool write);
|
||||
void* AcquireMemoryRange(Range1D range, BufferMappingAccessBit access);
|
||||
Bool IsMapped() const;
|
||||
|
||||
private:
|
||||
|
||||
@@ -8,10 +8,10 @@ namespace MobileGL {
|
||||
m_size = data.size;
|
||||
memcpy(m_data.data(), data.data, data.size);
|
||||
m_dirtyRange = MakeUnique<Range1D>(0, m_size);
|
||||
m_dirtyRange->Extend(0, m_size);
|
||||
m_dirtyRange->UnionUpdate(0, m_size);
|
||||
}
|
||||
|
||||
void* BufferObject::AquireMemory(Bool markMapped, Bool read, Bool write) {
|
||||
void* BufferObject::AcquireMemory(Bool markMapped, Bool read, Bool write) {
|
||||
if (markMapped) {
|
||||
m_isMapped = true;
|
||||
m_mappingAccess = (read ? BufferMappingAccessBit::Read : BufferMappingAccessBit::Null) |
|
||||
@@ -20,7 +20,7 @@ namespace MobileGL {
|
||||
return m_data.data();
|
||||
}
|
||||
|
||||
void* BufferObject::AquireMemoryRange(Range1D range, BufferMappingAccessBit access) {
|
||||
void* BufferObject::AcquireMemoryRange(Range1D range, BufferMappingAccessBit access) {
|
||||
m_isMapped = true;
|
||||
m_mappingAccess = access;
|
||||
return m_data.data() + range.start;
|
||||
|
||||
@@ -84,7 +84,7 @@ namespace MobileGL {
|
||||
}
|
||||
}
|
||||
|
||||
void Extend(SizeT newStart, SizeT newEnd) {
|
||||
void UnionUpdate(SizeT newStart, SizeT newEnd) {
|
||||
if (newStart < minStart || newEnd > maxEnd) {
|
||||
throw RuntimeError("Range exceeds bounds");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user