Fix some includes in source/renderer

Make include-what-you-use happy with some files in source/renderer and
fix what needs to be fixed.

Ref: #8086
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
This commit is contained in:
Ralph Sennhauser 2025-07-06 20:15:27 +02:00
parent c2cc762616
commit e7f44ca6ca
No known key found for this signature in database
44 changed files with 281 additions and 158 deletions

View file

@ -24,14 +24,20 @@
#include "Profiler2GPU.h"
#include "lib/debug.h"
#include "lib/types.h"
#include "ps/ConfigDB.h"
#include "ps/Profiler2.h"
#include "ps/VideoMode.h"
#include "renderer/backend/IDevice.h"
#include "renderer/Renderer.h"
#include "renderer/backend/IDeviceCommandContext.h"
#include <cstddef>
#include <cstdint>
#include <deque>
#include <stack>
#include <iterator>
#include <string>
#include <utility>
#include <vector>
/**

View file

@ -20,18 +20,13 @@
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include "lib/code_annotation.h"
#include <memory>
class CProfiler2;
class CProfiler2GPUImpl;
namespace Renderer
{
namespace Backend
{
class IDeviceCommandContext;
}
}
namespace Renderer::Backend { class IDeviceCommandContext; }
/**
* Used by CProfiler2 for GPU profiling support.

View file

@ -20,6 +20,7 @@
#include "VideoMode.h"
#include "graphics/GameView.h"
#include "graphics/ShaderDefines.h"
#include "gui/GUIManager.h"
#include "lib/config2.h"
#include "lib/external_libraries/libsdl.h"

View file

@ -1,4 +1,4 @@
/* Copyright (C) 2009 Wildfire Games.
/* Copyright (C) 2025 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -22,8 +22,8 @@
#include "precompiled.h"
#include "AlphaMapCalculator.h"
#include <string.h>
#include <stdio.h>
#include "renderer/BlendShapes.h"
///////////////////////////////////////////////////////////////////////////////
// CAlphaMapCalculator: functionality for calculating which alpha blend map

View file

@ -1,4 +1,4 @@
/* Copyright (C) 2009 Wildfire Games.
/* Copyright (C) 2025 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -22,8 +22,7 @@
#ifndef INCLUDED_ALPHAMAPCALCULATOR
#define INCLUDED_ALPHAMAPCALCULATOR
#include <string.h>
#include "BlendShapes.h"
struct BlendShape8;
// defines for blendmap flipping/rotating
#define BLENDMAP_FLIPV 0x01

View file

@ -17,23 +17,29 @@
#include "precompiled.h"
#include "renderer/CPUSkinnedModelRenderer.h"
#include "CPUSkinnedModelRenderer.h"
#include "graphics/Color.h"
#include "graphics/LightEnv.h"
#include "graphics/MeshManager.h"
#include "graphics/Model.h"
#include "graphics/ModelDef.h"
#include "graphics/ShaderProgram.h"
#include "lib/bits.h"
#include "lib/sysdep/rtl.h"
#include "maths/Vector3D.h"
#include "graphics/RenderableObject.h"
#include "lib/debug.h"
#include "ps/containers/Span.h"
#include "ps/containers/StaticVector.h"
#include "renderer/ModelRenderer.h"
#include "renderer/Renderer.h"
#include "renderer/RenderModifiers.h"
#include "renderer/VertexArray.h"
#include "renderer/backend/Format.h"
#include "renderer/backend/IBuffer.h"
#include "renderer/backend/IDeviceCommandContext.h"
#include "renderer/backend/IShaderProgram.h"
#include <cstddef>
#include <cstdint>
#include <vector>
class CVector3D;
namespace
{

View file

@ -1,4 +1,4 @@
/* Copyright (C) 2024 Wildfire Games.
/* Copyright (C) 2025 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -22,6 +22,10 @@
#include <memory>
class CModel;
class CModelRData;
namespace Renderer::Backend { class IDeviceCommandContext; }
/**
* Render animated models using a ShaderRenderModifier.
* It calculates vertex data for models on the CPU side.

View file

@ -1,4 +1,4 @@
/* Copyright (C) 2023 Wildfire Games.
/* Copyright (C) 2025 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -20,8 +20,8 @@
#include "graphics/ShaderTechniquePtr.h"
#include "ps/CStrIntern.h"
#include "renderer/backend/IShaderProgram.h"
#include <cstddef>
#include <unordered_map>
#include <vector>
@ -30,7 +30,7 @@ class CBrush;
class CCamera;
class CMatrix3D;
class CVector3D;
namespace Renderer::Backend { class IVertexInputLayout; }
struct CColor;
// Helper for unoptimized rendering of geometrics primitives. Should not be

View file

@ -1,4 +1,4 @@
/* Copyright (C) 2023 Wildfire Games.
/* Copyright (C) 2025 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -19,18 +19,18 @@
#define INCLUDED_DECALRDATA
#include "graphics/RenderableObject.h"
#include "lib/code_annotation.h"
#include "maths/Vector2D.h"
#include "maths/Vector3D.h"
#include "renderer/backend/IDeviceCommandContext.h"
#include "renderer/backend/IShaderProgram.h"
#include "renderer/VertexBufferManager.h"
#include <vector>
class CModelDecal;
class CShaderDefines;
class CSimulation2;
class ShadowMap;
namespace Renderer::Backend { class IDeviceCommandContext; }
namespace Renderer::Backend { class IVertexInputLayout; }
class CDecalRData : public CRenderData
{

View file

@ -30,6 +30,7 @@
#include "ps/CLogger.h"
#include "ps/containers/StaticVector.h"
#include "ps/CStrInternStatic.h"
#include "renderer/ModelRenderer.h"
#include "renderer/RenderModifiers.h"
#include "renderer/Renderer.h"
#include "renderer/VertexArray.h"

View file

@ -1,4 +1,4 @@
/* Copyright (C) 2024 Wildfire Games.
/* Copyright (C) 2025 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -22,6 +22,11 @@
#include <memory>
class CModel;
class CModelRData;
namespace Renderer::Backend { class IDeviceCommandContext; }
namespace Renderer::Backend { class IShaderProgram; }
/**
* Render animated models using a ShaderRenderModifier.
* It calculates vertex data for models on the GPU side.

View file

@ -16,22 +16,32 @@
*/
#include "precompiled.h"
#include "renderer/InstancingModelRenderer.h"
#include "graphics/Color.h"
#include "graphics/LightEnv.h"
#include "InstancingModelRenderer.h"
#include "graphics/MeshManager.h"
#include "graphics/Model.h"
#include "graphics/ModelDef.h"
#include "lib/debug.h"
#include "lib/types.h"
#include "maths/Vector3D.h"
#include "maths/Vector4D.h"
#include "ps/CLogger.h"
#include "ps/containers/Span.h"
#include "ps/containers/StaticVector.h"
#include "ps/CStrInternStatic.h"
#include "renderer/ModelRenderer.h"
#include "renderer/Renderer.h"
#include "renderer/RenderModifiers.h"
#include "renderer/VertexArray.h"
#include "renderer/backend/Format.h"
#include "renderer/backend/IBuffer.h"
#include "renderer/backend/IDeviceCommandContext.h"
#include "renderer/backend/IShaderProgram.h"
#include "third_party/mikktspace/weldmesh.h"
#include <algorithm>
#include <cstddef>
#include <cstdint>
#include <memory>
#include <vector>
struct IModelDef : public CModelDefRPrivate
{

View file

@ -17,7 +17,15 @@
#include "precompiled.h"
#include "renderer/MikktspaceWrap.h"
#include "MikktspaceWrap.h"
#include "graphics/ModelDef.h"
#include "lib/types.h"
#include "maths/Vector2D.h"
#include "maths/Vector3D.h"
#include <cstddef>
#include <memory>
MikkTSpace::MikkTSpace(const CModelDefPtr& m, std::vector<float>& v, bool gpuSkinning) : m_Model(m),
m_NewVertices(v), m_GpuSkinning(gpuSkinning)

View file

@ -19,11 +19,12 @@
#define INCLUDED_MIKKWRAP
#include "graphics/MeshManager.h"
#include "graphics/ModelDef.h"
#include "third_party/mikktspace/mikktspace.h"
#include <vector>
struct SModelVertex;
class MikkTSpace
{

View file

@ -1,4 +1,4 @@
/* Copyright (C) 2022 Wildfire Games.
/* Copyright (C) 2025 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -24,13 +24,19 @@
#ifndef INCLUDED_MODELRENDERER
#define INCLUDED_MODELRENDERER
#include <memory>
#include "graphics/MeshManager.h"
#include "graphics/RenderableObject.h"
#include "graphics/SColor.h"
#include "renderer/backend/IDeviceCommandContext.h"
#include "renderer/VertexArray.h"
#include "lib/types.h"
#include <memory>
#include <vector>
class CModel;
class CShaderDefines;
class CVector3D;
namespace Renderer::Backend { class IDeviceCommandContext; }
struct SColor4ub;
template <typename T> class VertexArrayIterator;
class RenderModifier;
typedef std::shared_ptr<RenderModifier> RenderModifierPtr;
@ -44,9 +50,6 @@ typedef std::shared_ptr<ModelVertexRenderer> ModelVertexRendererPtr;
class ModelRenderer;
typedef std::shared_ptr<ModelRenderer> ModelRendererPtr;
class CModel;
class CShaderDefines;
/**
* Class CModelRData: Render data that is maintained per CModel.
* ModelRenderer implementations may derive from this class to store

View file

@ -1,4 +1,4 @@
/* Copyright (C) 2024 Wildfire Games.
/* Copyright (C) 2025 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -24,13 +24,13 @@
#define INCLUDED_MODELVERTEXRENDERER
#include "graphics/MeshManager.h"
#include "graphics/ShaderProgramPtr.h"
#include "ps/containers/Span.h"
#include "renderer/backend/IDeviceCommandContext.h"
#include "renderer/backend/IShaderProgram.h"
class CModel;
class CModelDef;
class CModelRData;
namespace PS { template <typename T> class span; }
namespace Renderer::Backend { class IDeviceCommandContext; }
namespace Renderer::Backend { class IShaderProgram; }
/**
* Class ModelVertexRenderer: Normal ModelRenderer implementations delegate

View file

@ -1,4 +1,4 @@
/* Copyright (C) 2022 Wildfire Games.
/* Copyright (C) 2025 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -19,16 +19,17 @@
#define INCLUDED_OVERLAYRENDERER
#include "graphics/ShaderProgram.h"
#include "renderer/backend/IDeviceCommandContext.h"
#include "lib/code_annotation.h"
class CCamera;
namespace Renderer::Backend { class IDeviceCommandContext; }
namespace Renderer::Backend { class IShaderProgram; }
struct OverlayRendererInternals;
struct SOverlayLine;
struct SOverlayTexturedLine;
struct SOverlaySprite;
struct SOverlayQuad;
struct SOverlaySphere;
class CCamera;
struct OverlayRendererInternals;
struct SOverlaySprite;
struct SOverlayTexturedLine;
/**
* Class OverlayRenderer: Render various bits of data that overlay the

View file

@ -1,4 +1,4 @@
/* Copyright (C) 2022 Wildfire Games.
/* Copyright (C) 2025 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -19,15 +19,32 @@
#include "ParticleRenderer.h"
#include "graphics/Camera.h"
#include "graphics/Color.h"
#include "graphics/ParticleEmitter.h"
#include "graphics/ParticleEmitterType.h"
#include "graphics/ShaderDefines.h"
#include "graphics/ShaderManager.h"
#include "graphics/TextureManager.h"
#include "graphics/ShaderTechnique.h"
#include "graphics/ShaderTechniquePtr.h"
#include "lib/debug.h"
#include "maths/BoundingBoxAligned.h"
#include "maths/Matrix3D.h"
#include "maths/Vector3D.h"
#include "ps/CStrIntern.h"
#include "ps/CStrInternStatic.h"
#include "ps/Profile.h"
#include "renderer/DebugRenderer.h"
#include "renderer/Renderer.h"
#include "renderer/SceneRenderer.h"
#include "renderer/backend/IDeviceCommandContext.h"
#include "renderer/backend/IShaderProgram.h"
#include <algorithm>
#include <iterator>
#include <memory>
#include <utility>
#include <vector>
struct ParticleRendererInternals
{

View file

@ -1,4 +1,4 @@
/* Copyright (C) 2022 Wildfire Games.
/* Copyright (C) 2025 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -18,10 +18,11 @@
#ifndef INCLUDED_PARTICLERENDERER
#define INCLUDED_PARTICLERENDERER
#include "renderer/backend/IDeviceCommandContext.h"
#include "lib/code_annotation.h"
class CParticleEmitter;
class CShaderDefines;
namespace Renderer::Backend { class IDeviceCommandContext; }
struct ParticleRendererInternals;
/**

View file

@ -1,4 +1,4 @@
/* Copyright (C) 2024 Wildfire Games.
/* Copyright (C) 2025 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -20,8 +20,8 @@
#include "renderer/PatchRData.h"
#include "graphics/GameView.h"
#include "graphics/LightEnv.h"
#include "graphics/LOSTexture.h"
#include "graphics/LightEnv.h"
#include "graphics/Patch.h"
#include "graphics/ShaderManager.h"
#include "graphics/Terrain.h"
@ -40,13 +40,14 @@
#include "ps/VideoMode.h"
#include "ps/World.h"
#include "renderer/AlphaMapCalculator.h"
#include "renderer/BlendShapes.h"
#include "renderer/DebugRenderer.h"
#include "renderer/Renderer.h"
#include "renderer/SceneRenderer.h"
#include "renderer/TerrainRenderer.h"
#include "renderer/WaterManager.h"
#include "simulation2/components/ICmpWaterManager.h"
#include "simulation2/Simulation2.h"
#include "simulation2/components/ICmpWaterManager.h"
#include <algorithm>
#include <numeric>

View file

@ -1,4 +1,4 @@
/* Copyright (C) 2023 Wildfire Games.
/* Copyright (C) 2025 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -20,20 +20,24 @@
#include "graphics/Patch.h"
#include "graphics/RenderableObject.h"
#include "lib/code_annotation.h"
#include "lib/types.h"
#include "maths/BoundingBoxAligned.h"
#include "maths/Vector2D.h"
#include "maths/Vector3D.h"
#include "renderer/backend/IDeviceCommandContext.h"
#include "renderer/backend/IShaderProgram.h"
#include "renderer/VertexBufferManager.h"
#include <cstddef>
#include <sys/types.h>
#include <vector>
class CPatch;
class CShaderDefines;
class CSimulation2;
class CTerrainTextureEntry;
class CTextRenderer;
class ShadowMap;
namespace Renderer::Backend { class IDeviceCommandContext; }
namespace Renderer::Backend { class IVertexInputLayout; }
//////////////////////////////////////////////////////////////////////////////////////////////////
// CPatchRData: class encapsulating logic for rendering terrain patches; holds per

View file

@ -1,4 +1,4 @@
/* Copyright (C) 2024 Wildfire Games.
/* Copyright (C) 2025 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -21,13 +21,18 @@
#include "graphics/ShaderTechniquePtr.h"
#include "ps/CStr.h"
#include "renderer/backend/IFramebuffer.h"
#include "renderer/backend/IDeviceCommandContext.h"
#include "renderer/backend/IShaderProgram.h"
#include "renderer/backend/ITexture.h"
#include <array>
#include <cstdint>
#include <memory>
#include <vector>
class CShaderTechnique;
namespace Renderer::Backend { class IDevice; }
namespace Renderer::Backend { class IDeviceCommandContext; }
namespace Renderer::Backend { class IVertexInputLayout; }
class CPostprocManager
{
public:

View file

@ -1,4 +1,4 @@
/* Copyright (C) 2023 Wildfire Games.
/* Copyright (C) 2025 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -17,21 +17,23 @@
#include "precompiled.h"
#include "renderer/RenderModifiers.h"
#include "RenderModifiers.h"
#include "graphics/GameView.h"
#include "graphics/LightEnv.h"
#include "graphics/Camera.h"
#include "graphics/LOSTexture.h"
#include "graphics/LightEnv.h"
#include "graphics/Model.h"
#include "graphics/TextureManager.h"
#include "maths/Vector3D.h"
#include "maths/Vector4D.h"
#include "maths/Matrix3D.h"
#include "maths/Vector3D.h"
#include "ps/CStrIntern.h"
#include "ps/CStrInternStatic.h"
#include "ps/Game.h"
#include "renderer/Renderer.h"
#include "renderer/Scene.h"
#include "renderer/SceneRenderer.h"
#include "renderer/ShadowMap.h"
#include "renderer/backend/IDeviceCommandContext.h"
#include "renderer/backend/IShaderProgram.h"
///////////////////////////////////////////////////////////////////////////////////////////////
// LitRenderModifier implementation

View file

@ -1,4 +1,4 @@
/* Copyright (C) 2022 Wildfire Games.
/* Copyright (C) 2025 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -28,15 +28,15 @@
#ifndef INCLUDED_RENDERMODIFIERS
#define INCLUDED_RENDERMODIFIERS
#include "ModelRenderer.h"
#include "graphics/Color.h"
#include "graphics/ShaderProgram.h"
#include "graphics/ShaderTechnique.h"
#include "graphics/Texture.h"
#include <cstdint>
class CLightEnv;
class CModel;
class ShadowMap;
namespace Renderer::Backend { class IDeviceCommandContext; }
namespace Renderer::Backend { class IShaderProgram; }
/**
* Class RenderModifier: Some ModelRenderer implementations provide vertex

View file

@ -53,6 +53,7 @@
#include "ps/VideoMode.h"
#include "renderer/backend/IDevice.h"
#include "renderer/DebugRenderer.h"
#include "renderer/ModelRenderer.h"
#include "renderer/PostprocManager.h"
#include "renderer/RenderingOptions.h"
#include "renderer/RenderModifiers.h"

View file

@ -1,4 +1,4 @@
/* Copyright (C) 2024 Wildfire Games.
/* Copyright (C) 2025 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -19,15 +19,10 @@
#define INCLUDED_RENDERER
#include "graphics/Camera.h"
#include "graphics/ShaderDefines.h"
#include "graphics/ShaderProgramPtr.h"
#include "ps/containers/Span.h"
#include "ps/Singleton.h"
#include "renderer/backend/IDeviceCommandContext.h"
#include "renderer/backend/IShaderProgram.h"
#include "renderer/RenderingOptions.h"
#include "renderer/Scene.h"
#include <cstring>
#include <memory>
class CDebugRenderer;
@ -38,6 +33,11 @@ class CShaderManager;
class CTextureManager;
class CTimeManager;
class CVertexBufferManager;
namespace PS { template <typename T> class span; }
namespace Renderer::Backend { class IDevice; }
namespace Renderer::Backend { class IDeviceCommandContext; }
namespace Renderer::Backend { class IVertexInputLayout; }
namespace Renderer::Backend { struct SVertexAttributeFormat; }
#define g_Renderer CRenderer::GetSingleton()

View file

@ -1,4 +1,4 @@
/* Copyright (C) 2022 Wildfire Games.
/* Copyright (C) 2025 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -28,11 +28,10 @@
#define INCLUDED_RENDERINGOPTIONS
#include "ps/CStr.h"
#include "ps/CStrIntern.h"
#include <memory>
class CRenderer;
class CStrIntern;
enum RenderPath
{

View file

@ -1,4 +1,4 @@
/* Copyright (C) 2023 Wildfire Games.
/* Copyright (C) 2025 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -17,10 +17,16 @@
#include "precompiled.h"
#include "renderer/Scene.h"
#include "Scene.h"
#include "graphics/Model.h"
#include "graphics/ModelAbstract.h"
#include "graphics/ParticleEmitter.h"
#include "lib/debug.h"
#include <cstddef>
#include <memory>
#include <vector>
///////////////////////////////////////////////////////////
// Default implementation traverses the model recursively and uses

View file

@ -1,4 +1,4 @@
/* Copyright (C) 2023 Wildfire Games.
/* Copyright (C) 2025 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -19,28 +19,24 @@
#define INCLUDED_RENDERER_SCENERENDERER
#include "graphics/Camera.h"
#include "graphics/ShaderDefines.h"
#include "graphics/ShaderProgramPtr.h"
#include "maths/BoundingBoxAligned.h"
#include "ps/Singleton.h"
#include "renderer/backend/IDeviceCommandContext.h"
#include "renderer/RenderingOptions.h"
#include "renderer/Scene.h"
#include <memory>
class CCanvas2D;
class CLightEnv;
class CMaterial;
class CMaterialManager;
class CModel;
class CParticleManager;
class CPatch;
class CShaderDefines;
class CSimulation2;
class CVector4D;
class ShadowMap;
class SkyManager;
class TerrainRenderer;
class WaterManager;
namespace Renderer::Backend { class IDevice; }
namespace Renderer::Backend { class IDeviceCommandContext; }
// rendering modes
enum ERenderMode { WIREFRAME, SOLID, EDGED_FACES };

View file

@ -1,4 +1,4 @@
/* Copyright (C) 2022 Wildfire Games.
/* Copyright (C) 2025 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -19,12 +19,13 @@
#define INCLUDED_SHADOWMAP
#include "renderer/backend/IDeviceCommandContext.h"
#include "renderer/backend/IShaderProgram.h"
class CBoundingBoxAligned;
class CCamera;
class CFrustum;
class CVector3D;
namespace Renderer::Backend { class IDevice; }
namespace Renderer::Backend { class IShaderProgram; }
struct ShadowMapInternals;

View file

@ -19,9 +19,12 @@
#include "SilhouetteRenderer.h"
#include "renderer/backend/IDeviceCommandContext.h"
#include "renderer/backend/IShaderProgram.h"
#include "graphics/Camera.h"
#include "graphics/HFTracer.h"
#include "graphics/Model.h"
#include "graphics/Overlay.h"
#include "graphics/Patch.h"
#include "graphics/ShaderManager.h"
#include "maths/MathUtil.h"

View file

@ -1,4 +1,4 @@
/* Copyright (C) 2023 Wildfire Games.
/* Copyright (C) 2025 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -18,16 +18,19 @@
#ifndef INCLUDED_SILHOUETTERENDERER
#define INCLUDED_SILHOUETTERENDERER
#include "graphics/Color.h"
#include "graphics/Overlay.h"
#include "graphics/ShaderTechniquePtr.h"
#include "maths/BoundingBoxAligned.h"
#include "renderer/backend/IDeviceCommandContext.h"
#include "renderer/backend/IShaderProgram.h"
#include <vector>
class CCamera;
class CModel;
class CPatch;
class SceneCollector;
namespace Renderer::Backend { class IDeviceCommandContext; }
namespace Renderer::Backend { class IVertexInputLayout; }
class SilhouetteRenderer
{

View file

@ -1,4 +1,4 @@
/* Copyright (C) 2023 Wildfire Games.
/* Copyright (C) 2025 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -25,13 +25,13 @@
#include "graphics/Texture.h"
#include "ps/CStr.h"
#include "renderer/VertexArray.h"
#include "renderer/backend/IDeviceCommandContext.h"
#include "renderer/backend/IShaderProgram.h"
#include "renderer/backend/ITexture.h"
#include <memory>
#include <vector>
namespace Renderer::Backend { class IDeviceCommandContext; }
namespace Renderer::Backend { class ITexture; }
namespace Renderer::Backend { class IVertexInputLayout; }
/**
* Class SkyManager: Maintain sky settings and textures, and render the sky.
*/

View file

@ -24,15 +24,20 @@
#define INCLUDED_TERRAINOVERLAY
#include "graphics/ShaderTechniquePtr.h"
#include "renderer/backend/ITexture.h"
#include "renderer/backend/IDeviceCommandContext.h"
#include "renderer/backend/IShaderProgram.h"
#include "renderer/backend/PipelineState.h"
#include "lib/code_annotation.h"
#include "lib/types.h"
#include <cstddef>
#include <memory>
#include <sys/types.h>
class CSimContext;
class CTerrain;
namespace Renderer::Backend { class IDeviceCommandContext; }
namespace Renderer::Backend { class ITexture; }
namespace Renderer::Backend { class IVertexInputLayout; }
struct CColor;
struct SColor4ub;
class CTerrain;
class CSimContext;
/**
* Common interface for terrain-tile-based and texture-based debug overlays.

View file

@ -1,4 +1,4 @@
/* Copyright (C) 2023 Wildfire Games.
/* Copyright (C) 2025 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -24,11 +24,8 @@
#define INCLUDED_TERRAINRENDERER
#include "graphics/Color.h"
#include "maths/BoundingBoxAligned.h"
#include "renderer/backend/IDeviceCommandContext.h"
#include "renderer/backend/ITexture.h"
#include "renderer/backend/IShaderProgram.h"
class CBoundingBoxAligned;
class CCamera;
class CCanvas2D;
class CModelDecal;
@ -36,9 +33,10 @@ class CPatch;
class CShaderDefines;
class CSimulation2;
class CVector2D;
class ShadowMap;
namespace Renderer::Backend { class IDeviceCommandContext; }
namespace Renderer::Backend { class IShaderProgram; }
namespace Renderer::Backend { class ITexture; }
struct TerrainRendererInternals;
/**

View file

@ -19,17 +19,33 @@
#include "TexturedLineRData.h"
#include "graphics/ShaderProgram.h"
#include "graphics/Color.h"
#include "graphics/Terrain.h"
#include "graphics/TextureManager.h"
#include "lib/debug.h"
#include "maths/Frustum.h"
#include "maths/MathUtil.h"
#include "maths/Quaternion.h"
#include "ps/CStrIntern.h"
#include "ps/CStrInternStatic.h"
#include "ps/containers/Span.h"
#include "renderer/OverlayRenderer.h"
#include "renderer/Renderer.h"
#include "simulation2/Simulation2.h"
#include "simulation2/system/SimContext.h"
#include "renderer/VertexBuffer.h"
#include "renderer/backend/Format.h"
#include "renderer/backend/IBuffer.h"
#include "renderer/backend/IDeviceCommandContext.h"
#include "renderer/backend/IShaderProgram.h"
#include "simulation2/components/ICmpWaterManager.h"
#include "simulation2/system/CmpPtr.h"
#include "simulation2/system/Entity.h"
#include "simulation2/system/SimContext.h"
#include <array>
#include <cmath>
#include <cstddef>
#include <cstdint>
#include <memory>
/* Note: this implementation uses CVertexBufferManager directly rather than access it through the nicer VertexArray interface,
* because it allows you to work with variable amounts of vertices and indices more easily. New code should prefer

View file

@ -1,4 +1,4 @@
/* Copyright (C) 2023 Wildfire Games.
/* Copyright (C) 2025 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -20,14 +20,19 @@
#include "graphics/Overlay.h"
#include "graphics/RenderableObject.h"
#include "graphics/ShaderProgram.h"
#include "graphics/TextureManager.h"
#include "lib/code_annotation.h"
#include "lib/types.h"
#include "maths/BoundingBoxAligned.h"
#include "renderer/backend/IDeviceCommandContext.h"
#include "renderer/backend/IShaderProgram.h"
#include "maths/Vector2D.h"
#include "maths/Vector3D.h"
#include "renderer/VertexBufferManager.h"
#include <vector>
class CFrustum;
namespace Renderer::Backend { class IDeviceCommandContext; }
namespace Renderer::Backend { class IShaderProgram; }
namespace Renderer::Backend { class IVertexInputLayout; }
/**
* Rendering data for an STexturedOverlayLine.

View file

@ -1,4 +1,4 @@
/* Copyright (C) 2024 Wildfire Games.
/* Copyright (C) 2025 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -18,13 +18,20 @@
#ifndef INCLUDED_VERTEXARRAY
#define INCLUDED_VERTEXARRAY
#include "lib/debug.h"
#include "lib/types.h"
#include "renderer/VertexBuffer.h"
#include "renderer/VertexBufferManager.h"
#include "renderer/backend/Format.h"
#include "renderer/backend/IBuffer.h"
#include "renderer/backend/IDeviceCommandContext.h"
#include "renderer/VertexBufferManager.h"
#include <cstddef>
#include <cstdint>
#include <sys/types.h>
#include <vector>
namespace Renderer::Backend { class IDeviceCommandContext; }
// Iterator
template<typename T>
class VertexArrayIterator

View file

@ -1,4 +1,4 @@
/* Copyright (C) 2024 Wildfire Games.
/* Copyright (C) 2025 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -21,8 +21,9 @@
#include "lib/sysdep/cpu.h"
#include "ps/CLogger.h"
#include "renderer/backend/IDevice.h"
#include "renderer/Renderer.h"
#include "renderer/backend/IDevice.h"
#include "renderer/backend/IDeviceCommandContext.h"
#include <algorithm>
#include <cstring>

View file

@ -1,4 +1,4 @@
/* Copyright (C) 2024 Wildfire Games.
/* Copyright (C) 2025 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -22,13 +22,17 @@
#ifndef INCLUDED_VERTEXBUFFER
#define INCLUDED_VERTEXBUFFER
#include "lib/code_annotation.h"
#include "renderer/backend/IBuffer.h"
#include "renderer/backend/IDevice.h"
#include "renderer/backend/IDeviceCommandContext.h"
#include <cstddef>
#include <cstdint>
#include <memory>
#include <vector>
namespace Renderer::Backend { class IDevice; }
namespace Renderer::Backend { class IDeviceCommandContext; }
/**
* CVertexBuffer: encapsulation of backend buffers, also supplying
* some additional functionality for sharing buffers between multiple objects.

View file

@ -1,4 +1,4 @@
/* Copyright (C) 2024 Wildfire Games.
/* Copyright (C) 2025 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -24,11 +24,16 @@
#include "lib/types.h"
#include "renderer/VertexBuffer.h"
#include "renderer/backend/IBuffer.h"
#include <cstddef>
#include <cstdint>
#include <memory>
#include <utility>
#include <vector>
namespace Renderer::Backend { class IDevice; }
// CVertexBufferManager: owner object for CVertexBuffer objects; acts as
// 'front end' for their allocation and destruction
class CVertexBufferManager

View file

@ -17,18 +17,18 @@
#include "precompiled.h"
#include "simulation2/system/Component.h"
#include "ICmpOverlayRenderer.h"
#include "ICmpPosition.h"
#include "ICmpRangeManager.h"
#include "simulation2/MessageTypes.h"
#include "graphics/Overlay.h"
#include "graphics/TextureManager.h"
#include "renderer/Renderer.h"
#include "ps/CLogger.h"
#include "ps/Profile.h"
#include "renderer/Renderer.h"
#include "renderer/Scene.h"
#include "simulation2/MessageTypes.h"
#include "simulation2/components/ICmpPosition.h"
#include "simulation2/components/ICmpRangeManager.h"
#include "simulation2/system/Component.h"
class CCmpOverlayRenderer final : public ICmpOverlayRenderer
{

View file

@ -16,12 +16,14 @@
*/
#include "precompiled.h"
#include "CCmpRallyPointRenderer.h"
#include "ICmpIdentity.h"
#include "ps/algorithm.h"
#include "CCmpRallyPointRenderer.h"
#include "ps/Profile.h"
#include "ps/algorithm.h"
#include "renderer/Scene.h"
#include "renderer/backend/Sampler.h"
#include "simulation2/components/ICmpIdentity.h"
#include "simulation2/components/ICmpRangeManager.h"
#include "simulation2/helpers/Los.h"

View file

@ -22,6 +22,7 @@
#include "graphics/Overlay.h"
#include "graphics/TextureManager.h"
#include "renderer/Renderer.h"
#include "renderer/Scene.h"
#include "simulation2/MessageTypes.h"
#include "simulation2/components/ICmpOwnership.h"
#include "simulation2/components/ICmpPlayer.h"