forgoted
This commit is contained in:
parent
9e33e61ed0
commit
421cb639b9
3
.vscode/settings.json
vendored
3
.vscode/settings.json
vendored
@ -79,6 +79,7 @@
|
||||
"*.inc": "cpp",
|
||||
"future": "cpp",
|
||||
"any": "cpp",
|
||||
"ranges": "cpp"
|
||||
"ranges": "cpp",
|
||||
"unordered_set": "cpp"
|
||||
}
|
||||
}
|
42
imgui.ini
42
imgui.ini
@ -10,24 +10,24 @@ Collapsed=1
|
||||
|
||||
[Window][WindowOverViewport_11111111]
|
||||
Pos=0,19
|
||||
Size=1920,1158
|
||||
Size=1280,701
|
||||
Collapsed=0
|
||||
|
||||
[Window][Inspector]
|
||||
Pos=0,683
|
||||
Size=342,494
|
||||
Pos=0,421
|
||||
Size=342,299
|
||||
Collapsed=0
|
||||
DockId=0x0000000A,0
|
||||
|
||||
[Window][Scene Tree]
|
||||
Pos=0,19
|
||||
Size=342,662
|
||||
Size=342,400
|
||||
Collapsed=0
|
||||
DockId=0x00000009,0
|
||||
|
||||
[Window][Viewport]
|
||||
Pos=344,19
|
||||
Size=1576,495
|
||||
Size=936,139
|
||||
Collapsed=0
|
||||
DockId=0x0000000B,0
|
||||
|
||||
@ -36,14 +36,14 @@ Size=1920,19
|
||||
Collapsed=0
|
||||
|
||||
[Window][Performance Info]
|
||||
Pos=1588,867
|
||||
Size=332,310
|
||||
Pos=1083,410
|
||||
Size=197,310
|
||||
Collapsed=0
|
||||
DockId=0x00000006,0
|
||||
|
||||
[Window][Console]
|
||||
Pos=344,867
|
||||
Size=612,310
|
||||
Pos=344,410
|
||||
Size=286,310
|
||||
Collapsed=0
|
||||
DockId=0x0000000D,0
|
||||
|
||||
@ -54,8 +54,8 @@ Collapsed=0
|
||||
DockId=0x0000000B,1
|
||||
|
||||
[Window][Profiler]
|
||||
Pos=344,516
|
||||
Size=1576,349
|
||||
Pos=344,160
|
||||
Size=936,248
|
||||
Collapsed=0
|
||||
DockId=0x0000000C,0
|
||||
|
||||
@ -78,29 +78,29 @@ Collapsed=0
|
||||
DockId=0x00000005,1
|
||||
|
||||
[Window][Color Correction]
|
||||
Pos=1588,867
|
||||
Size=332,310
|
||||
Pos=1083,410
|
||||
Size=197,310
|
||||
Collapsed=0
|
||||
DockId=0x00000006,1
|
||||
|
||||
[Window][Asset Browser]
|
||||
Pos=958,867
|
||||
Size=628,310
|
||||
Pos=632,410
|
||||
Size=449,310
|
||||
Collapsed=0
|
||||
DockId=0x0000000E,0
|
||||
|
||||
[Docking][Data]
|
||||
DockSpace ID=0x11111111 Window=0x1BBC0F80 Pos=0,19 Size=1920,1158 Split=X
|
||||
DockSpace ID=0x11111111 Window=0x1BBC0F80 Pos=0,19 Size=1280,701 Split=X
|
||||
DockNode ID=0x00000001 Parent=0x11111111 SizeRef=342,701 Split=Y Selected=0x12EF0F59
|
||||
DockNode ID=0x00000009 Parent=0x00000001 SizeRef=385,662 Selected=0x12EF0F59
|
||||
DockNode ID=0x0000000A Parent=0x00000001 SizeRef=385,494 HiddenTabBar=1 Selected=0x36DC96AB
|
||||
DockNode ID=0x00000002 Parent=0x11111111 SizeRef=1576,701 Split=Y Selected=0xC450F867
|
||||
DockNode ID=0x00000007 Parent=0x00000002 SizeRef=606,846 Split=Y Selected=0xC450F867
|
||||
DockNode ID=0x0000000B Parent=0x00000007 SizeRef=1576,495 CentralNode=1 HiddenTabBar=1 Selected=0xC450F867
|
||||
DockNode ID=0x0000000C Parent=0x00000007 SizeRef=1576,349 HiddenTabBar=1 Selected=0x9B5D3198
|
||||
DockNode ID=0x0000000B Parent=0x00000007 SizeRef=1576,596 CentralNode=1 HiddenTabBar=1 Selected=0xC450F867
|
||||
DockNode ID=0x0000000C Parent=0x00000007 SizeRef=1576,248 HiddenTabBar=1 Selected=0x9B5D3198
|
||||
DockNode ID=0x00000008 Parent=0x00000002 SizeRef=606,310 Split=X Selected=0x9B5D3198
|
||||
DockNode ID=0x00000005 Parent=0x00000008 SizeRef=1242,481 Split=X Selected=0x9B5D3198
|
||||
DockNode ID=0x0000000D Parent=0x00000005 SizeRef=612,248 HiddenTabBar=1 Selected=0xEA83D666
|
||||
DockNode ID=0x0000000E Parent=0x00000005 SizeRef=628,248 HiddenTabBar=1 Selected=0x36AF052B
|
||||
DockNode ID=0x00000006 Parent=0x00000008 SizeRef=332,481 Selected=0x3FC1A724
|
||||
DockNode ID=0x0000000D Parent=0x00000005 SizeRef=482,248 HiddenTabBar=1 Selected=0xEA83D666
|
||||
DockNode ID=0x0000000E Parent=0x00000005 SizeRef=758,248 HiddenTabBar=1 Selected=0x36AF052B
|
||||
DockNode ID=0x00000006 Parent=0x00000008 SizeRef=332,481 Selected=0xA873C17F
|
||||
|
||||
|
@ -1,3 +1,15 @@
|
||||
[COMPILE] g++ -std=c++20 -Wall -g -Isrc/include -Isrc/include/lua -Isrc/vendor -Isrc/vendor/imgui -Isrc/vendor/box2d -IC:/msys64/mingw64/include -Isrc\vendor\imgui -IC:\msys64\mingw64\lib\libyaml-cpp.a -MMD -MP -c src\src\Renderer.cpp -o src\build\Renderer.o
|
||||
[COMPILE] g++ -std=c++20 -Wall -g -Isrc/include -Isrc/include/lua -Isrc/vendor -Isrc/vendor/imgui -Isrc/vendor/box2d -IC:/msys64/mingw64/include -IC:\msys64\mingw64\lib\libyaml-cpp.a -Isrc\vendor\imgui -MMD -MP -c src\src\core\utils\Texture.cpp -o src\build\core\utils\Texture.o
|
||||
[COMPILE] g++ -std=c++20 -Wall -g -Isrc/include -Isrc/include/lua -Isrc/vendor -Isrc/vendor/imgui -Isrc/vendor/box2d -IC:/msys64/mingw64/include -IC:\msys64\mingw64\lib\libyaml-cpp.a -Isrc\vendor\imgui -MMD -MP -c src\src\editor\windows\AssetBrowser.cpp -o src\build\editor\windows\AssetBrowser.o
|
||||
[COMPILE] g++ -std=c++20 -Wall -g -Isrc/include -Isrc/include/lua -Isrc/vendor -Isrc/vendor/imgui -Isrc/vendor/box2d -IC:/msys64/mingw64/include -IC:\msys64\mingw64\lib\libyaml-cpp.a -Isrc\vendor\imgui -MMD -MP -c src\src\utils\Shader.cpp -o src\build\utils\Shader.o
|
||||
[COMPILE] g++ -std=c++20 -Wall -g -Isrc/include -Isrc/include/lua -Isrc/vendor -Isrc/vendor/imgui -Isrc/vendor/box2d -IC:/msys64/mingw64/include -IC:\msys64\mingw64\lib\libyaml-cpp.a -Isrc\vendor\imgui -MMD -MP -c src\src\Components\ScriptComponent.cpp -o src\build\Components\ScriptComponent.o
|
||||
[COMPILE] g++ -std=c++20 -Wall -g -Isrc/include -Isrc/include/lua -Isrc/vendor -Isrc/vendor/imgui -Isrc/vendor/box2d -IC:/msys64/mingw64/include -IC:\msys64\mingw64\lib\libyaml-cpp.a -Isrc\vendor\imgui -MMD -MP -c src\src\Components\TilemapComponent.cpp -o src\build\Components\TilemapComponent.o
|
||||
[COMPILE] g++ -std=c++20 -Wall -g -Isrc/include -Isrc/include/lua -Isrc/vendor -Isrc/vendor/imgui -Isrc/vendor/box2d -IC:/msys64/mingw64/include -IC:\msys64\mingw64\lib\libyaml-cpp.a -Isrc\vendor\imgui -MMD -MP -c src\src\core\utils\Profiler.cpp -o src\build\core\utils\Profiler.o
|
||||
[COMPILE] g++ -std=c++20 -Wall -g -Isrc/include -Isrc/include/lua -Isrc/vendor -Isrc/vendor/imgui -Isrc/vendor/box2d -IC:/msys64/mingw64/include -IC:\msys64\mingw64\lib\libyaml-cpp.a -Isrc\vendor\imgui -MMD -MP -c src\src\Renderer.cpp -o src\build\Renderer.o
|
||||
[COMPILE] g++ -std=c++20 -Wall -g -Isrc/include -Isrc/include/lua -Isrc/vendor -Isrc/vendor/imgui -Isrc/vendor/box2d -IC:/msys64/mingw64/include -IC:\msys64\mingw64\lib\libyaml-cpp.a -Isrc\vendor\imgui -MMD -MP -c src\src\Components\ParticleComponent.cpp -o src\build\Components\ParticleComponent.o
|
||||
[COMPILE] g++ -std=c++20 -Wall -g -Isrc/include -Isrc/include/lua -Isrc/vendor -Isrc/vendor/imgui -Isrc/vendor/box2d -IC:/msys64/mingw64/include -IC:\msys64\mingw64\lib\libyaml-cpp.a -Isrc\vendor\imgui -MMD -MP -c src\src\editor\windows\Inspector.cpp -o src\build\editor\windows\Inspector.o
|
||||
[COMPILE] g++ -std=c++20 -Wall -g -Isrc/include -Isrc/include/lua -Isrc/vendor -Isrc/vendor/imgui -Isrc/vendor/box2d -IC:/msys64/mingw64/include -IC:\msys64\mingw64\lib\libyaml-cpp.a -Isrc\vendor\imgui -MMD -MP -c src\src\core\utils\EngineConfig.cpp -o src\build\core\utils\EngineConfig.o
|
||||
[COMPILE] g++ -std=c++20 -Wall -g -Isrc/include -Isrc/include/lua -Isrc/vendor -Isrc/vendor/imgui -Isrc/vendor/box2d -IC:/msys64/mingw64/include -IC:\msys64\mingw64\lib\libyaml-cpp.a -Isrc\vendor\imgui -MMD -MP -c src\src\core\utils\utils.cpp -o src\build\core\utils\utils.o
|
||||
[COMPILE] g++ -std=c++20 -Wall -g -Isrc/include -Isrc/include/lua -Isrc/vendor -Isrc/vendor/imgui -Isrc/vendor/box2d -IC:/msys64/mingw64/include -IC:\msys64\mingw64\lib\libyaml-cpp.a -Isrc\vendor\imgui -MMD -MP -c src\src\Components\SpriteComponent.cpp -o src\build\Components\SpriteComponent.o
|
||||
[COMPILE] g++ -std=c++20 -Wall -g -Isrc/include -Isrc/include/lua -Isrc/vendor -Isrc/vendor/imgui -Isrc/vendor/box2d -IC:/msys64/mingw64/include -IC:\msys64\mingw64\lib\libyaml-cpp.a -Isrc\vendor\imgui -MMD -MP -c src\src\Engine.cpp -o src\build\Engine.o
|
||||
[LINK] g++ src\build\Engine.o src\build\main.o src\build\Renderer.o src\build\Components\AnimationComponent.o src\build\Components\CameraComponent.o src\build\Components\LightComponent.o src\build\Components\ParticleComponent.o src\build\Components\PhysicsComponent.o src\build\Components\ScriptComponent.o src\build\Components\SpriteComponent.o src\build\Components\TextComonent.o src\build\Components\TilemapComponent.o src\build\core\utils\AssetLoader.o src\build\core\utils\EngineConfig.o src\build\core\utils\ExceptionHandler.o src\build\core\utils\FileDialog.o src\build\core\utils\input.o src\build\core\utils\Logging.o src\build\core\utils\Profiler.o src\build\core\utils\Texture.o src\build\core\utils\utils.o src\build\editor\windows\AssetBrowser.o src\build\editor\windows\Inspector.o src\build\Entitys\Object.o src\build\utils\GameObjectsList.o src\build\utils\Shader.o src\build\utils\UID.o src\build\lapi.o src\build\lauxlib.o src\build\lbaselib.o src\build\lcode.o src\build\lcorolib.o src\build\lctype.o src\build\ldblib.o src\build\ldebug.o src\build\ldo.o src\build\ldump.o src\build\lfunc.o src\build\lgc.o src\build\linit.o src\build\liolib.o src\build\llex.o src\build\lmathlib.o src\build\lmem.o src\build\loadlib.o src\build\lobject.o src\build\lopcodes.o src\build\loslib.o src\build\lparser.o src\build\lstate.o src\build\lstring.o src\build\lstrlib.o src\build\ltable.o src\build\ltablib.o src\build\ltm.o src\build\lua.o src\build\luac.o src\build\lundump.o src\build\lutf8lib.o src\build\lvm.o src\build\lzio.o src\build\imgui.o src\build\imgui_demo.o src\build\imgui_draw.o src\build\imgui_impl_glfw.o src\build\imgui_impl_opengl3.o src\build\imgui_tables.o src\build\imgui_widgets.o src\build\aabb.o src\build\arena_allocator.o src\build\array.o src\build\bitset.o src\build\body.o src\build\broad_phase.o src\build\constraint_graph.o src\build\contact.o src\build\contact_solver.o src\build\core.o src\build\distance.o src\build\distance_joint.o src\build\dynamic_tree.o src\build\geometry.o src\build\hull.o src\build\id_pool.o src\build\island.o src\build\joint.o src\build\manifold.o src\build\math_functions.o src\build\motor_joint.o src\build\mouse_joint.o src\build\mover.o src\build\prismatic_joint.o src\build\revolute_joint.o src\build\sensor.o src\build\shape.o src\build\solver.o src\build\solver_set.o src\build\table.o src\build\timer.o src\build\types.o src\build\weld_joint.o src\build\wheel_joint.o src\build\world.o -o src\build\app.exe -LC:\msys64\mingw64\lib -lglfw3 -lglew32 -lopengl32 -lgdi32 -lyaml-cpp -lcomdlg32 -lssl -lcrypto
|
||||
[ERROR] Interrupted by user.
|
||||
[RUN] Executed app.exe successfully.
|
||||
|
@ -1,108 +1,290 @@
|
||||
engine_version: 0.1.0
|
||||
scene_name: lighting_test
|
||||
scene_hash: 20f69ee98c99f659ed799cb6546a6b48a26678324d4bc1518d49b531fc048d9b
|
||||
scene_hash: 964a6472a140773c791bf1ed2b8e6ea5b20b183e7bb02489110ad41df5d364e2
|
||||
format_version: 1
|
||||
objects:
|
||||
- name: Red Light
|
||||
position: [2051, 1540]
|
||||
layer: 0
|
||||
components:
|
||||
- type: LightComponent
|
||||
color:
|
||||
- 1
|
||||
- 0
|
||||
- 0
|
||||
intensity: 3.79999995
|
||||
radius: 5000
|
||||
falloff: 0.100000001
|
||||
type: 0
|
||||
children: []
|
||||
- name: Sun
|
||||
position: [551, 0]
|
||||
layer: 0
|
||||
components:
|
||||
- type: LightComponent
|
||||
color:
|
||||
- 1
|
||||
- 1
|
||||
- 1
|
||||
intensity: 0.850000024
|
||||
radius: 10000
|
||||
falloff: 1
|
||||
type: 0
|
||||
children: []
|
||||
- name: Tiles
|
||||
uid: f5e01f7892874a67b662633650b41dbd
|
||||
id: 3
|
||||
position: [0, 0]
|
||||
rotation: 0
|
||||
layer: 0
|
||||
visable: true
|
||||
components: []
|
||||
children:
|
||||
- name: Bark
|
||||
uid: 7dc3bbf8affb4844ae3801f03857b904
|
||||
id: 4
|
||||
position: [0, 0]
|
||||
rotation: 0
|
||||
layer: 0
|
||||
visable: true
|
||||
components:
|
||||
- type: SpriteComponent
|
||||
texture: C:\Users\spenc\OneDrive\Pictures\textures\bark_willow_02_diff_1k.png
|
||||
normalMap: C:\Users\spenc\OneDrive\Pictures\textures\bark_willow_02_nor_gl_1k.png
|
||||
renderType: Lit
|
||||
children: []
|
||||
- name: Planks
|
||||
uid: 13d8988343354e3c8a1f51c03ed40cda
|
||||
id: 5
|
||||
position: [1024, 0]
|
||||
rotation: 0
|
||||
layer: 0
|
||||
visable: true
|
||||
components:
|
||||
- type: SpriteComponent
|
||||
texture: C:\Users\spenc\OneDrive\Pictures\textures\wood_floor_worn_diff_1k.png
|
||||
normalMap: C:\Users\spenc\OneDrive\Pictures\textures\wood_floor_worn_nor_gl_1k.png
|
||||
renderType: Lit
|
||||
children: []
|
||||
- name: Rocks
|
||||
uid: cff28abe7e3b455ab9b756acc84cd2d7
|
||||
id: 6
|
||||
position: [0, 1024]
|
||||
rotation: 0
|
||||
layer: 0
|
||||
visable: true
|
||||
components:
|
||||
- type: SpriteComponent
|
||||
texture: C:\Users\spenc\OneDrive\Pictures\textures\ganges_river_pebbles_diff_1k.png
|
||||
normalMap: C:\Users\spenc\OneDrive\Pictures\textures\ganges_river_pebbles_nor_gl_1k.png
|
||||
renderType: Lit
|
||||
children: []
|
||||
- name: Metal
|
||||
position: [1024, 1025]
|
||||
uid: 98967eb30e5b429b992766d8062b7c17
|
||||
id: 7
|
||||
position: [1024, 1024]
|
||||
rotation: 0
|
||||
layer: 0
|
||||
visable: true
|
||||
components:
|
||||
- type: SpriteComponent
|
||||
texture: C:\Users\spenc\OneDrive\Pictures\textures\metal_plate_diff_1k.png
|
||||
normalMap: C:\Users\spenc\OneDrive\Pictures\textures\metal_plate_nor_gl_1k.png
|
||||
renderType: Lit
|
||||
children: []
|
||||
- name: Logo
|
||||
position: [2048, 0]
|
||||
uid: c4ce6f16dfb347b0ae0ac67f5881b243
|
||||
id: 8
|
||||
position: [3181, 56]
|
||||
rotation: 0
|
||||
layer: 0
|
||||
visable: true
|
||||
components:
|
||||
- type: SpriteComponent
|
||||
texture: C:\Users\spenc\OneDrive\Pictures\blue_logo.png
|
||||
normalMap: C:\Users\spenc\OneDrive\Pictures\textures\images.jpg
|
||||
normalMap: C:\Users\spenc\OneDrive\Pictures\textures\circuits_normal.jpg
|
||||
renderType: Lit
|
||||
children: []
|
||||
- name: Carbooon Fobar
|
||||
position: [2567, 1545]
|
||||
uid: 5ea269572751401da6d86519d3513b7d
|
||||
id: 9
|
||||
position: [4087.8999, 3070]
|
||||
rotation: 0
|
||||
layer: 1
|
||||
visable: true
|
||||
components:
|
||||
- type: SpriteComponent
|
||||
texture: C:\Users\spenc\OneDrive\Pictures\textures\carbon-fiber-smooth-bl\carbon-fiber-smooth-bl\carbon-fiber_smooth_albedo.png
|
||||
normalMap: C:\Users\spenc\OneDrive\Pictures\textures\carbon-fiber-smooth-bl\carbon-fiber-smooth-bl\carbon-fiber_smooth_normal-ogl.png
|
||||
renderType: Lit
|
||||
children: []
|
||||
- name: Mud
|
||||
position: [0, 2578]
|
||||
- name: Carbooon Fobar 2
|
||||
uid: a36b71937ba349bd8e6414f75be9ee16
|
||||
id: 10
|
||||
position: [-7.69999981, 3070]
|
||||
rotation: 0
|
||||
layer: 0
|
||||
visable: true
|
||||
components:
|
||||
- type: SpriteComponent
|
||||
texture: C:\Users\spenc\OneDrive\Pictures\textures\mud-bl\mud-bl\mud_albedo.png
|
||||
normalMap: C:\Users\spenc\OneDrive\Pictures\textures\mud-bl\mud-bl\mud_normal-ogl.png
|
||||
texture: C:\Users\spenc\OneDrive\Pictures\textures\carbon-fiber-smooth-bl\carbon-fiber-smooth-bl\carbon-fiber_smooth_albedo.png
|
||||
normalMap: C:\Users\spenc\OneDrive\Pictures\textures\carbon-fiber-smooth-bl\carbon-fiber-smooth-bl\carbon-fiber_smooth_normal-ogl.png
|
||||
renderType: Lit
|
||||
children: []
|
||||
- name: Green Light
|
||||
position: [1364, 0]
|
||||
- name: Lights
|
||||
uid: 051b338a725a4076ad53ad8fa00c5f4e
|
||||
id: 12
|
||||
position: [-560, 1118]
|
||||
rotation: 0
|
||||
layer: 0
|
||||
visable: true
|
||||
components: []
|
||||
children:
|
||||
- name: Red
|
||||
uid: 6afde2dd47aa4557b6afb1a607c99dc8
|
||||
id: 13
|
||||
position: [878.398376, 545.669373]
|
||||
rotation: 0
|
||||
layer: 2
|
||||
visable: true
|
||||
components:
|
||||
- type: LightComponent
|
||||
color:
|
||||
- 1
|
||||
- 0
|
||||
- 0
|
||||
intensity: 2
|
||||
radius: 1000
|
||||
falloff: 1
|
||||
type: 0
|
||||
children: []
|
||||
- name: Green
|
||||
uid: 0f950d76d24b4dc18f54cab2c3aaaf9a
|
||||
id: 14
|
||||
position: [1511.04724, 1137.07068]
|
||||
rotation: 0
|
||||
layer: 2
|
||||
visable: true
|
||||
components:
|
||||
- type: LightComponent
|
||||
color:
|
||||
- 0
|
||||
- 1
|
||||
- 0
|
||||
intensity: 2
|
||||
radius: 1000
|
||||
falloff: 1
|
||||
type: 0
|
||||
children: []
|
||||
- name: Blue
|
||||
uid: 09f722f51c7c4b0f98de3a0a16d127c4
|
||||
id: 15
|
||||
position: [682.554321, 1389.26001]
|
||||
rotation: 0
|
||||
layer: 2
|
||||
visable: true
|
||||
components:
|
||||
- type: LightComponent
|
||||
color:
|
||||
- 0
|
||||
- 0
|
||||
- 1
|
||||
intensity: 2
|
||||
radius: 1000
|
||||
falloff: 1
|
||||
type: 0
|
||||
children: []
|
||||
- name: Ambient light
|
||||
uid: d4fb425522d84a8cbbd7d1415bcd93df
|
||||
id: 16
|
||||
position: [500, 500]
|
||||
rotation: 0
|
||||
layer: 0
|
||||
visable: true
|
||||
components:
|
||||
- type: LightComponent
|
||||
color:
|
||||
- 1
|
||||
- 1
|
||||
- 1
|
||||
intensity: 0.0500000007
|
||||
radius: 1000000
|
||||
falloff: 1
|
||||
type: 0
|
||||
children: []
|
||||
- name: ScriptHandler
|
||||
uid: 895c655f3dda4aec9f2a354c1276c53e
|
||||
id: 14
|
||||
position: [0, 0]
|
||||
rotation: 0
|
||||
layer: 0
|
||||
visable: true
|
||||
components:
|
||||
- type: LightComponent
|
||||
color:
|
||||
- 0
|
||||
- 1
|
||||
- 0.176470518
|
||||
intensity: 10
|
||||
radius: 1000
|
||||
falloff: 1
|
||||
type: 0
|
||||
children: []
|
||||
- type: ScriptComponent
|
||||
scriptPath: C:\Users\spenc\OneDrive\Documents\GitHub\Create-Engine\src\assets\lua\test.lua
|
||||
children: []
|
||||
- name: Camera
|
||||
uid: 7d10561480d54060882f1c986023a58b
|
||||
id: 106
|
||||
position: [512, 2000]
|
||||
rotation: 0
|
||||
layer: 3
|
||||
visable: true
|
||||
components:
|
||||
- type: CameraComponent
|
||||
fov: 45
|
||||
aspect: 1.76999998
|
||||
zoom: 1
|
||||
primary: true
|
||||
children: []
|
||||
- name: Flower Peddels
|
||||
uid: 20b09854d73f4928860c608c7b143f3f
|
||||
id: 16
|
||||
position: [397, 852]
|
||||
rotation: 0
|
||||
layer: 0
|
||||
visable: true
|
||||
components:
|
||||
- type: ParticleComponent
|
||||
maxParticles: 1000
|
||||
emissionRate: 100
|
||||
lifeMin: 5
|
||||
lifeMax: 10
|
||||
sizeMin: 1
|
||||
sizeMax: 10
|
||||
speedMin: 100
|
||||
speedMax: 300
|
||||
direction: [0, 1]
|
||||
spread: 1.57000005
|
||||
startColor: [0, 0.705882311, 1, 1]
|
||||
endColor: [0.792156875, 0, 1, 1]
|
||||
loop: true
|
||||
burst: false
|
||||
children: []
|
||||
- name: Rain
|
||||
uid: 19253834f75d4e69a618c45ddb14e8b0
|
||||
id: 81
|
||||
position: [397, 852]
|
||||
rotation: 0
|
||||
layer: 0
|
||||
visable: true
|
||||
components:
|
||||
- type: ParticleComponent
|
||||
maxParticles: 1000
|
||||
emissionRate: 1000
|
||||
lifeMin: 0.5
|
||||
lifeMax: 1.5
|
||||
sizeMin: 5
|
||||
sizeMax: 10
|
||||
speedMin: 1000
|
||||
speedMax: 3000
|
||||
direction: [0, 1]
|
||||
spread: 0.860000014
|
||||
startColor: [0, 0.647058964, 1, 1]
|
||||
endColor: [0, 0, 1, 0]
|
||||
loop: true
|
||||
burst: false
|
||||
children: []
|
||||
- name: Fire
|
||||
uid: 995af3d194694309a490504eaee3ae92
|
||||
id: 116
|
||||
position: [458, 2244]
|
||||
rotation: 0
|
||||
layer: 0
|
||||
visable: true
|
||||
components:
|
||||
- type: ParticleComponent
|
||||
maxParticles: 1000
|
||||
emissionRate: 200
|
||||
lifeMin: 0.5
|
||||
lifeMax: 1.5
|
||||
sizeMin: 1
|
||||
sizeMax: 100
|
||||
speedMin: 100
|
||||
speedMax: 500
|
||||
direction: [0, -1]
|
||||
spread: 0.5
|
||||
startColor: [0.764705896, 1, 0, 1]
|
||||
endColor: [1, 0, 0, 0]
|
||||
loop: true
|
||||
burst: false
|
||||
children: []
|
||||
color_correction:
|
||||
brightness: 2
|
||||
saturation: 2
|
||||
gamma: 1.05999994
|
||||
bloom: true
|
||||
intensity: 1.40999997
|
||||
threshold: 0.300000012
|
@ -1,6 +1,6 @@
|
||||
engine_version: 0.1.0
|
||||
scene_name: lighting_test_2
|
||||
scene_hash: 6622c33531e5f56eb45af8ba16579b92f107df240dda01c57391813a98dbb3cb
|
||||
scene_hash: 8d1aa1b7b386c5e68c5ad14aa2db10dad6c1fef078b7cbd009df408784b8f915
|
||||
format_version: 1
|
||||
objects:
|
||||
- name: Tiles
|
||||
@ -115,7 +115,7 @@ objects:
|
||||
- name: Red
|
||||
uid: 6afde2dd47aa4557b6afb1a607c99dc8
|
||||
id: 13
|
||||
position: [818.390869, 568.231567]
|
||||
position: [574.239258, 805.561768]
|
||||
rotation: 0
|
||||
layer: 2
|
||||
visable: true
|
||||
@ -133,7 +133,7 @@ objects:
|
||||
- name: Green
|
||||
uid: 0f950d76d24b4dc18f54cab2c3aaaf9a
|
||||
id: 14
|
||||
position: [1521.5116, 1073.82153]
|
||||
position: [1438.05347, 743.714905]
|
||||
rotation: 0
|
||||
layer: 2
|
||||
visable: true
|
||||
@ -151,7 +151,7 @@ objects:
|
||||
- name: Blue
|
||||
uid: 09f722f51c7c4b0f98de3a0a16d127c4
|
||||
id: 15
|
||||
position: [732.097473, 1429.9469]
|
||||
position: [1059.70728, 1522.72339]
|
||||
rotation: 0
|
||||
layer: 2
|
||||
visable: true
|
||||
@ -267,16 +267,16 @@ objects:
|
||||
components:
|
||||
- type: ParticleComponent
|
||||
maxParticles: 1000
|
||||
emissionRate: 251
|
||||
emissionRate: 200
|
||||
lifeMin: 0.5
|
||||
lifeMax: 1.5
|
||||
sizeMin: 5
|
||||
sizeMax: 98.3000031
|
||||
sizeMin: 1
|
||||
sizeMax: 100
|
||||
speedMin: 100
|
||||
speedMax: 500
|
||||
direction: [0, -1]
|
||||
spread: 0.419999987
|
||||
startColor: [1, 0.941176474, 0, 1]
|
||||
spread: 0.5
|
||||
startColor: [0.764705896, 1, 0, 1]
|
||||
endColor: [1, 0, 0, 0]
|
||||
loop: true
|
||||
burst: false
|
||||
|
@ -213,6 +213,11 @@ void ShowProfilerTimeline()
|
||||
{
|
||||
PROFILE_ENGINE_SCOPE("Engine::ShowProfilerTimeline");
|
||||
|
||||
if (!g_engineConfig.settings.show_profiler_window)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (!g_engineConfig.settings.profile_enabled)
|
||||
{
|
||||
if (ImGui::Begin("Profiler", nullptr, ImGuiWindowFlags_NoScrollbar))
|
||||
@ -688,6 +693,10 @@ void Engine::Run()
|
||||
if (ImGui::BeginMenu("Windows"))
|
||||
{
|
||||
ImGui::Checkbox("Color Correction", &g_engineConfig.settings.show_color_correction_window);
|
||||
ImGui::Checkbox("Profiler", &g_engineConfig.settings.show_profiler_window);
|
||||
ImGui::Checkbox("Assets", &g_engineConfig.settings.show_asset_window);
|
||||
|
||||
|
||||
ImGui::EndMenu();
|
||||
}
|
||||
|
||||
|
@ -3,23 +3,20 @@
|
||||
#include <filesystem>
|
||||
#include <fstream>
|
||||
#include <Windows.h>
|
||||
#include <shlobj.h> // SHGetFolderPathA
|
||||
#include <shlobj.h>
|
||||
|
||||
#include "Logging.h"
|
||||
|
||||
|
||||
|
||||
//! Macro Fuckery my Gz
|
||||
|
||||
EngineConfig g_engineConfig{
|
||||
.version = "0.1.0",
|
||||
.gl_version = "430",
|
||||
.gl_maxLight = 512,
|
||||
.settings = {
|
||||
.draw_gizmos = true,
|
||||
.profile_editor = false,
|
||||
.profile_enabled = true,
|
||||
.show_color_correction_window = false,
|
||||
.lighting_enabled = true,
|
||||
.profile_deep = false,
|
||||
.profile_gpu = false,
|
||||
}};
|
||||
.settings = UserSettings{}
|
||||
};
|
||||
|
||||
static std::filesystem::path GetUserSettingsPath()
|
||||
{
|
||||
@ -29,7 +26,6 @@ static std::filesystem::path GetUserSettingsPath()
|
||||
std::filesystem::path path = std::filesystem::path(userPath) / ".CreateEngine" / ".user_settings.yaml";
|
||||
std::filesystem::create_directories(path.parent_path());
|
||||
Logger::LogVerbose("Settings Path: %s", path.string().c_str());
|
||||
|
||||
return path;
|
||||
}
|
||||
return {};
|
||||
@ -42,15 +38,14 @@ void EngineConfig::SaveToFile()
|
||||
YAML::Emitter out;
|
||||
out << YAML::BeginMap;
|
||||
|
||||
out << YAML::Key << "draw_gizmos" << YAML::Value << settings.draw_gizmos;
|
||||
out << YAML::Key << "profile_editor" << YAML::Value << settings.profile_editor;
|
||||
out << YAML::Key << "profile_enabled" << YAML::Value << settings.profile_enabled;
|
||||
out << YAML::Key << "show_color_correction_window" << YAML::Value << settings.show_color_correction_window;
|
||||
out << YAML::Key << "lighting_enabled" << YAML::Value << settings.lighting_enabled;
|
||||
out << YAML::Key << "profile_deep" << YAML::Value << settings.profile_deep;
|
||||
out << YAML::Key << "profile_gpu" << YAML::Value << settings.profile_gpu;
|
||||
out << YAML::Key << "settings" << YAML::Value;
|
||||
out << YAML::BeginMap;
|
||||
|
||||
#define USER_SETTING(name, type, default_val) out << YAML::Key << #name << YAML::Value << settings.name;
|
||||
USER_SETTINGS_TABLE
|
||||
#undef USER_SETTING
|
||||
|
||||
out << YAML::EndMap;
|
||||
|
||||
out << YAML::EndMap;
|
||||
|
||||
@ -67,19 +62,13 @@ void EngineConfig::LoadFromFile()
|
||||
return;
|
||||
|
||||
YAML::Node root = YAML::LoadFile(path.string());
|
||||
YAML::Node section = root["settings"];
|
||||
if (!section)
|
||||
return;
|
||||
|
||||
if (root["draw_gizmos"])
|
||||
settings.draw_gizmos = root["draw_gizmos"].as<bool>();
|
||||
if (root["profile_editor"])
|
||||
settings.profile_editor = root["profile_editor"].as<bool>();
|
||||
if (root["profile_enabled"])
|
||||
settings.profile_enabled = root["profile_enabled"].as<bool>();
|
||||
if (root["show_color_correction_window"])
|
||||
settings.show_color_correction_window = root["show_color_correction_window"].as<bool>();
|
||||
if (root["lighting_enabled"])
|
||||
settings.lighting_enabled = root["lighting_enabled"].as<bool>();
|
||||
if (root["profile_deep"])
|
||||
settings.profile_deep = root["profile_deep"].as<bool>();
|
||||
if (root["profile_gpu"])
|
||||
settings.profile_gpu = root["profile_gpu"].as<bool>();
|
||||
#define USER_SETTING(name, type, default_val) \
|
||||
if (section[#name]) settings.name = section[#name].as<type>();
|
||||
USER_SETTINGS_TABLE
|
||||
#undef USER_SETTING
|
||||
}
|
||||
|
||||
|
@ -1,14 +1,22 @@
|
||||
#pragma once
|
||||
#include <string>
|
||||
|
||||
#define USER_SETTINGS_TABLE \
|
||||
USER_SETTING(draw_gizmos, bool, true) \
|
||||
USER_SETTING(profile_editor, bool, false) \
|
||||
USER_SETTING(profile_enabled, bool, true) \
|
||||
USER_SETTING(show_color_correction_window, bool, false) \
|
||||
USER_SETTING(show_profiler_window, bool, false) \
|
||||
USER_SETTING(lighting_enabled, bool, true) \
|
||||
USER_SETTING(profile_deep, bool, false) \
|
||||
USER_SETTING(show_asset_window, bool, false) \
|
||||
USER_SETTING(profile_gpu, bool, false)
|
||||
|
||||
|
||||
struct UserSettings {
|
||||
bool draw_gizmos;
|
||||
bool profile_editor;
|
||||
bool profile_enabled;
|
||||
bool show_color_correction_window;
|
||||
bool lighting_enabled;
|
||||
bool profile_deep;
|
||||
bool profile_gpu;
|
||||
#define USER_SETTING(name, type, default_val) type name = default_val;
|
||||
USER_SETTINGS_TABLE
|
||||
#undef USER_SETTING
|
||||
};
|
||||
|
||||
struct EngineConfig {
|
||||
@ -23,3 +31,4 @@ struct EngineConfig {
|
||||
};
|
||||
|
||||
extern EngineConfig g_engineConfig;
|
||||
|
||||
|
@ -9,6 +9,7 @@
|
||||
#include "Profiler.h"
|
||||
#include "Logging.h"
|
||||
#include "FileDialog.h"
|
||||
#include "EngineConfig.h"
|
||||
|
||||
struct ImageCacheEntry {
|
||||
unsigned int textureID;
|
||||
|
@ -1,13 +1,21 @@
|
||||
// core/render/AssetBrowser.cpp
|
||||
#include "AssetBrowser.h"
|
||||
#include <imgui.h>
|
||||
#include "../../core/utils/EngineConfig.h"
|
||||
#include "../../core/utils/utils.h"
|
||||
#include "../../Renderer.h"
|
||||
#include "../../core/utils/Logging.h"
|
||||
|
||||
extern std::unordered_map<std::string, ImageCacheEntry> textureCache;
|
||||
|
||||
static std::string assetSearchQuery;
|
||||
|
||||
void ShowAssetBrowser()
|
||||
{
|
||||
PROFILE_ENGINE_SCOPE("Editor::AssetBrowser");
|
||||
|
||||
if (!g_engineConfig.settings.show_asset_window)
|
||||
return;
|
||||
|
||||
ImGui::Begin("Asset Browser");
|
||||
|
||||
if (ImGui::Button("Load Asset"))
|
||||
@ -19,42 +27,94 @@ void ShowAssetBrowser()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
ImGui::Separator();
|
||||
char buffer[256] = {};
|
||||
strncpy(buffer, assetSearchQuery.c_str(), sizeof(buffer) - 1);
|
||||
|
||||
if (ImGui::InputTextWithHint("##Search", "Search...", buffer, sizeof(buffer)))
|
||||
{
|
||||
assetSearchQuery = buffer;
|
||||
}
|
||||
|
||||
ImGui::Separator();
|
||||
|
||||
ImGui::BeginChild("##AssetScroll", ImVec2(0, 0), true);
|
||||
|
||||
const float padding = 8.0f;
|
||||
const float padding = 8.0f;
|
||||
const float thumbnailSize = 64.0f;
|
||||
const float cellSize = thumbnailSize + padding;
|
||||
const float cellSize = thumbnailSize + padding;
|
||||
|
||||
float availWidth = ImGui::GetContentRegionAvail().x;
|
||||
int columns = static_cast<int>(availWidth / cellSize);
|
||||
if (columns < 1) columns = 1;
|
||||
int columns = static_cast<int>(availWidth / cellSize);
|
||||
if (columns < 1)
|
||||
columns = 1;
|
||||
|
||||
ImGui::Columns(columns, nullptr, false);
|
||||
|
||||
int idx = 0;
|
||||
for (auto& kv : textureCache)
|
||||
for (auto it = textureCache.begin(); it != textureCache.end();)
|
||||
{
|
||||
ImGui::PushID(idx++);
|
||||
const std::string& path = kv.first;
|
||||
const auto& entry = kv.second;
|
||||
const std::string &path = it->first;
|
||||
auto &entry = it->second;
|
||||
|
||||
if (!assetSearchQuery.empty() &&
|
||||
path.find(assetSearchQuery) == std::string::npos)
|
||||
{
|
||||
++it;
|
||||
continue;
|
||||
}
|
||||
|
||||
ImGui::PushID(idx++);
|
||||
std::string displayName = GetFilenameFromPath(path);
|
||||
|
||||
ImGui::ImageButton("##Image",
|
||||
(ImTextureID)(intptr_t)entry.textureID,
|
||||
ImVec2(thumbnailSize, thumbnailSize),
|
||||
ImVec2(0,0), ImVec2(1,1)
|
||||
);
|
||||
if (ImGui::ImageButton("##Image",
|
||||
(ImTextureID)(intptr_t)entry.textureID,
|
||||
ImVec2(thumbnailSize, thumbnailSize),
|
||||
ImVec2(0, 0), ImVec2(1, 1)))
|
||||
{
|
||||
// Optional: preview or inspect
|
||||
}
|
||||
|
||||
// Tooltip
|
||||
if (ImGui::IsItemHovered())
|
||||
{
|
||||
ImGui::BeginTooltip();
|
||||
ImGui::Text("Path: %s", path.c_str());
|
||||
ImGui::Text("Texture ID: %u", entry.textureID);
|
||||
ImGui::Text("Size: %dx%d", entry.size.x, entry.size.y);
|
||||
ImGui::EndTooltip();
|
||||
}
|
||||
|
||||
// Right-click menu
|
||||
if (ImGui::BeginPopupContextItem("AssetContext"))
|
||||
{
|
||||
if (ImGui::MenuItem("Unload"))
|
||||
{
|
||||
Logger::LogInfo("[AssetBrowser] Unloaded: %s", path.c_str());
|
||||
it = textureCache.erase(it);
|
||||
ImGui::EndPopup();
|
||||
ImGui::PopID();
|
||||
continue;
|
||||
}
|
||||
|
||||
if (ImGui::MenuItem("Copy Path"))
|
||||
{
|
||||
ImGui::SetClipboardText(path.c_str());
|
||||
}
|
||||
|
||||
ImGui::EndPopup();
|
||||
}
|
||||
|
||||
if (ImGui::BeginDragDropSource())
|
||||
{
|
||||
ImGui::SetDragDropPayload("ASSET_TEXTURE",
|
||||
path.c_str(),
|
||||
path.size()+1);
|
||||
path.size() + 1);
|
||||
ImGui::Image((ImTextureID)(intptr_t)entry.textureID,
|
||||
ImVec2(thumbnailSize*2, thumbnailSize*2));
|
||||
ImVec2(thumbnailSize * 2, thumbnailSize * 2));
|
||||
ImGui::Text("%s", displayName.c_str());
|
||||
ImGui::EndDragDropSource();
|
||||
}
|
||||
@ -62,6 +122,8 @@ void ShowAssetBrowser()
|
||||
ImGui::TextWrapped("%s", displayName.c_str());
|
||||
ImGui::NextColumn();
|
||||
ImGui::PopID();
|
||||
|
||||
++it;
|
||||
}
|
||||
|
||||
ImGui::Columns(1);
|
||||
|
Loading…
Reference in New Issue
Block a user