Skip to content

Commit

Permalink
Maintenance work. Updated several internal libraries: Imgui v1.84 => …
Browse files Browse the repository at this point in the history
…v1.89.9, miniaudio v0.11.11 => v0.11.18, stb_image v2.27 => v2.28, tinyobjloader => commit 853f059.
  • Loading branch information
Zang3th committed Sep 20, 2023
1 parent 29836cf commit 0674510
Show file tree
Hide file tree
Showing 24 changed files with 27,779 additions and 20,048 deletions.
138 changes: 72 additions & 66 deletions Apps/GreenWorld/src/GreenWorldApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ namespace GW
Engine::ResourceManager::LoadTextureFromFile("WaterDuDvMap", "../Res/Assets/Textures/GreenWorld/DuDvMap.png");
Engine::ResourceManager::LoadTextureFromFile("WaterNormalMap", "../Res/Assets/Textures/GreenWorld/WaterNormalMap.png");

//Heightmap(s)
//Heightmap
Engine::ResourceManager::LoadHeightmap("TerrainHeightmap", "../Res/Assets/Textures/GreenWorld/Heightmap128.bmp");
}

Expand All @@ -45,21 +45,27 @@ namespace GW

//Create application specific renderers
_sceneRenderer = Engine::RenderManager::AddScene(_nearPlane, _farPlane, _lightPos, _lightCol);
_shadowRenderer = Engine::RenderManager::AddShadows(8192, _lightPos, _lightTarget,
glm::ortho(-90.0f, 90.0f, -90.0f, 90.0f, 110.0f, 210.0f),
"ShadowCreateShader");_spriteRenderer = Engine::RenderManager::AddSprites();
_shadowRenderer = Engine::RenderManager::AddShadows
(
8192,
_lightPos,
_lightTarget,
glm::ortho(-90.0f, 90.0f, -90.0f, 90.0f, 110.0f, 210.0f),
"ShadowCreateShader"
);
_spriteRenderer = Engine::RenderManager::AddSprites();
_waterRenderer = Engine::RenderManager::AddWater();
_smokeRenderer = Engine::RenderManager::AddParticles
Engine::RenderManager::AddParticles
(
glm::vec3(87.0f, 34.0f, 92.5f), //Spawn point
200, //Number of particles
5.0f, //Size
0.05f, //Speed
0.0f, //Gravity compliance
6.0f, //Lifetime
44.0f, //Respawn threshold (Y-Position)
"ParticleTextureAtlas", //Texture atlas
"ParticleShader" //Shader
glm::vec3(87.0f, 34.0f, 92.5f),
200,
5.0f,
0.05f,
0.0f,
6.0f,
44.0f,
"ParticleTextureAtlas",
"ParticleShader"
);

//Set default shaders for the scene
Expand Down Expand Up @@ -91,62 +97,62 @@ namespace GW
//Terrain
_sceneRenderer->AddTerrain
(
Engine::AppSettings::planeSize, //Length in x direction
Engine::AppSettings::planeSize, //Length in z direction
1.0f, //Tile size
glm::vec3(0.0f, -2.7f, 0.0f), //Position
_shadowRenderer->GetDepthTexture(), //Depth texture
"TerrainGrassTexture", //Main texture
"TerrainColormap", //Texture for coloring
"TerrainHeightmap" //Heightmap
Engine::AppSettings::planeSize,
Engine::AppSettings::planeSize,
1.0f,
glm::vec3(0.0f, -2.7f, 0.0f),
_shadowRenderer->GetDepthTexture(),
"TerrainGrassTexture",
"TerrainColormap",
"TerrainHeightmap"
);

