[Improvement] (...): Optimize code.

This commit is contained in:
BZLZHH
2025-08-10 23:18:01 +08:00
parent 0b13cb5714
commit 253e14f2c9
27 changed files with 72 additions and 72 deletions
@@ -82,7 +82,7 @@ namespace MobileGL {
Range1D m_dirtyRange;
Range1D m_mappedRange;
std::vector<Uint8> m_stagingData;
bool m_ownsStagingData;
Bool m_ownsStagingData;
};
} // namespace GLState
} // namespace MG_State
@@ -53,11 +53,11 @@ namespace MobileGL {
}
}
bool BufferState::ValidateName(Uint index) const {
Bool BufferState::ValidateName(Uint index) const {
return m_indexGenerator.IsValid(index);
}
bool BufferState::ValidateBufferObject(Uint index) const {
Bool BufferState::ValidateBufferObject(Uint index) const {
return m_bufferObjects.find(index) != m_bufferObjects.end();
}
} // namespace GLState
@@ -1,7 +1,7 @@
#pragma once
#include <Includes.h>
#include "BufferObject.h"
#include <MG_Util/Miscellany/IndexGenerator.h>
#include "BufferObject.h"
namespace MobileGL {
namespace MG_State {
@@ -21,8 +21,8 @@ namespace MobileGL {
SharedPtr<BufferObject> CreateBufferObject(Uint index);
BindingSlot<BufferObject>& GetBindingSlot(BufferTarget target);
void MarkBufferObjectForDeletion(Uint index);
bool ValidateName(Uint index) const;
bool ValidateBufferObject(Uint index) const;
Bool ValidateName(Uint index) const;
Bool ValidateBufferObject(Uint index) const;
private:
UnorderedMap<Uint, SharedPtr<BufferObject>> m_bufferObjects;