mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-09-11 13:48:30 +09:00
[Improvement] (...): Optimize code.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user