Compare commits
No commits in common. "29fecdd0ebd0cb2fbe7985b6ca690e0cf469f43d" and "17445e04afd198e61869e54a7b182847d54b7da0" have entirely different histories.
29fecdd0eb
...
17445e04af
84
imgui.ini
84
imgui.ini
@ -74,28 +74,28 @@ Collapsed=0
|
|||||||
DockId=0x00000016,0
|
DockId=0x00000016,0
|
||||||
|
|
||||||
[Window][Editor##EditorWindow]
|
[Window][Editor##EditorWindow]
|
||||||
Pos=523,27
|
Pos=410,27
|
||||||
Size=1011,764
|
Size=1124,709
|
||||||
Collapsed=0
|
Collapsed=0
|
||||||
DockId=0x00000017,0
|
DockId=0x00000017,0
|
||||||
|
|
||||||
[Window][Performance##performance]
|
[Window][Performance##performance]
|
||||||
Pos=8,761
|
Pos=8,761
|
||||||
Size=513,408
|
Size=400,408
|
||||||
Collapsed=0
|
Collapsed=0
|
||||||
DockId=0x0000001C,0
|
DockId=0x0000001C,0
|
||||||
|
|
||||||
[Window][Logger##logger]
|
[Window][Logger##logger]
|
||||||
Pos=8,395
|
Pos=8,395
|
||||||
Size=513,364
|
Size=400,364
|
||||||
Collapsed=0
|
Collapsed=0
|
||||||
DockId=0x0000001A,0
|
DockId=0x0000001A,0
|
||||||
|
|
||||||
[Window][Lua Text Editor##LuaEditor]
|
[Window][Lua Text Editor##LuaEditor]
|
||||||
Pos=523,793
|
Pos=410,738
|
||||||
Size=503,376
|
Size=1124,431
|
||||||
Collapsed=0
|
Collapsed=0
|
||||||
DockId=0x0000001D,0
|
DockId=0x00000018,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=513,366
|
Size=400,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=1028,793
|
Pos=410,738
|
||||||
Size=506,376
|
Size=1124,431
|
||||||
Collapsed=0
|
Collapsed=0
|
||||||
DockId=0x0000001E,0
|
DockId=0x00000018,1
|
||||||
|
|
||||||
[Table][0xE9E836E4,4]
|
[Table][0xE9E836E4,4]
|
||||||
Column 0 Weight=1.2999
|
Column 0 Weight=1.2999
|
||||||
@ -128,36 +128,34 @@ Column 2 Weight=0.6474
|
|||||||
Column 3 Weight=1.0088
|
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=513,1142 Split=Y Selected=0x818D04BB
|
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=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=749,1142 Split=X
|
DockNode ID=0x00000014 Parent=0x14621557 SizeRef=862,1142 Split=X
|
||||||
DockNode ID=0x00000015 Parent=0x00000014 SizeRef=371,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=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
|
||||||
DockNode ID=0x00000005 Parent=0x00000009 SizeRef=364,745 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=0x0000000B Parent=0x00000005 SizeRef=364,452 HiddenTabBar=1 Selected=0x3DC5AC3F
|
||||||
DockNode ID=0x0000000C Parent=0x00000005 SizeRef=364,291 Selected=0xAE3C694A
|
DockNode ID=0x0000000C Parent=0x00000005 SizeRef=364,291 Selected=0xAE3C694A
|
||||||
DockNode ID=0x00000006 Parent=0x00000009 SizeRef=364,395 HiddenTabBar=1 Selected=0x726D8899
|
DockNode ID=0x00000006 Parent=0x00000009 SizeRef=364,395 HiddenTabBar=1 Selected=0x726D8899
|
||||||
DockNode ID=0x0000000A Parent=0x00000012 SizeRef=1538,1142 Split=X
|
DockNode ID=0x0000000A Parent=0x00000012 SizeRef=1538,1142 Split=X
|
||||||
DockNode ID=0x00000007 Parent=0x0000000A SizeRef=357,1142 Selected=0x7737E8B2
|
DockNode ID=0x00000007 Parent=0x0000000A SizeRef=357,1142 Selected=0x7737E8B2
|
||||||
DockNode ID=0x00000008 Parent=0x0000000A SizeRef=1545,1142 Split=X
|
DockNode ID=0x00000008 Parent=0x0000000A SizeRef=1545,1142 Split=X
|
||||||
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,764 CentralNode=1 HiddenTabBar=1 Selected=0xDFF75B3F
|
DockNode ID=0x00000017 Parent=0x0000000D SizeRef=1303,252 CentralNode=1 HiddenTabBar=1 Selected=0xDFF75B3F
|
||||||
DockNode ID=0x00000018 Parent=0x0000000D SizeRef=1303,376 Split=X Selected=0x7D9E6BA2
|
DockNode ID=0x00000018 Parent=0x0000000D SizeRef=1303,431 Selected=0x7D9E6BA2
|
||||||
DockNode ID=0x0000001D Parent=0x00000018 SizeRef=503,376 HiddenTabBar=1 Selected=0x7D9E6BA2
|
DockNode ID=0x0000000E Parent=0x00000003 SizeRef=1202,569 Selected=0xE98146C5
|
||||||
DockNode ID=0x0000001E Parent=0x00000018 SizeRef=506,376 HiddenTabBar=1 Selected=0x9B5D3198
|
DockNode ID=0x00000004 Parent=0x00000001 SizeRef=1202,291 Selected=0x9DD4E196
|
||||||
DockNode ID=0x0000000E Parent=0x00000003 SizeRef=1202,569 Selected=0xE98146C5
|
DockNode ID=0x00000002 Parent=0x00000008 SizeRef=334,1142 HiddenTabBar=1 Selected=0x36DC96AB
|
||||||
DockNode ID=0x00000004 Parent=0x00000001 SizeRef=1202,291 Selected=0x9DD4E196
|
DockNode ID=0x00000016 Parent=0x00000014 SizeRef=376,1142 HiddenTabBar=1 Selected=0x8D0E8380
|
||||||
DockNode ID=0x00000002 Parent=0x00000008 SizeRef=334,1142 HiddenTabBar=1 Selected=0x36DC96AB
|
DockSpace ID=0xC6145A92 Pos=8,27 Size=1904,1142 Split=X
|
||||||
DockNode ID=0x00000016 Parent=0x00000014 SizeRef=376,1142 HiddenTabBar=1 Selected=0x8D0E8380
|
DockNode ID=0x0000000F Parent=0xC6145A92 SizeRef=301,1142 Selected=0xA8433A03
|
||||||
DockSpace ID=0xC6145A92 Pos=8,27 Size=1904,1142 Split=X
|
DockNode ID=0x00000010 Parent=0xC6145A92 SizeRef=1601,1142 CentralNode=1
|
||||||
DockNode ID=0x0000000F Parent=0xC6145A92 SizeRef=301,1142 Selected=0xA8433A03
|
|
||||||
DockNode ID=0x00000010 Parent=0xC6145A92 SizeRef=1601,1142 CentralNode=1
|
|
||||||
|
|
||||||
|
@ -7,158 +7,157 @@ 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: 2
|
- vao: 3
|
||||||
indexCount: 43452
|
indexCount: 43452
|
||||||
textures:
|
textures:
|
||||||
- id: 24
|
- id: 30
|
||||||
type: texture_diffuse
|
type: texture_diffuse
|
||||||
path: textures/sponza_roof_diff.tga
|
path: textures/sponza_roof_diff.tga
|
||||||
- vao: 3
|
- vao: 4
|
||||||
indexCount: 27552
|
indexCount: 27552
|
||||||
textures:
|
textures:
|
||||||
- id: 25
|
- id: 31
|
||||||
type: texture_diffuse
|
type: texture_diffuse
|
||||||
path: textures/vase_dif.tga
|
path: textures/vase_dif.tga
|
||||||
- vao: 4
|
|
||||||
indexCount: 33024
|
|
||||||
textures:
|
|
||||||
- id: 15
|
|
||||||
type: texture_diffuse
|
|
||||||
path: textures/sponza_fabric_diff.tga
|
|
||||||
- vao: 5
|
- vao: 5
|
||||||
indexCount: 54
|
indexCount: 33024
|
||||||
textures: ~
|
|
||||||
- vao: 6
|
|
||||||
indexCount: 12258
|
|
||||||
textures:
|
|
||||||
- id: 5
|
|
||||||
type: texture_diffuse
|
|
||||||
path: textures/background.tga
|
|
||||||
- vao: 7
|
|
||||||
indexCount: 10416
|
|
||||||
textures:
|
|
||||||
- id: 6
|
|
||||||
type: texture_diffuse
|
|
||||||
path: textures/vase_plant.tga
|
|
||||||
- vao: 8
|
|
||||||
indexCount: 49536
|
|
||||||
textures:
|
|
||||||
- id: 17
|
|
||||||
type: texture_diffuse
|
|
||||||
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:
|
textures:
|
||||||
- id: 21
|
- id: 21
|
||||||
type: texture_diffuse
|
type: texture_diffuse
|
||||||
path: textures/sponza_flagpole_diff.tga
|
path: textures/sponza_fabric_diff.tga
|
||||||
- vao: 27
|
- vao: 6
|
||||||
indexCount: 59484
|
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:
|
textures:
|
||||||
- id: 26
|
- 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:
|
||||||
|
- id: 25
|
||||||
|
type: texture_diffuse
|
||||||
|
path: textures/sponza_curtain_green_diff.tga
|
||||||
|
- vao: 23
|
||||||
|
indexCount: 9126
|
||||||
|
textures:
|
||||||
|
- id: 10
|
||||||
|
type: texture_diffuse
|
||||||
|
path: textures/lion.tga
|
||||||
|
- vao: 24
|
||||||
|
indexCount: 96
|
||||||
|
textures:
|
||||||
|
- id: 16
|
||||||
|
type: texture_diffuse
|
||||||
|
path: textures/chain_texture.tga
|
||||||
|
- vao: 25
|
||||||
|
indexCount: 56832
|
||||||
|
textures:
|
||||||
|
- id: 22
|
||||||
|
type: texture_diffuse
|
||||||
|
path: textures/sponza_curtain_diff.tga
|
||||||
|
- vao: 26
|
||||||
|
indexCount: 8448
|
||||||
|
textures:
|
||||||
|
- id: 17
|
||||||
|
type: texture_diffuse
|
||||||
|
path: textures/sponza_column_a_diff.tga
|
||||||
|
- vao: 27
|
||||||
|
indexCount: 49488
|
||||||
|
textures:
|
||||||
|
- id: 27
|
||||||
|
type: texture_diffuse
|
||||||
|
path: textures/sponza_flagpole_diff.tga
|
||||||
|
- vao: 28
|
||||||
|
indexCount: 59484
|
||||||
|
textures:
|
||||||
|
- id: 32
|
||||||
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
|
@ -4,10 +4,8 @@
|
|||||||
#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";
|
||||||
|
|
||||||
@ -32,7 +30,9 @@ 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,11 +40,14 @@ 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)
|
||||||
{
|
{
|
||||||
@ -66,20 +69,14 @@ 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>();
|
||||||
@ -96,11 +93,6 @@ 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);
|
||||||
}
|
}
|
||||||
@ -136,12 +128,9 @@ 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()));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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 Key for each file
|
// Generate the unique key
|
||||||
std::string generateKey(AssetType type, const std::string &path);
|
std::string generateKey(AssetType type, const std::string &path);
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user