Skip to content

Commit

Permalink
[misc] fixed a header leak (and reduced compilation time)
Browse files Browse the repository at this point in the history
  • Loading branch information
PanosK92 committed Jan 23, 2025
1 parent a034fe7 commit 97b470d
Show file tree
Hide file tree
Showing 14 changed files with 19 additions and 9 deletions.
3 changes: 2 additions & 1 deletion editor/Widgets/FileDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "FileDialog.h"
#include "../ImGui/Source/imgui_internal.h"
#include "../ImGui/Source/imgui_stdlib.h"
#include "Rendering/Mesh.h"
#include "../Widgets/Viewport.h"
#include "Rendering/Mesh.h"
#include <Rendering/Material.h>
//=========================================

//= NAMESPACES ===============
Expand Down
1 change: 1 addition & 0 deletions runtime/Game/Game.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "../Core/ProgressTracker.h"
#include "../Rendering/Mesh.h"
#include "../Rendering/Renderer.h"
#include "../Rendering/Material.h"
#include "../Resource/ResourceCache.h"
#include "../Input/Input.h"
//============================================
Expand Down
1 change: 1 addition & 0 deletions runtime/Math/BoundingBox.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//= INCLUDES =======
#include "Helper.h"
#include "Vector3.h"
#include <array>
//==================

namespace spartan
Expand Down
3 changes: 2 additions & 1 deletion runtime/Rendering/Mesh.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,15 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//= INCLUDES =====================
#include <vector>
#include <mutex>
#include "Material.h"
#include "../RHI/RHI_Vertex.h"
#include "../Math/BoundingBox.h"
#include "../Resource/IResource.h"
//================================

namespace spartan
{
class RHI_Buffer;

enum class MeshFlags : uint32_t
{
ImportRemoveRedundantData = 1 << 0,
Expand Down
1 change: 1 addition & 0 deletions runtime/Rendering/Renderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//= INCLUDES ===============================
#include "pch.h"
#include "Renderer.h"
#include "Material.h"
#include "ThreadPool.h"
#include "ProgressTracker.h"
#include "../Profiling/RenderDoc.h"
Expand Down
3 changes: 1 addition & 2 deletions runtime/Rendering/Renderer.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

namespace spartan
{
//= FWD DECLARATIONS =
class Material;
class Entity;
class Camera;
class Light;
Expand All @@ -44,7 +44,6 @@ namespace spartan
class BoundingBox;
class Frustum;
}
//====================

class Renderer
{
Expand Down
1 change: 1 addition & 0 deletions runtime/Rendering/Renderer_Passes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "../RHI/RHI_CommandList.h"
#include "../RHI/RHI_Buffer.h"
#include "../RHI/RHI_Shader.h"
#include "../Rendering/Material.h"
#ifdef _MSC_VER
#include "../RHI/RHI_FidelityFX.h"
#endif
Expand Down
1 change: 1 addition & 0 deletions runtime/Rendering/Renderer_Resources.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "pch.h"
#include "Window.h"
#include "Renderer.h"
#include "Material.h"
#include "../Core/GeometryProcessing.h"
#include "../World/Components/Light.h"
#include "../Resource/ResourceCache.h"
Expand Down
1 change: 1 addition & 0 deletions runtime/Resource/IResource.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "../Rendering/Font/Font.h"
#include "../Rendering/Animation.h"
#include "../Rendering/Mesh.h"
#include "../Rendering/Material.h"
//=================================

//= NAMESPACES ==========
Expand Down
1 change: 1 addition & 0 deletions runtime/Resource/Import/ModelImporter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "../../RHI/RHI_Texture.h"
#include "../../Rendering/Animation.h"
#include "../../Rendering/Mesh.h"
#include "../../Rendering/Material.h"
#include "../../World/World.h"
#include "../../World/Entity.h"
#include "../../World/Components/Light.h"
Expand Down
5 changes: 3 additions & 2 deletions runtime/Resource/ResourceCache.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,12 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

#pragma once

//= INCLUDES ==============
//= INCLUDES =====================
#include "IResource.h"
#include "../Logging/Log.h"
#include <mutex>
//=========================
#include "../Rendering/Material.h"
//================================

namespace spartan
{
Expand Down
3 changes: 1 addition & 2 deletions runtime/World/Components/Light.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

namespace spartan
{
//= FWD DECLARATIONS =
class Camera;
//====================
class RHI_Texture;

enum class LightType
{
Expand Down
3 changes: 2 additions & 1 deletion runtime/World/Components/Renderable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,11 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "pch.h"
#include "Renderable.h"
#include "../Entity.h"
#include "../Rendering/Renderer.h"
#include "../RHI/RHI_Buffer.h"
#include "../../IO/FileStream.h"
#include "../../Resource/ResourceCache.h"
#include "../../Rendering/Renderer.h"
#include "../../Rendering/Material.h"
#include "../../Rendering/GridPartitioning.h"
//===========================================

Expand Down
1 change: 1 addition & 0 deletions runtime/World/Components/Terrain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "../../IO/FileStream.h"
#include "../../Resource/ResourceCache.h"
#include "../../Rendering/Mesh.h"
#include "../../Rendering/Material.h"
#include "../../Core/ThreadPool.h"
#include "../../Core/ProgressTracker.h"
#include "../../Core/GeometryProcessing.h"
Expand Down

0 comments on commit 97b470d

Please sign in to comment.