-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Basic app window with win32 & rendering with d3d11
In this branch I'm rewriting Nanoforge in the programming language called Beef. C++ is just becoming too much of a hassle to work with. Beef has what I like about C++ & fixes the things I dislike about it. It should be a much nicer development experience, have quicker iteration time, and less bugs & memory leaks. A lot of old code needs to be rewritten anyway since it hasn't held up to changes in the projects scope & overall goals. So the rewrite isn't as much of a time cost as it might've been. I copied over some code from a closed source project of mine so there might be some comments that don't make sense in the context of Nanoforge. The existing code has a nice way of adding new per-frame systems & specifying when in the frame + which app states they should run in. Also has a state stack, resource system, event system, and built in profiling. There's lots of ways this can be improved, but this is a good start. Next up I'll get dear imgui working along with a basic dockspace & main menu bar. After that I'll have to figure out what the order of rewrite will be and which systems should be redesigned instead of just porting the old code to Beef. Some systems were written back when Nanoforge was just a simple zone viewer. Now that the scope of the project is much larger they aren't sufficient. A lot of code also needs to be updated to use the editor data model. I think the syntax improvements & features Beef has also open up some possibilities that weren't feasible in C++. Some features won't immediately come to the rewrite. This time around I'll be prioritizing the map editor first and expanding out from there with other features in mind.
- Loading branch information
Showing
238 changed files
with
28,941 additions
and
19,252 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
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,33 +1,3 @@ | ||
[submodule "Dependencies/RfgToolsPlusPlus"] | ||
path = Dependencies/RfgToolsPlusPlus | ||
url = https://github.com/Moneyl/RfgToolsPlusPlus.git | ||
[submodule "Dependencies/imgui"] | ||
path = Dependencies/imgui | ||
url = https://github.com/ocornut/imgui.git | ||
[submodule "Dependencies/IconFontCppHeaders"] | ||
path = Dependencies/IconFontCppHeaders | ||
url = https://github.com/juliettef/IconFontCppHeaders.git | ||
[submodule "Dependencies/tinyxml2"] | ||
path = Dependencies/tinyxml2 | ||
url = https://github.com/leethomason/tinyxml2.git | ||
[submodule "Dependencies/spdlog"] | ||
path = Dependencies/spdlog | ||
url = https://github.com/gabime/spdlog.git | ||
[submodule "Dependencies/imnodes"] | ||
path = Dependencies/imnodes | ||
url = https://github.com/Nelarius/imnodes.git | ||
[submodule "Dependencies/DirectXTex"] | ||
path = Dependencies/DirectXTex | ||
url = https://github.com/microsoft/DirectXTex.git | ||
[submodule "lib"] | ||
path = lib | ||
url = https://github.com/Moneyl/RF-Viewer-Lib.git | ||
[submodule "Dependencies/nativefiledialog"] | ||
path = Dependencies/nativefiledialog | ||
url = https://github.com/mlabbe/nativefiledialog.git | ||
[submodule "Dependencies/imgui_markdown"] | ||
path = Dependencies/imgui_markdown | ||
url = https://github.com/juliettef/imgui_markdown.git | ||
[submodule "Dependencies/tracy"] | ||
path = Dependencies/tracy | ||
url = https://github.com/wolfpld/tracy.git | ||
[submodule "Dependencies/imgui-beef"] | ||
path = Dependencies/imgui-beef | ||
url = https://github.com/RogueMacro/imgui-beef.git |
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
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,29 @@ | ||
//Constant buffers used by all shaders | ||
|
||
cbuffer cbPerObject | ||
{ | ||
float4x4 WVP; | ||
float4x4 Rotation; | ||
float4 WorldPosition; | ||
}; | ||
|
||
cbuffer cbPerFrame | ||
{ | ||
//Position of the camera | ||
float3 ViewPos; | ||
int Padding0; //Padding since DirectX::XMVector is really 16 bytes | ||
|
||
//Color of the diffuse light | ||
float3 DiffuseColor; | ||
int Padding1; //Padding since DirectX::XMVector is really 16 bytes | ||
|
||
//Intensity of diffuse light | ||
float DiffuseIntensity; | ||
//Bias of elevation coloring in ShadeMode 1. If 0 elevation won't effect color | ||
float ElevationFactorBias; | ||
//Shade mode 0: Color terrain only by elevation | ||
//Shade mode 1: Color terrain with basic lighting + option elevation coloring | ||
int ShadeMode; | ||
float Time; | ||
float2 ViewportDimensions; | ||
}; |
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
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
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
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
Oops, something went wrong.