- Add Material class with shader/texture bindings and property system - Add MaterialLoader for .mat/.json format - Add Shader class (Vertex/Fragment/Geometry/Compute) - Add ShaderLoader for .vert/.frag/.glsl/.hlsl - Add AudioClip class (WAV/OGG/MP3/FLAC support) - Add AudioLoader for audio files - Add Texture/Mesh classes and loaders (from design doc) - Fix HashMap iterator and String API usage - Fix Mutex compatibility with std::lock_guard - Update CMakeLists.txt with new resource files - All tests pass: 11 Resources + 51 Containers
27 lines
513 B
C++
27 lines
513 B
C++
#pragma once
|
|
|
|
#include <mutex>
|
|
|
|
namespace XCEngine {
|
|
namespace Threading {
|
|
|
|
class Mutex {
|
|
public:
|
|
Mutex() = default;
|
|
~Mutex() = default;
|
|
|
|
void Lock() { m_mutex.lock(); }
|
|
void Unlock() { m_mutex.unlock(); }
|
|
bool TryLock() { return m_mutex.try_lock(); }
|
|
|
|
void lock() const { m_mutex.lock(); }
|
|
void unlock() const { m_mutex.unlock(); }
|
|
bool try_lock() const { return m_mutex.try_lock(); }
|
|
|
|
private:
|
|
mutable std::mutex m_mutex;
|
|
};
|
|
|
|
} // namespace Threading
|
|
} // namespace XCEngine
|