- 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
26 lines
782 B
C++
26 lines
782 B
C++
#pragma once
|
|
|
|
#include "IResourceLoader.h"
|
|
#include "Material.h"
|
|
|
|
namespace XCEngine {
|
|
namespace Resources {
|
|
|
|
class MaterialLoader : public IResourceLoader {
|
|
public:
|
|
MaterialLoader();
|
|
virtual ~MaterialLoader() override;
|
|
|
|
ResourceType GetResourceType() const override { return ResourceType::Material; }
|
|
Containers::Array<Containers::String> GetSupportedExtensions() const override;
|
|
bool CanLoad(const Containers::String& path) const override;
|
|
LoadResult Load(const Containers::String& path, const ImportSettings* settings = nullptr) override;
|
|
ImportSettings* GetDefaultSettings() const override;
|
|
|
|
private:
|
|
bool ParseMaterialData(const Containers::Array<Core::uint8>& data, Material* material);
|
|
};
|
|
|
|
} // namespace Resources
|
|
} // namespace XCEngine
|