Compare commits

..

2 Commits

Author SHA1 Message Date
OusmBlueNinja
29fecdd0eb Update imgui.ini 2024-12-31 03:08:33 -06:00
OusmBlueNinja
768ff7d0d5 Trying to fix stuff 2024-12-31 03:01:59 -06:00
4 changed files with 191 additions and 177 deletions

View File

@ -74,28 +74,28 @@ Collapsed=0
DockId=0x00000016,0 DockId=0x00000016,0
[Window][Editor##EditorWindow] [Window][Editor##EditorWindow]
Pos=410,27 Pos=523,27
Size=1124,709 Size=1011,764
Collapsed=0 Collapsed=0
DockId=0x00000017,0 DockId=0x00000017,0
[Window][Performance##performance] [Window][Performance##performance]
Pos=8,761 Pos=8,761
Size=400,408 Size=513,408
Collapsed=0 Collapsed=0
DockId=0x0000001C,0 DockId=0x0000001C,0
[Window][Logger##logger] [Window][Logger##logger]
Pos=8,395 Pos=8,395
Size=400,364 Size=513,364
Collapsed=0 Collapsed=0
DockId=0x0000001A,0 DockId=0x0000001A,0
[Window][Lua Text Editor##LuaEditor] [Window][Lua Text Editor##LuaEditor]
Pos=410,738 Pos=523,793
Size=1124,431 Size=503,376
Collapsed=0 Collapsed=0
DockId=0x00000018,0 DockId=0x0000001D,0
[Window][Scene Window@SceneWindow] [Window][Scene Window@SceneWindow]
Pos=8,27 Pos=8,27
@ -105,7 +105,7 @@ DockId=0x0000000F,0
[Window][Scene Window##SceneWindow] [Window][Scene Window##SceneWindow]
Pos=8,27 Pos=8,27
Size=400,366 Size=513,366
Collapsed=0 Collapsed=0
DockId=0x00000019,0 DockId=0x00000019,0
@ -116,10 +116,10 @@ Collapsed=0
DockId=0x00000011,0 DockId=0x00000011,0
[Window][Profiler] [Window][Profiler]
Pos=410,738 Pos=1028,793
Size=1124,431 Size=506,376
Collapsed=0 Collapsed=0
DockId=0x00000018,1 DockId=0x0000001E,0
[Table][0xE9E836E4,4] [Table][0xE9E836E4,4]
Column 0 Weight=1.2999 Column 0 Weight=1.2999
@ -129,13 +129,13 @@ Column 3 Weight=1.0088
[Docking][Data] [Docking][Data]
DockSpace ID=0x14621557 Window=0x3DA2F1DE Pos=8,50 Size=1904,1142 Split=X Selected=0xF7365A5A DockSpace ID=0x14621557 Window=0x3DA2F1DE Pos=8,50 Size=1904,1142 Split=X Selected=0xF7365A5A
DockNode ID=0x00000013 Parent=0x14621557 SizeRef=400,1142 Split=Y Selected=0x818D04BB DockNode ID=0x00000013 Parent=0x14621557 SizeRef=513,1142 Split=Y Selected=0x818D04BB
DockNode ID=0x0000001B Parent=0x00000013 SizeRef=264,456 Split=Y Selected=0x1D5D92B6 DockNode ID=0x0000001B Parent=0x00000013 SizeRef=264,456 Split=Y Selected=0x1D5D92B6
DockNode ID=0x00000019 Parent=0x0000001B SizeRef=264,366 HiddenTabBar=1 Selected=0x1D5D92B6 DockNode ID=0x00000019 Parent=0x0000001B SizeRef=264,366 HiddenTabBar=1 Selected=0x1D5D92B6
DockNode ID=0x0000001A Parent=0x0000001B SizeRef=264,364 HiddenTabBar=1 Selected=0x1C0788A1 DockNode ID=0x0000001A Parent=0x0000001B SizeRef=264,364 HiddenTabBar=1 Selected=0x1C0788A1
DockNode ID=0x0000001C Parent=0x00000013 SizeRef=264,254 HiddenTabBar=1 Selected=0x818D04BB DockNode ID=0x0000001C Parent=0x00000013 SizeRef=264,254 HiddenTabBar=1 Selected=0x818D04BB
DockNode ID=0x00000014 Parent=0x14621557 SizeRef=862,1142 Split=X DockNode ID=0x00000014 Parent=0x14621557 SizeRef=749,1142 Split=X
DockNode ID=0x00000015 Parent=0x00000014 SizeRef=484,1142 Split=X DockNode ID=0x00000015 Parent=0x00000014 SizeRef=371,1142 Split=X
DockNode ID=0x00000011 Parent=0x00000015 SizeRef=265,1142 Selected=0x1D5D92B6 DockNode ID=0x00000011 Parent=0x00000015 SizeRef=265,1142 Selected=0x1D5D92B6
DockNode ID=0x00000012 Parent=0x00000015 SizeRef=1259,1142 Split=X DockNode ID=0x00000012 Parent=0x00000015 SizeRef=1259,1142 Split=X
DockNode ID=0x00000009 Parent=0x00000012 SizeRef=364,1142 Split=Y Selected=0x3DC5AC3F DockNode ID=0x00000009 Parent=0x00000012 SizeRef=364,1142 Split=Y Selected=0x3DC5AC3F
@ -149,8 +149,10 @@ DockSpace ID=0x14621557 Window=0x3DA2F1DE Pos=8,50 Size=1904,1
DockNode ID=0x00000001 Parent=0x00000008 SizeRef=1202,1142 Split=Y Selected=0xDF0EC458 DockNode ID=0x00000001 Parent=0x00000008 SizeRef=1202,1142 Split=Y Selected=0xDF0EC458
DockNode ID=0x00000003 Parent=0x00000001 SizeRef=1202,849 Split=Y Selected=0xDF0EC458 DockNode ID=0x00000003 Parent=0x00000001 SizeRef=1202,849 Split=Y Selected=0xDF0EC458
DockNode ID=0x0000000D Parent=0x00000003 SizeRef=1202,571 Split=Y Selected=0xDFF75B3F DockNode ID=0x0000000D Parent=0x00000003 SizeRef=1202,571 Split=Y Selected=0xDFF75B3F
DockNode ID=0x00000017 Parent=0x0000000D SizeRef=1303,252 CentralNode=1 HiddenTabBar=1 Selected=0xDFF75B3F DockNode ID=0x00000017 Parent=0x0000000D SizeRef=1303,764 CentralNode=1 HiddenTabBar=1 Selected=0xDFF75B3F
DockNode ID=0x00000018 Parent=0x0000000D SizeRef=1303,431 Selected=0x7D9E6BA2 DockNode ID=0x00000018 Parent=0x0000000D SizeRef=1303,376 Split=X Selected=0x7D9E6BA2
DockNode ID=0x0000001D Parent=0x00000018 SizeRef=503,376 HiddenTabBar=1 Selected=0x7D9E6BA2
DockNode ID=0x0000001E Parent=0x00000018 SizeRef=506,376 HiddenTabBar=1 Selected=0x9B5D3198
DockNode ID=0x0000000E Parent=0x00000003 SizeRef=1202,569 Selected=0xE98146C5 DockNode ID=0x0000000E Parent=0x00000003 SizeRef=1202,569 Selected=0xE98146C5
DockNode ID=0x00000004 Parent=0x00000001 SizeRef=1202,291 Selected=0x9DD4E196 DockNode ID=0x00000004 Parent=0x00000001 SizeRef=1202,291 Selected=0x9DD4E196
DockNode ID=0x00000002 Parent=0x00000008 SizeRef=334,1142 HiddenTabBar=1 Selected=0x36DC96AB DockNode ID=0x00000002 Parent=0x00000008 SizeRef=334,1142 HiddenTabBar=1 Selected=0x36DC96AB

View File

@ -7,157 +7,158 @@ Entities:
Rotation: [0, -90, 0] Rotation: [0, -90, 0]
Scale: [1, 1, 1] Scale: [1, 1, 1]
Mesh: Mesh:
MeshPath: assets/models/sponza.obj
submeshes_len: 26
submeshes: submeshes:
- vao: 3 - vao: 2
indexCount: 43452 indexCount: 43452
textures:
- id: 30
type: texture_diffuse
path: textures/sponza_roof_diff.tga
- vao: 4
indexCount: 27552
textures:
- id: 31
type: texture_diffuse
path: textures/vase_dif.tga
- vao: 5
indexCount: 33024
textures:
- id: 21
type: texture_diffuse
path: textures/sponza_fabric_diff.tga
- vao: 6
indexCount: 54
textures: ~
- vao: 7
indexCount: 12258
textures:
- id: 11
type: texture_diffuse
path: textures/background.tga
- vao: 8
indexCount: 10416
textures:
- id: 12
type: texture_diffuse
path: textures/vase_plant.tga
- vao: 9
indexCount: 49536
textures:
- id: 23
type: texture_diffuse
path: textures/sponza_fabric_blue_diff.tga
- vao: 10
indexCount: 94308
textures:
- id: 29
type: texture_diffuse
path: textures/sponza_thorn_diff.tga
- vao: 11
indexCount: 49536
textures: textures:
- id: 24 - id: 24
type: texture_diffuse type: texture_diffuse
path: textures/sponza_fabric_green_diff.tga path: textures/sponza_roof_diff.tga
- vao: 12 - vao: 3
indexCount: 17628 indexCount: 27552
textures:
- id: 15
type: texture_diffuse
path: textures/sponza_ceiling_a_diff.tga
- vao: 13
indexCount: 30504
textures:
- id: 13
type: texture_diffuse
path: textures/sponza_arch_diff.tga
- vao: 14
indexCount: 53064
textures:
- id: 33
type: texture_diffuse
path: textures/vase_round.tga
- vao: 15
indexCount: 69624
textures:
- id: 18
type: texture_diffuse
path: textures/sponza_column_b_diff.tga
- vao: 16
indexCount: 2640
textures:
- id: 20
type: texture_diffuse
path: textures/sponza_details_diff.tga
- vao: 17
indexCount: 43008
textures:
- id: 26
type: texture_diffuse
path: textures/sponza_curtain_blue_diff.tga
- vao: 18
indexCount: 0
textures: ~
- vao: 19
indexCount: 2388
textures:
- id: 14
type: texture_diffuse
path: textures/spnza_bricks_a_diff.tga
- vao: 20
indexCount: 21264
textures:
- id: 19
type: texture_diffuse
path: textures/sponza_column_c_diff.tga
- vao: 21
indexCount: 63
textures:
- id: 28
type: texture_diffuse
path: textures/sponza_floor_a_diff.tga
- vao: 22
indexCount: 43008
textures: textures:
- id: 25 - id: 25
type: texture_diffuse type: texture_diffuse
path: textures/sponza_curtain_green_diff.tga path: textures/vase_dif.tga
- vao: 23 - vao: 4
indexCount: 9126 indexCount: 33024
textures: textures:
- id: 10 - id: 15
type: texture_diffuse type: texture_diffuse
path: textures/lion.tga path: textures/sponza_fabric_diff.tga
- vao: 24 - vao: 5
indexCount: 96 indexCount: 54
textures: ~
- vao: 6
indexCount: 12258
textures: textures:
- id: 16 - id: 5
type: texture_diffuse type: texture_diffuse
path: textures/chain_texture.tga path: textures/background.tga
- vao: 25 - vao: 7
indexCount: 56832 indexCount: 10416
textures: textures:
- id: 22 - id: 6
type: texture_diffuse type: texture_diffuse
path: textures/sponza_curtain_diff.tga path: textures/vase_plant.tga
- vao: 26 - vao: 8
indexCount: 8448 indexCount: 49536
textures: textures:
- id: 17 - id: 17
type: texture_diffuse type: texture_diffuse
path: textures/sponza_column_a_diff.tga path: textures/sponza_fabric_blue_diff.tga
- vao: 27 - vao: 9
indexCount: 49488 indexCount: 94308
textures:
- id: 23
type: texture_diffuse
path: textures/sponza_thorn_diff.tga
- vao: 10
indexCount: 49536
textures:
- id: 18
type: texture_diffuse
path: textures/sponza_fabric_green_diff.tga
- vao: 11
indexCount: 17628
textures:
- id: 9
type: texture_diffuse
path: textures/sponza_ceiling_a_diff.tga
- vao: 12
indexCount: 30504
textures:
- id: 7
type: texture_diffuse
path: textures/sponza_arch_diff.tga
- vao: 13
indexCount: 53064
textures: textures:
- id: 27 - id: 27
type: texture_diffuse
path: textures/vase_round.tga
- vao: 14
indexCount: 69624
textures:
- id: 12
type: texture_diffuse
path: textures/sponza_column_b_diff.tga
- vao: 15
indexCount: 2640
textures:
- id: 14
type: texture_diffuse
path: textures/sponza_details_diff.tga
- vao: 16
indexCount: 43008
textures:
- id: 20
type: texture_diffuse
path: textures/sponza_curtain_blue_diff.tga
- vao: 17
indexCount: 0
textures: ~
- vao: 18
indexCount: 2388
textures:
- id: 8
type: texture_diffuse
path: textures/spnza_bricks_a_diff.tga
- vao: 19
indexCount: 21264
textures:
- id: 13
type: texture_diffuse
path: textures/sponza_column_c_diff.tga
- vao: 20
indexCount: 63
textures:
- id: 22
type: texture_diffuse
path: textures/sponza_floor_a_diff.tga
- vao: 21
indexCount: 43008
textures:
- id: 19
type: texture_diffuse
path: textures/sponza_curtain_green_diff.tga
- vao: 22
indexCount: 9126
textures:
- id: 4
type: texture_diffuse
path: textures/lion.tga
- vao: 23
indexCount: 96
textures:
- id: 10
type: texture_diffuse
path: textures/chain_texture.tga
- vao: 24
indexCount: 56832
textures:
- id: 16
type: texture_diffuse
path: textures/sponza_curtain_diff.tga
- vao: 25
indexCount: 8448
textures:
- id: 11
type: texture_diffuse
path: textures/sponza_column_a_diff.tga
- vao: 26
indexCount: 49488
textures:
- id: 21
type: texture_diffuse type: texture_diffuse
path: textures/sponza_flagpole_diff.tga path: textures/sponza_flagpole_diff.tga
- vao: 28 - vao: 27
indexCount: 59484 indexCount: 59484
textures: textures:
- id: 32 - id: 26
type: texture_diffuse type: texture_diffuse
path: textures/vase_hanging.tga path: textures/vase_hanging.tga
MeshPath: assets/models/sponza.obj
ScriptComponent: ScriptComponent:
ScriptPath: assets/scripts/BouncingItem.lua ScriptPath: assets/scripts/BouncingItem.lua

View File

@ -4,8 +4,10 @@
#include "gcml.h" #include "gcml.h"
#include "../Engine/AssetManager.h" #include "../Engine/AssetManager.h"
#include "Windows/LoggerWindow.h"
extern AssetManager g_AssetManager; extern AssetManager g_AssetManager;
extern LoggerWindow *g_LoggerWindow;
const std::string MeshComponent::name = "Mesh"; const std::string MeshComponent::name = "Mesh";
@ -30,9 +32,7 @@ void MeshComponent::Update(float deltaTime)
return; return;
} }
void MeshComponent::Draw(Shader *shader)
void MeshComponent::Draw(Shader* shader)
{ {
for (auto &submesh : submeshes) for (auto &submesh : submeshes)
{ {
@ -40,14 +40,11 @@ void MeshComponent::Draw(Shader* shader)
} }
} }
YAML::Node MeshComponent::Serialize() YAML::Node MeshComponent::Serialize()
{ {
YAML::Node node; YAML::Node node;
// Serialize each submesh // Serialize each submesh
node["MeshPath"] = MeshPath;
YAML::Node submeshesNode; YAML::Node submeshesNode;
for (const auto &submesh : submeshes) for (const auto &submesh : submeshes)
{ {
@ -69,14 +66,20 @@ YAML::Node MeshComponent::Serialize()
submeshesNode.push_back(submeshNode); submeshesNode.push_back(submeshNode);
} }
node["MeshPath"] = MeshPath;
node["submeshes_len"] = submeshes.size();
node["submeshes"] = submeshesNode; node["submeshes"] = submeshesNode;
return node; return node;
} }
void MeshComponent::Deserialize(const YAML::Node &node) void MeshComponent::Deserialize(const YAML::Node &node)
{ {
int submeshes_len = 0;
if (node["submeshes_len"])
{
submeshes_len = node["submeshes_len"].as<int>();
}
if (node["MeshPath"]) if (node["MeshPath"])
{ {
MeshPath = node["MeshPath"].as<std::string>(); MeshPath = node["MeshPath"].as<std::string>();
@ -93,6 +96,11 @@ void MeshComponent::Deserialize(const YAML::Node &node)
DEBUG_PRINT("Model loaded successfully with %zu submeshes.", model->submeshes.size()); DEBUG_PRINT("Model loaded successfully with %zu submeshes.", model->submeshes.size());
if (submeshes_len != static_cast<int>(model->submeshes.size()))
{
g_LoggerWindow->AddLog("[Mesh] Size Mismatch [%d:%d]: Check for Curupted Scene Files", submeshes_len, static_cast<int>(submeshes.size()));
}
// Assign submeshes // Assign submeshes
submeshes = std::move(model->submeshes); submeshes = std::move(model->submeshes);
} }
@ -128,9 +136,12 @@ void MeshComponent::Deserialize(const YAML::Node &node)
} }
} }
submeshes.push_back(std::move(submesh)); submeshes.push_back(std::move(submesh));
} }
if (submeshes_len != static_cast<int>(submeshes.size()))
{
g_LoggerWindow->AddLog("[Mesh] Size Mismatch [%d:%d]: Check for Curupted Scene Files", submeshes_len, static_cast<int>(submeshes.size()));
}
} }
} }
} }

View File

@ -235,6 +235,6 @@ private:
std::unordered_map<std::string, AssetVariant> m_AssetMap; std::unordered_map<std::string, AssetVariant> m_AssetMap;
AssetVariant loadAssetFromDisk(AssetType type, const std::string &path); AssetVariant loadAssetFromDisk(AssetType type, const std::string &path);
// Generate the unique key // Generate the Key for each file
std::string generateKey(AssetType type, const std::string &path); std::string generateKey(AssetType type, const std::string &path);
}; };