Compare commits
2 Commits
17445e04af
...
29fecdd0eb
Author | SHA1 | Date | |
---|---|---|---|
|
29fecdd0eb | ||
|
768ff7d0d5 |
84
imgui.ini
84
imgui.ini
@ -74,28 +74,28 @@ Collapsed=0
|
||||
DockId=0x00000016,0
|
||||
|
||||
[Window][Editor##EditorWindow]
|
||||
Pos=410,27
|
||||
Size=1124,709
|
||||
Pos=523,27
|
||||
Size=1011,764
|
||||
Collapsed=0
|
||||
DockId=0x00000017,0
|
||||
|
||||
[Window][Performance##performance]
|
||||
Pos=8,761
|
||||
Size=400,408
|
||||
Size=513,408
|
||||
Collapsed=0
|
||||
DockId=0x0000001C,0
|
||||
|
||||
[Window][Logger##logger]
|
||||
Pos=8,395
|
||||
Size=400,364
|
||||
Size=513,364
|
||||
Collapsed=0
|
||||
DockId=0x0000001A,0
|
||||
|
||||
[Window][Lua Text Editor##LuaEditor]
|
||||
Pos=410,738
|
||||
Size=1124,431
|
||||
Pos=523,793
|
||||
Size=503,376
|
||||
Collapsed=0
|
||||
DockId=0x00000018,0
|
||||
DockId=0x0000001D,0
|
||||
|
||||
[Window][Scene Window@SceneWindow]
|
||||
Pos=8,27
|
||||
@ -105,7 +105,7 @@ DockId=0x0000000F,0
|
||||
|
||||
[Window][Scene Window##SceneWindow]
|
||||
Pos=8,27
|
||||
Size=400,366
|
||||
Size=513,366
|
||||
Collapsed=0
|
||||
DockId=0x00000019,0
|
||||
|
||||
@ -116,10 +116,10 @@ Collapsed=0
|
||||
DockId=0x00000011,0
|
||||
|
||||
[Window][Profiler]
|
||||
Pos=410,738
|
||||
Size=1124,431
|
||||
Pos=1028,793
|
||||
Size=506,376
|
||||
Collapsed=0
|
||||
DockId=0x00000018,1
|
||||
DockId=0x0000001E,0
|
||||
|
||||
[Table][0xE9E836E4,4]
|
||||
Column 0 Weight=1.2999
|
||||
@ -128,34 +128,36 @@ Column 2 Weight=0.6474
|
||||
Column 3 Weight=1.0088
|
||||
|
||||
[Docking][Data]
|
||||
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=0x0000001B Parent=0x00000013 SizeRef=264,456 Split=Y 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=0x0000001C Parent=0x00000013 SizeRef=264,254 HiddenTabBar=1 Selected=0x818D04BB
|
||||
DockNode ID=0x00000014 Parent=0x14621557 SizeRef=862,1142 Split=X
|
||||
DockNode ID=0x00000015 Parent=0x00000014 SizeRef=484,1142 Split=X
|
||||
DockNode ID=0x00000011 Parent=0x00000015 SizeRef=265,1142 Selected=0x1D5D92B6
|
||||
DockNode ID=0x00000012 Parent=0x00000015 SizeRef=1259,1142 Split=X
|
||||
DockNode ID=0x00000009 Parent=0x00000012 SizeRef=364,1142 Split=Y Selected=0x3DC5AC3F
|
||||
DockNode ID=0x00000005 Parent=0x00000009 SizeRef=364,745 Split=Y Selected=0x3DC5AC3F
|
||||
DockNode ID=0x0000000B Parent=0x00000005 SizeRef=364,452 HiddenTabBar=1 Selected=0x3DC5AC3F
|
||||
DockNode ID=0x0000000C Parent=0x00000005 SizeRef=364,291 Selected=0xAE3C694A
|
||||
DockNode ID=0x00000006 Parent=0x00000009 SizeRef=364,395 HiddenTabBar=1 Selected=0x726D8899
|
||||
DockNode ID=0x0000000A Parent=0x00000012 SizeRef=1538,1142 Split=X
|
||||
DockNode ID=0x00000007 Parent=0x0000000A SizeRef=357,1142 Selected=0x7737E8B2
|
||||
DockNode ID=0x00000008 Parent=0x0000000A SizeRef=1545,1142 Split=X
|
||||
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=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=0x00000018 Parent=0x0000000D SizeRef=1303,431 Selected=0x7D9E6BA2
|
||||
DockNode ID=0x0000000E Parent=0x00000003 SizeRef=1202,569 Selected=0xE98146C5
|
||||
DockNode ID=0x00000004 Parent=0x00000001 SizeRef=1202,291 Selected=0x9DD4E196
|
||||
DockNode ID=0x00000002 Parent=0x00000008 SizeRef=334,1142 HiddenTabBar=1 Selected=0x36DC96AB
|
||||
DockNode ID=0x00000016 Parent=0x00000014 SizeRef=376,1142 HiddenTabBar=1 Selected=0x8D0E8380
|
||||
DockSpace ID=0xC6145A92 Pos=8,27 Size=1904,1142 Split=X
|
||||
DockNode ID=0x0000000F Parent=0xC6145A92 SizeRef=301,1142 Selected=0xA8433A03
|
||||
DockNode ID=0x00000010 Parent=0xC6145A92 SizeRef=1601,1142 CentralNode=1
|
||||
DockSpace ID=0x14621557 Window=0x3DA2F1DE Pos=8,50 Size=1904,1142 Split=X Selected=0xF7365A5A
|
||||
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=0x00000019 Parent=0x0000001B SizeRef=264,366 HiddenTabBar=1 Selected=0x1D5D92B6
|
||||
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=0x00000014 Parent=0x14621557 SizeRef=749,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=0x00000012 Parent=0x00000015 SizeRef=1259,1142 Split=X
|
||||
DockNode ID=0x00000009 Parent=0x00000012 SizeRef=364,1142 Split=Y Selected=0x3DC5AC3F
|
||||
DockNode ID=0x00000005 Parent=0x00000009 SizeRef=364,745 Split=Y Selected=0x3DC5AC3F
|
||||
DockNode ID=0x0000000B Parent=0x00000005 SizeRef=364,452 HiddenTabBar=1 Selected=0x3DC5AC3F
|
||||
DockNode ID=0x0000000C Parent=0x00000005 SizeRef=364,291 Selected=0xAE3C694A
|
||||
DockNode ID=0x00000006 Parent=0x00000009 SizeRef=364,395 HiddenTabBar=1 Selected=0x726D8899
|
||||
DockNode ID=0x0000000A Parent=0x00000012 SizeRef=1538,1142 Split=X
|
||||
DockNode ID=0x00000007 Parent=0x0000000A SizeRef=357,1142 Selected=0x7737E8B2
|
||||
DockNode ID=0x00000008 Parent=0x0000000A SizeRef=1545,1142 Split=X
|
||||
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=0x0000000D Parent=0x00000003 SizeRef=1202,571 Split=Y Selected=0xDFF75B3F
|
||||
DockNode ID=0x00000017 Parent=0x0000000D SizeRef=1303,764 CentralNode=1 HiddenTabBar=1 Selected=0xDFF75B3F
|
||||
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=0x00000004 Parent=0x00000001 SizeRef=1202,291 Selected=0x9DD4E196
|
||||
DockNode ID=0x00000002 Parent=0x00000008 SizeRef=334,1142 HiddenTabBar=1 Selected=0x36DC96AB
|
||||
DockNode ID=0x00000016 Parent=0x00000014 SizeRef=376,1142 HiddenTabBar=1 Selected=0x8D0E8380
|
||||
DockSpace ID=0xC6145A92 Pos=8,27 Size=1904,1142 Split=X
|
||||
DockNode ID=0x0000000F Parent=0xC6145A92 SizeRef=301,1142 Selected=0xA8433A03
|
||||
DockNode ID=0x00000010 Parent=0xC6145A92 SizeRef=1601,1142 CentralNode=1
|
||||
|
||||
|
@ -7,157 +7,158 @@ Entities:
|
||||
Rotation: [0, -90, 0]
|
||||
Scale: [1, 1, 1]
|
||||
Mesh:
|
||||
MeshPath: assets/models/sponza.obj
|
||||
submeshes_len: 26
|
||||
submeshes:
|
||||
- vao: 3
|
||||
- vao: 2
|
||||
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:
|
||||
- id: 24
|
||||
type: texture_diffuse
|
||||
path: textures/sponza_fabric_green_diff.tga
|
||||
- vao: 12
|
||||
indexCount: 17628
|
||||
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
|
||||
path: textures/sponza_roof_diff.tga
|
||||
- vao: 3
|
||||
indexCount: 27552
|
||||
textures:
|
||||
- id: 25
|
||||
type: texture_diffuse
|
||||
path: textures/sponza_curtain_green_diff.tga
|
||||
- vao: 23
|
||||
indexCount: 9126
|
||||
path: textures/vase_dif.tga
|
||||
- vao: 4
|
||||
indexCount: 33024
|
||||
textures:
|
||||
- id: 10
|
||||
- id: 15
|
||||
type: texture_diffuse
|
||||
path: textures/lion.tga
|
||||
- vao: 24
|
||||
indexCount: 96
|
||||
path: textures/sponza_fabric_diff.tga
|
||||
- vao: 5
|
||||
indexCount: 54
|
||||
textures: ~
|
||||
- vao: 6
|
||||
indexCount: 12258
|
||||
textures:
|
||||
- id: 16
|
||||
- id: 5
|
||||
type: texture_diffuse
|
||||
path: textures/chain_texture.tga
|
||||
- vao: 25
|
||||
indexCount: 56832
|
||||
path: textures/background.tga
|
||||
- vao: 7
|
||||
indexCount: 10416
|
||||
textures:
|
||||
- id: 22
|
||||
- id: 6
|
||||
type: texture_diffuse
|
||||
path: textures/sponza_curtain_diff.tga
|
||||
- vao: 26
|
||||
indexCount: 8448
|
||||
path: textures/vase_plant.tga
|
||||
- vao: 8
|
||||
indexCount: 49536
|
||||
textures:
|
||||
- id: 17
|
||||
type: texture_diffuse
|
||||
path: textures/sponza_column_a_diff.tga
|
||||
- vao: 27
|
||||
indexCount: 49488
|
||||
path: textures/sponza_fabric_blue_diff.tga
|
||||
- vao: 9
|
||||
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:
|
||||
- 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
|
||||
path: textures/sponza_flagpole_diff.tga
|
||||
- vao: 28
|
||||
- vao: 27
|
||||
indexCount: 59484
|
||||
textures:
|
||||
- id: 32
|
||||
- id: 26
|
||||
type: texture_diffuse
|
||||
path: textures/vase_hanging.tga
|
||||
MeshPath: assets/models/sponza.obj
|
||||
ScriptComponent:
|
||||
ScriptPath: assets/scripts/BouncingItem.lua
|
@ -4,8 +4,10 @@
|
||||
#include "gcml.h"
|
||||
|
||||
#include "../Engine/AssetManager.h"
|
||||
#include "Windows/LoggerWindow.h"
|
||||
|
||||
extern AssetManager g_AssetManager;
|
||||
extern LoggerWindow *g_LoggerWindow;
|
||||
|
||||
const std::string MeshComponent::name = "Mesh";
|
||||
|
||||
@ -30,9 +32,7 @@ void MeshComponent::Update(float deltaTime)
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void MeshComponent::Draw(Shader* shader)
|
||||
void MeshComponent::Draw(Shader *shader)
|
||||
{
|
||||
for (auto &submesh : submeshes)
|
||||
{
|
||||
@ -40,14 +40,11 @@ void MeshComponent::Draw(Shader* shader)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
YAML::Node MeshComponent::Serialize()
|
||||
{
|
||||
YAML::Node node;
|
||||
|
||||
// Serialize each submesh
|
||||
node["MeshPath"] = MeshPath;
|
||||
|
||||
YAML::Node submeshesNode;
|
||||
for (const auto &submesh : submeshes)
|
||||
{
|
||||
@ -69,14 +66,20 @@ YAML::Node MeshComponent::Serialize()
|
||||
|
||||
submeshesNode.push_back(submeshNode);
|
||||
}
|
||||
node["MeshPath"] = MeshPath;
|
||||
node["submeshes_len"] = submeshes.size();
|
||||
node["submeshes"] = submeshesNode;
|
||||
|
||||
|
||||
return 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"])
|
||||
{
|
||||
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());
|
||||
|
||||
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
|
||||
submeshes = std::move(model->submeshes);
|
||||
}
|
||||
@ -128,9 +136,12 @@ void MeshComponent::Deserialize(const YAML::Node &node)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
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()));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -235,6 +235,6 @@ private:
|
||||
std::unordered_map<std::string, AssetVariant> m_AssetMap;
|
||||
|
||||
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);
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user