feat: Implement resource system Phase 2 - Concrete resource types
- 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
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
#include <gtest/gtest.h>
|
||||
#include <XCEngine/Resources/ResourceTypes.h>
|
||||
#include <XCEngine/Containers/String.h>
|
||||
|
||||
using namespace XCEngine::Resources;
|
||||
using namespace XCEngine::Containers;
|
||||
|
||||
namespace {
|
||||
|
||||
@@ -26,7 +28,7 @@ TEST(Resources_GUID, Generate_FromCString) {
|
||||
}
|
||||
|
||||
TEST(Resources_GUID, Generate_FromString) {
|
||||
Containers::String path = "models/player.fbx";
|
||||
String path = "models/player.fbx";
|
||||
ResourceGUID guid = ResourceGUID::Generate(path);
|
||||
EXPECT_TRUE(guid.IsValid());
|
||||
}
|
||||
@@ -40,9 +42,9 @@ TEST(Resources_GUID, Generate_DifferentPaths) {
|
||||
|
||||
TEST(Resources_GUID, ToString) {
|
||||
ResourceGUID guid(0x1234567890ABCDEF);
|
||||
Containers::String str = guid.ToString();
|
||||
String str = guid.ToString();
|
||||
|
||||
EXPECT_EQ(str.Size(), 16u);
|
||||
EXPECT_EQ(str.Length(), 16u);
|
||||
}
|
||||
|
||||
TEST(Resources_GUID, MakeResourceGUID_Helper) {
|
||||
|
||||
Reference in New Issue
Block a user