[Feat] (MG_State/SamplerState): Implement SamplerState.

This commit is contained in:
BZLZHH
2025-11-15 23:53:54 +08:00
parent c664815fee
commit 3809a9f52f
10 changed files with 315 additions and 104 deletions
@@ -0,0 +1,26 @@
#pragma once
#include "SamplerObject.h"
#include <MG_Util/Miscellany/IndexGenerator.h>
#include <Includes.h>
namespace MobileGL {
namespace MG_State {
namespace GLState {
class SamplerState {
public:
SamplerState();
Vector<Uint> GenerateNames(Uint number);
SharedPtr<SamplerObject> GetSamplerObject(Uint index);
SharedPtr<SamplerObject> CreateSamplerObject(Uint index);
void MarkSamplerObjectForDeletion(Uint index);
Bool ValidateName(Uint index) const;
Bool ValidateSamplerObject(Uint index) const;
private:
UnorderedMap<Uint, SharedPtr<SamplerObject>> m_samplerObjects;
IndexGenerator<Uint> m_indexGenerator;
};
} // namespace GLState
} // namespace MG_State
} // namespace MobileGL