//Water
_sceneRenderer->AddWater
(
Engine::AppSettings::planeSize - 112, //Length in x direction
Engine::AppSettings::planeSize, //Length in z direction
1.0f, //Tile size
glm::vec3(30.5f, 0.0f, 0.0f), //Position
0.025f, //Wave speed
"WaterDuDvMap", //DuDv map
"WaterNormalMap", //Normal map
_waterRenderer->GetReflectTexture(), //Reflect texture
_waterRenderer->GetRefractTexture(), //Refract texture
_waterRenderer->GetRefractDepthTexture() //Refract depth texture
Engine::AppSettings::planeSize - 112,
Engine::AppSettings::planeSize,
1.0f,
glm::vec3(30.5f, 0.0f, 0.0f),
0.025f,
"WaterDuDvMap",
"WaterNormalMap",
_waterRenderer->GetReflectTexture(),
_waterRenderer->GetRefractTexture(),
_waterRenderer->GetRefractDepthTexture()
);

//House
_sceneRenderer->AddObject
(
1.2f, //Size
glm::vec3(0.0f, -70.0f, 0.0f), //Rotation
glm::vec3(85.0f, 0.45f, 95.0f), //Position
_shadowRenderer->GetDepthTexture(), //Depth texture
"House", //Name
"../Res/Assets/Models/GreenWorld/House" //Path to obj file
1.2f,
glm::vec3(0.0f, -70.0f, 0.0f),
glm::vec3(85.0f, 0.45f, 95.0f),
_shadowRenderer->GetDepthTexture(),
"House",
"../Res/Assets/Models/GreenWorld/House"
);

//Bridge
_sceneRenderer->AddObject
(
1.0f, //Size
glm::vec3(0.0f), //Rotation
glm::vec3(39.0f, -0.45f, 47.0f), //Position
_shadowRenderer->GetDepthTexture(), //Depth texture
"Bridge", //Name
"../Res/Assets/Models/GreenWorld/Bridge" //Path to obj file
1.0f,
glm::vec3(0.0f),
glm::vec3(39.0f, -0.45f, 47.0f),
_shadowRenderer->GetDepthTexture(),
"Bridge",
"../Res/Assets/Models/GreenWorld/Bridge"
);

//Tree
_sceneRenderer->AddObject
(
1.0f, //Size
glm::vec3(0.0f), //Rotation
glm::vec3(85.0f, 0.3f, 20.0f), //Position
_shadowRenderer->GetDepthTexture(), //Depth texture
"Tree", //Name
"../Res/Assets/Models/GreenWorld/Tree" //Path to obj file
1.0f,
glm::vec3(0.0f),
glm::vec3(85.0f, 0.3f, 20.0f),
_shadowRenderer->GetDepthTexture(),
"Tree",
"../Res/Assets/Models/GreenWorld/Tree"
);
}

Expand All @@ -155,37 +161,37 @@ namespace GW
//Shadow sprite
_spriteRenderer->AddSprite
(
glm::vec2(200.0f, 200.0f), //Size
glm::vec2(210.0f, 0.0f), //Position
_shadowRenderer->GetDepthTexture(), //Texture
Engine::ResourceManager::GetShader("SpriteShaderGreyscale") //Shader
glm::vec2(200.0f, 200.0f),
glm::vec2(210.0f, 0.0f),
_shadowRenderer->GetDepthTexture(),
Engine::ResourceManager::GetShader("SpriteShaderGreyscale")
);

//Reflect sprite
_spriteRenderer->AddSprite
(
glm::vec2(200.0f, 200.0f), //Size
glm::vec2(410.0f, 0.0f), //Position
_waterRenderer->GetReflectTexture(), //Texture
Engine::ResourceManager::GetShader("SpriteShader") //Shader
glm::vec2(200.0f, 200.0f),
glm::vec2(410.0f, 0.0f),
_waterRenderer->GetReflectTexture(),
Engine::ResourceManager::GetShader("SpriteShader")
);

//Refract sprite
_spriteRenderer->AddSprite
(
glm::vec2(200.0f, 200.0f), //Size
glm::vec2(610.0f, 0.0f), //Position
_waterRenderer->GetRefractTexture(), //Texture
Engine::ResourceManager::GetShader("SpriteShader") //Shader
glm::vec2(200.0f, 200.0f),
glm::vec2(610.0f, 0.0f),
_waterRenderer->GetRefractTexture(),
Engine::ResourceManager::GetShader("SpriteShader")
);

