Fix this sorry repository

This commit is contained in:
illegitimate-egg 2024-10-13 18:51:01 +01:00
parent 8ccbd3926e
commit b197958ccf
6 changed files with 39 additions and 80 deletions

39
.gitmodules vendored
View File

@ -1,30 +1,27 @@
[submodule "SOIL2"]
path = SOIL2
[submodule "extern/SOIL2"]
path = extern/SOIL2
url = https://github.com/SpartanJ/SOIL2
[submodule "include/SOIL2"]
path = include/SOIL2
url = https://github.com/SpartanJ/SOIL2
[submodule "include/assimp"]
path = include/assimp
[submodule "extern/assimp"]
path = extern/assimp
url = https://github.com/assimp/assimp
[submodule "include/glew"]
path = include/glew
[submodule "extern/glew"]
path = extern/glew
url = https://github.com/nigels-com/glew
[submodule "include/glfw"]
path = include/glfw
[submodule "extern/glfw"]
path = extern/glfw
url = https://github.com/glfw/glfw
[submodule "include/glm"]
path = include/glm
[submodule "extern/glm"]
path = extern/glm
url = https://github.com/g-truc/glm
[submodule "include/imgui"]
path = include/imgui
[submodule "extern/imgui"]
path = extern/imgui
url = https://github.com/ocornut/imgui
[submodule "include/CLog"]
path = include/CLog
[submodule "extern/CLog"]
path = extern/CLog
url = https://github.com/williamistGitHub/CLog.git
[submodule "include/glad"]
path = include/glad
[submodule "extern/glad"]
path = extern/glad
url = https://github.com/Dav1dde/glad.git
[submodule "include/imGuIZMO.quat"]
path = include/imGuIZMO.quat
[submodule "extern/imGuIZMO.quat"]
path = extern/imGuIZMO.quat
url = https://github.com/BrutPitt/imGuIZMO.quat

10
TODO.md
View File

@ -1,5 +1,5 @@
- [x] Destruct all at the end
- [x] ~~Make ImGuIZMO.quat work~~ No longer required
- [ ] Make ImGuIZMO.quat work
- [ ] Finish modularization
- [ ] Make SOIL2 stop giving that smelly error message
Wtf is this warning?
@ -15,11 +15,17 @@ This warning is for project developers. Use -Wno-dev to suppress it.
CMake Warning (dev) at include/SOIL2/CMakeLists.txt:67 (install):
Target soil2 has PUBLIC_HEADER files but no PUBLIC_HEADER DESTINATION.
This warning is for project developers. Use -Wno-dev to suppress it.
- [x] Overhaul asset debug screen
- [x] Simple Lighting
- [ ] Lightmapped Lighting
- [ ] Lightmapped/Shadowmapped Lighting
- [ ] Get ziggy with it
- [x] Implement Cameras
- [ ] Text
- [ ] RT/texture rendering
- [ ] Additional constructors for arguements that are potentially optional
- [ ] Billboards / Instancing
- [ ] Multiple lights
- [ ] Physics
- [ ] Sound

View File

@ -1,12 +0,0 @@
# Blender 3.6.16 MTL File: 'None'
# www.blender.org
newmtl Material.001
Ns 250.000000
Ka 1.000000 1.000000 1.000000
Ke 0.000000 0.000000 0.000000
Ni 1.450000
d 1.000000
illum 1
map_Kd /home/illegitimate-egg/fred/textures/suzanne_albedo.png
map_Ks /home/illegitimate-egg/fred/textures/suzanne_specular.png

View File

@ -1,2 +0,0 @@
# Blender 4.2.2 LTS MTL File: 'None'
# www.blender.org

View File

@ -373,9 +373,9 @@ void destroy() {
void render(Scene scene) {
// Clear this mf
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
static double lastTime = glfwGetTime();
double currentTime = glfwGetTime();
deltaTime = float(currentTime - lastTime);
lastTime = currentTime;
@ -476,10 +476,21 @@ void render(Scene scene) {
// Userspace ================================================================ //
fred::Scene scene;
void renderCallback() {
ImGui::Begin("User Render Callback");
ImGui::Text("Frametime (ms): %f", fred::getUnscaledDeltaTime() * 1000);
ImGui::Text("FPS: %f", 1/fred::getUnscaledDeltaTime());
ImGui::SeparatorText("Camera");
fred::Camera *currentCamera = scene.cameras[scene.activeCamera];
glm::vec3 rotationEuler = glm::degrees(eulerAngles(currentCamera->rotation));
ImGui::DragFloat3("Translate", (float*)&currentCamera->position, 0.01f);
ImGui::DragFloat3("Rotate", (float*)&rotationEuler);
float fovDeg = glm::degrees(currentCamera->fov);
ImGui::DragFloat("FOV", (float*)&fovDeg);
currentCamera->fov = glm::radians(fovDeg);
currentCamera->rotation = glm::quat(glm::radians(rotationEuler));
ImGui::End();
}
@ -498,7 +509,7 @@ int main() {
fred::Camera mainCamera(glm::vec3(4, 3, 3));
mainCamera.lookAt(glm::vec3(0, 0, 0));
fred::Scene scene = fred::Scene();
scene = fred::Scene();
scene.addCamera(mainCamera);

View File

@ -1,41 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<PROJECT>
<Image File="//wsl.localhost/Fedora/home/fedora/fred/textures/texture.bmp">
<Compression Setting="texture_BMP_DXT3_2" Enabled="False">
<Source>//wsl.localhost/Fedora/home/fedora/fred/textures/texture.bmp</Source>
<Destination>//wsl.localhost/Fedora/home/fedora/fred/textures/results/texture_BMP_DXT3_2.DDS</Destination>
<fd>DXT3</fd>
<Quality>0.2</Quality>
<WeightR>0.3086</WeightR>
<WeightG>0.6094</WeightG>
<WeightB>0.082</WeightB>
<AlphaThreshold>0</AlphaThreshold>
<RefineSteps>0</RefineSteps>
<BlockRate>8.00</BlockRate>
</Compression>
<Compression Setting="texture_BMP_DXT5_3" Enabled="False">
<Source>//wsl.localhost/Fedora/home/fedora/fred/textures/texture.bmp</Source>
<Destination>//wsl.localhost/Fedora/home/fedora/fred/textures/results/texture_BMP_DXT5_3.DDS</Destination>
<fd>DXT5</fd>
<Quality>0.05</Quality>
<WeightR>0.3086</WeightR>
<WeightG>0.6094</WeightG>
<WeightB>0.082</WeightB>
<AlphaThreshold>0</AlphaThreshold>
<RefineSteps>0</RefineSteps>
<BlockRate>8.00</BlockRate>
</Compression>
<Compression Setting="texture_BMP_DXT1_1" Enabled="False">
<Source>//wsl.localhost/Fedora/home/fedora/fred/textures/texture.bmp</Source>
<Destination>//wsl.localhost/Fedora/home/fedora/fred/textures/results/texture_BMP_DXT1_1.DDS</Destination>
<fd>DXT1</fd>
<Quality>0.05</Quality>
<WeightR>0.3086</WeightR>
<WeightG>0.6094</WeightG>
<WeightB>0.082</WeightB>
<AlphaThreshold>0</AlphaThreshold>
<RefineSteps>0</RefineSteps>
<BlockRate>8.00</BlockRate>
</Compression>
</Image>
</PROJECT>