[Fix] (MG_State/Buffer): fix some typo

This commit is contained in:
2025-07-17 22:46:16 +08:00
parent 5c1b0a8f10
commit 3f0a99d272
3 changed files with 6 additions and 6 deletions
@@ -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;
+1 -1
View File
@@ -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");
}