-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #20 from varunthomas/TurboGE_dev
TurboGE v2.0
- Loading branch information
Showing
66 changed files
with
2,075 additions
and
292 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,22 @@ | ||
[submodule "TurboGE/vendor/spdlog"] | ||
path = TurboGE/vendor/spdlog | ||
url = https://github.com/gabime/spdlog | ||
[submodule "TurboGE/vendor/imgui"] | ||
path = TurboGE/vendor/imgui | ||
url = https://github.com/TheCherno/imgui | ||
url = https://github.com/varunthomas/spdlog | ||
[submodule "TurboGE/vendor/glm"] | ||
path = TurboGE/vendor/glm | ||
url = https://github.com/g-truc/glm | ||
url = https://github.com/varunthomas/glm | ||
[submodule "TurboGE/vendor/yaml-cpp"] | ||
path = TurboGE/vendor/yaml-cpp | ||
url = https://github.com/jbeder/yaml-cpp | ||
url = https://github.com/varunthomas/yaml-cpp | ||
[submodule "TurboGE/vendor/ImGuizmo"] | ||
path = TurboGE/vendor/ImGuizmo | ||
url = https://github.com/CedricGuillemet/ImGuizmo | ||
url = https://github.com/varunthomas/ImGuizmo | ||
[submodule "TurboGE/vendor/GLFW"] | ||
path = TurboGE/vendor/GLFW | ||
url = https://github.com/glfw/glfw | ||
url = https://github.com/varunthomas/glfw | ||
[submodule "TurboGE/vendor/imgui"] | ||
path = TurboGE/vendor/imgui | ||
url = https://github.com/varunthomas/imgui | ||
branch = docking | ||
[submodule "TurboGE/vendor/box2d"] | ||
path = TurboGE/vendor/box2d | ||
url = https://github.com/varunthomas/box2d |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
#text vertex | ||
#version 450 core | ||
|
||
layout(location = 0) in vec3 a_WorldPosition; | ||
layout(location = 1) in vec3 a_LocalPosition; | ||
layout(location = 2) in vec4 a_Color; | ||
layout(location = 3) in float a_Thickness; | ||
layout(location = 4) in float a_Fade; | ||
layout(location = 5) in int a_EntityID; | ||
|
||
layout(std140, binding = 0) uniform Camera | ||
{ | ||
mat4 u_ViewProjection; | ||
}; | ||
|
||
struct VertexOutput | ||
{ | ||
vec3 LocalPosition; | ||
vec4 Color; | ||
float Thickness; | ||
float Fade; | ||
}; | ||
|
||
layout (location = 0) out VertexOutput Output; | ||
layout (location = 4) out flat int v_EntityID; | ||
|
||
void main() | ||
{ | ||
Output.LocalPosition = a_LocalPosition; | ||
Output.Color = a_Color; | ||
Output.Thickness = a_Thickness; | ||
Output.Fade = a_Fade; | ||
|
||
v_EntityID = a_EntityID; | ||
|
||
gl_Position = u_ViewProjection * vec4(a_WorldPosition, 1.0); | ||
} | ||
|
||
#text fragment | ||
#version 450 core | ||
|
||
layout(location = 0) out vec4 o_Color; | ||
layout(location = 1) out int o_EntityID; | ||
|
||
struct VertexOutput | ||
{ | ||
vec3 LocalPosition; | ||
vec4 Color; | ||
float Thickness; | ||
float Fade; | ||
}; | ||
|
||
layout (location = 0) in VertexOutput Input; | ||
layout (location = 4) in flat int v_EntityID; | ||
|
||
void main() | ||
{ | ||
// Calculate distance and fill circle with white | ||
float distance = 1.0 - length(Input.LocalPosition); | ||
float circle = smoothstep(0.0, Input.Fade, distance); | ||
circle *= smoothstep(Input.Thickness + Input.Fade, Input.Thickness, distance); | ||
|
||
if (circle == 0.0) | ||
discard; | ||
|
||
// Set output color | ||
o_Color = Input.Color; | ||
o_Color.a *= circle; | ||
|
||
o_EntityID = v_EntityID; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
#text vertex | ||
#version 450 core | ||
|
||
layout(location = 0) in vec3 a_Position; | ||
layout(location = 1) in vec4 a_Color; | ||
layout(location = 2) in int a_entityID; | ||
|
||
layout(std140, binding = 0) uniform Camera | ||
{ | ||
mat4 u_ViewProjection; | ||
}; | ||
|
||
struct VertexOutput | ||
{ | ||
vec4 Color; | ||
}; | ||
|
||
layout (location = 0) out VertexOutput Output; | ||
layout (location = 1) out flat int v_entityID; | ||
|
||
void main() | ||
{ | ||
Output.Color = a_Color; | ||
v_entityID = a_entityID; | ||
gl_Position = u_ViewProjection * vec4(a_Position, 1.0); | ||
} | ||
|
||
#text fragment | ||
#version 450 core | ||
|
||
layout(location = 0) out vec4 color; | ||
layout(location = 1) out int entityId; | ||
|
||
struct VertexOutput | ||
{ | ||
vec4 Color; | ||
}; | ||
|
||
layout (location = 0) in VertexOutput Input; | ||
layout (location = 1) in flat int v_entityID; | ||
|
||
|
||
void main() | ||
{ | ||
color = Input.Color; | ||
entityId = v_entityID; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,50 +1,67 @@ | ||
[Window][DockSpace Demo] | ||
Pos=0,0 | ||
Size=1280,720 | ||
Size=1920,1080 | ||
Collapsed=0 | ||
|
||
[Window][Debug##Default] | ||
ViewportPos=496,733 | ||
ViewportId=0x9F5F46A1 | ||
Pos=60,60 | ||
Size=400,400 | ||
Collapsed=0 | ||
|
||
[Window][Color settings] | ||
Pos=910,24 | ||
Size=370,696 | ||
[Window][Entity Panel] | ||
Pos=0,67 | ||
Size=370,292 | ||
Collapsed=0 | ||
DockId=0x00000006,0 | ||
DockId=0x00000009,0 | ||
|
||
[Window][Dockspace] | ||
Pos=372,24 | ||
Size=536,696 | ||
[Window][Properties] | ||
Pos=0,361 | ||
Size=370,719 | ||
Collapsed=0 | ||
DockId=0x0000000A,0 | ||
|
||
[Window][Browser Panel] | ||
Pos=372,838 | ||
Size=1166,242 | ||
Collapsed=0 | ||
DockId=0x00000002,0 | ||
|
||
[Window][Entity Panel] | ||
[Window][##toolbar] | ||
Pos=0,24 | ||
Size=370,348 | ||
Size=1920,41 | ||
Collapsed=0 | ||
DockId=0x00000002,0 | ||
DockId=0x0000000B,0 | ||
|
||
[Window][Properties] | ||
Pos=0,374 | ||
Size=370,346 | ||
[Window][Color settings] | ||
Pos=1540,67 | ||
Size=380,709 | ||
Collapsed=0 | ||
DockId=0x00000005,0 | ||
|
||
[Window][Settings] | ||
Pos=1540,778 | ||
Size=380,302 | ||
Collapsed=0 | ||
DockId=0x00000006,0 | ||
|
||
[Window][Editor View] | ||
Pos=372,24 | ||
Size=536,696 | ||
Pos=372,67 | ||
Size=1166,769 | ||
Collapsed=0 | ||
DockId=0x00000004,0 | ||
DockId=0x00000001,0 | ||
|
||
[Docking][Data] | ||
DockSpace ID=0x3BC79352 Window=0x4647B76E Pos=73,126 Size=1280,696 Split=X | ||
DockNode ID=0x00000001 Parent=0x3BC79352 SizeRef=908,696 Split=X | ||
DockNode ID=0x00000003 Parent=0x00000001 SizeRef=370,701 Split=Y Selected=0x99E90EE0 | ||
DockNode ID=0x00000002 Parent=0x00000003 SizeRef=370,348 Selected=0x99E90EE0 | ||
DockNode ID=0x00000005 Parent=0x00000003 SizeRef=370,346 Selected=0x199AB496 | ||
DockNode ID=0x00000004 Parent=0x00000001 SizeRef=536,701 CentralNode=1 Selected=0x90BB90E3 | ||
DockNode ID=0x00000006 Parent=0x3BC79352 SizeRef=370,696 Selected=0x854BCD6C | ||
DockSpace ID=0x3BC79352 Window=0x4647B76E Pos=0,24 Size=1920,1056 Split=Y | ||
DockNode ID=0x0000000B Parent=0x3BC79352 SizeRef=1920,41 HiddenTabBar=1 Selected=0xF0F70764 | ||
DockNode ID=0x0000000C Parent=0x3BC79352 SizeRef=1920,1013 Split=X | ||
DockNode ID=0x00000007 Parent=0x0000000C SizeRef=370,1056 Split=Y Selected=0x199AB496 | ||
DockNode ID=0x00000009 Parent=0x00000007 SizeRef=302,292 Selected=0x99E90EE0 | ||
DockNode ID=0x0000000A Parent=0x00000007 SizeRef=302,719 Selected=0x199AB496 | ||
DockNode ID=0x00000008 Parent=0x0000000C SizeRef=1548,1056 Split=X | ||
DockNode ID=0x00000003 Parent=0x00000008 SizeRef=1166,1056 Split=Y | ||
DockNode ID=0x00000001 Parent=0x00000003 SizeRef=1920,769 CentralNode=1 Selected=0x90BB90E3 | ||
DockNode ID=0x00000002 Parent=0x00000003 SizeRef=1920,242 Selected=0xC678E4B5 | ||
DockNode ID=0x00000004 Parent=0x00000008 SizeRef=380,1056 Split=Y Selected=0x54723243 | ||
DockNode ID=0x00000005 Parent=0x00000004 SizeRef=380,709 Selected=0x854BCD6C | ||
DockNode ID=0x00000006 Parent=0x00000004 SizeRef=380,302 Selected=0x54723243 | ||
|
Oops, something went wrong.