//Refract depth sprite
_spriteRenderer->AddSprite
(
glm::vec2(200.0f, 200.0f), //Size
glm::vec2(810.0f, 0.0f), //Position
_waterRenderer->GetRefractDepthTexture(), //Texture
Engine::ResourceManager::GetShader("SpriteShaderGreyscale") //Shader
glm::vec2(200.0f, 200.0f),
glm::vec2(810.0f, 0.0f),
_waterRenderer->GetRefractDepthTexture(),
Engine::ResourceManager::GetShader("SpriteShaderGreyscale")
);
}

Expand Down
1 change: 0 additions & 1 deletion Apps/GreenWorld/src/GreenWorldApp.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ namespace GW
Engine::ShadowRenderer* _shadowRenderer = nullptr;
Engine::SpriteRenderer* _spriteRenderer = nullptr;
Engine::WaterRenderer* _waterRenderer = nullptr;
Engine::ParticleRenderer* _smokeRenderer = nullptr;
Engine::Scope<GreenWorldInterface> _interface;
Engine::Scope<Engine::Audio> _audio;

Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# The MIT License #
================================================================================

Copyright (c) 2020-2023 - Tim Krueger (https://github.com/Zanget3u)
Copyright (c) 2020-2023 - Tim Krueger (https://github.com/Zang3th)

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
Expand Down
22 changes: 13 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,25 +44,29 @@
## Plans for future releases

### Graphical improvements

- Bloom
- Lensflare
- Raytracing
- Shadows and lighting in 2D

### Other

- Grass simulation
- Simulation of liquids

## Libraries (credits to the creators and contributors)

- [glad](https://github.com/Dav1dde/glad)
- [glfw](https://github.com/glfw/glfw)
- [easylogging++](https://github.com/amrayn/easyloggingpp)
- [glm](https://github.com/g-truc/glm)
- [stb_image](https://github.com/nothings/stb/blob/master/stb_image.h)
- [imgui](https://github.com/ocornut/imgui), [imgui::plot_var](https://github.com/ocornut/imgui/wiki/plot_var_example)
- [tinyobjloader](https://github.com/tinyobjloader/tinyobjloader)
- [miniaudio](https://github.com/mackron/miniaudio)
| **Library** | **Version** | **Commit** | **Updated in Engine** | **Functionality** |
|--------------------------------------------------------------------- |-------------|------------|-----------------------|-----------------------------|
| [imgui](https://github.com/ocornut/imgui) | 1.89.9 | c6e0284 | 20.09.2023 | GUI |
| [miniaudio](https://github.com/mackron/miniaudio) | 0.11.18 | 3898fff | 20.09.2023 | Audio |
| [stb_image](https://github.com/nothings/stb/blob/master/stb_image.h) | 2.28 | 3ecc60f | 20.09.2023 | Image loading |
| [tinyobjloader](https://github.com/tinyobjloader/tinyobjloader) | / | 853f059 | 20.09.2023 | Obj file loading |
| [GLFW](https://github.com/glfw/glfw) | 3.3.6 | 7d5a16c | 13.01.2022 | Window and input management |
| [glad](https://github.com/Dav1dde/glad) | 0.1.34 | a5ca31c | 11.08.2021 | OpenGL loader |
| [GLM](https://github.com/g-truc/glm) | 0.9.9.8 | bf71a83 | 23.07.2021 | Mathematics |
| [Easylogging++](https://github.com/amrayn/easyloggingpp) | 9.96.7 | 5181b40 | 19.07.2021 | Logging |

## Using & compiling (currently for linux with CMake)

Expand Down Expand Up @@ -91,4 +95,4 @@

### CellSim

![CellSim](Res/Screenshots/CellSim/Screenshot_CS_003.png)
![CellSim](Res/Screenshots/CellSim/Screenshot_CS_003.png)
2 changes: 1 addition & 1 deletion Vendor/Imgui/LICENSE_imgui
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2014-2021 Omar Cornut
Copyright (c) 2014-2022 Omar Cornut

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
Loading

0 comments on commit 0674510

Please sign in to comment.