mirror of
https://github.com/luanti-org/luanti.git
synced 2025-09-15 18:57:08 +00:00
Debloat IVideoDriver and IrrlichtDevice includes (#15080)
As the project grows, compile time will not go down unless the header mess is cleaned up one by one to only include exactly what's needed.
This commit is contained in:
parent
a6ba5304c4
commit
efd7792add
35 changed files with 139 additions and 79 deletions
|
@ -38,6 +38,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
#include "script/scripting_client.h"
|
||||
#include "gettext.h"
|
||||
#include <SViewFrustum.h>
|
||||
#include <IVideoDriver.h>
|
||||
|
||||
#define CAMERA_OFFSET_STEP 200
|
||||
#define WIELDMESH_OFFSET_X 55.0f
|
||||
|
|
|
@ -22,6 +22,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
#include "client/mesh.h"
|
||||
#include "mapblock_mesh.h"
|
||||
#include <IMaterialRenderer.h>
|
||||
#include <IVideoDriver.h>
|
||||
#include <matrix4.h>
|
||||
#include "mapsector.h"
|
||||
#include "mapblock.h"
|
||||
|
@ -192,6 +193,13 @@ void ClientMap::OnRegisterSceneNode()
|
|||
// we have other way to find it
|
||||
}
|
||||
|
||||
void ClientMap::render()
|
||||
{
|
||||
video::IVideoDriver* driver = SceneManager->getVideoDriver();
|
||||
driver->setTransform(video::ETS_WORLD, AbsoluteTransformation);
|
||||
renderMap(driver, SceneManager->getSceneNodeRenderPass());
|
||||
}
|
||||
|
||||
void ClientMap::getBlocksInViewRange(v3s16 cam_pos_nodes,
|
||||
v3s16 *p_blocks_min, v3s16 *p_blocks_max, float range)
|
||||
{
|
||||
|
|
|
@ -75,12 +75,7 @@ public:
|
|||
|
||||
virtual void OnRegisterSceneNode() override;
|
||||
|
||||
virtual void render() override
|
||||
{
|
||||
video::IVideoDriver* driver = SceneManager->getVideoDriver();
|
||||
driver->setTransform(video::ETS_WORLD, AbsoluteTransformation);
|
||||
renderMap(driver, SceneManager->getSceneNodeRenderPass());
|
||||
}
|
||||
virtual void render() override;
|
||||
|
||||
virtual const aabb3f &getBoundingBox() const override
|
||||
{
|
||||
|
|
|
@ -22,6 +22,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
#include <cassert>
|
||||
#include <vector>
|
||||
#include <algorithm>
|
||||
#include <IVideoDriver.h>
|
||||
|
||||
// Simple 2D bitmap class with just the functionality needed here
|
||||
class Bitmap {
|
||||
|
|
|
@ -20,6 +20,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
|
||||
#include "anaglyph.h"
|
||||
#include "client/camera.h"
|
||||
#include <IrrlichtDevice.h>
|
||||
|
||||
|
||||
/// SetColorMaskStep step
|
||||
|
|
|
@ -21,6 +21,11 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
#pragma once
|
||||
#include "irrlichttypes_extrabloated.h"
|
||||
|
||||
namespace irr
|
||||
{
|
||||
class IrrlichtDevice;
|
||||
}
|
||||
|
||||
class ShadowRenderer;
|
||||
class Camera;
|
||||
class Client;
|
||||
|
|
|
@ -19,6 +19,8 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
#pragma once
|
||||
|
||||
#include "irrlichttypes_extrabloated.h"
|
||||
#include <IrrlichtDevice.h> // used in all render/*.cpp
|
||||
#include <IVideoDriver.h> // used in all render/*.cpp
|
||||
|
||||
#include <vector>
|
||||
#include <memory>
|
||||
|
@ -31,6 +33,11 @@ class Client;
|
|||
class Hud;
|
||||
class ShadowRenderer;
|
||||
|
||||
namespace irr::video
|
||||
{
|
||||
class IRenderTarget;
|
||||
}
|
||||
|
||||
struct PipelineContext
|
||||
{
|
||||
PipelineContext(IrrlichtDevice *_device, Client *_client, Hud *_hud, ShadowRenderer *_shadow_renderer, video::SColor _color, v2u32 _target_size)
|
||||
|
|
|
@ -29,6 +29,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
#include "client/render/core.h"
|
||||
// include the shadow mapper classes too
|
||||
#include "client/shadows/dynamicshadowsrender.h"
|
||||
#include <IVideoDriver.h>
|
||||
|
||||
#ifdef SERVER
|
||||
#error Do not include in server builds
|
||||
|
|
|
@ -24,6 +24,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
#include "client/clientenvironment.h"
|
||||
#include "client/clientmap.h"
|
||||
#include "client/camera.h"
|
||||
#include <IVideoDriver.h>
|
||||
|
||||
using m4f = core::matrix4;
|
||||
|
||||
|
|
|
@ -32,6 +32,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
#include "EShaderTypes.h"
|
||||
#include "IGPUProgrammingServices.h"
|
||||
#include "IMaterialRenderer.h"
|
||||
#include <IVideoDriver.h>
|
||||
|
||||
ShadowRenderer::ShadowRenderer(IrrlichtDevice *device, Client *client) :
|
||||
m_smgr(device->getSceneManager()), m_driver(device->getVideoDriver()),
|
||||
|
|
|
@ -21,6 +21,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <IrrlichtDevice.h>
|
||||
#include "irrlichttypes_extrabloated.h"
|
||||
#include "client/shadows/dynamicshadows.h"
|
||||
|
||||
|
|
|
@ -18,6 +18,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
*/
|
||||
|
||||
#include "shadowsScreenQuad.h"
|
||||
#include <IVideoDriver.h>
|
||||
|
||||
shadowScreenQuad::shadowScreenQuad()
|
||||
{
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
#include "util/string.h"
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <ITexture.h>
|
||||
|
||||
GUIAnimatedImage::GUIAnimatedImage(gui::IGUIEnvironment *env, gui::IGUIElement *parent,
|
||||
s32 id, const core::rect<s32> &rectangle) :
|
||||
|
|
|
@ -18,6 +18,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
*/
|
||||
|
||||
#include "guiBox.h"
|
||||
#include <IVideoDriver.h>
|
||||
|
||||
GUIBox::GUIBox(gui::IGUIEnvironment *env, gui::IGUIElement *parent, s32 id,
|
||||
const core::rect<s32> &rectangle,
|
||||
|
|
|
@ -37,6 +37,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
#include "util/string.h"
|
||||
#include "util/enriched_string.h"
|
||||
#include "StyleSpec.h"
|
||||
#include <ICursorControl.h> // gui::ECURSOR_ICON
|
||||
#include <IGUIStaticText.h>
|
||||
|
||||
class InventoryManager;
|
||||
|
|
|
@ -21,6 +21,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
#include "guiFormSpecMenu.h"
|
||||
#include "client/hud.h"
|
||||
#include "client/client.h"
|
||||
#include <IVideoDriver.h>
|
||||
|
||||
GUIInventoryList::GUIInventoryList(gui::IGUIEnvironment *env,
|
||||
gui::IGUIElement *parent,
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
#include <IGUIButton.h>
|
||||
#include <IGUIStaticText.h>
|
||||
#include <IGUIFont.h>
|
||||
#include <IVideoDriver.h>
|
||||
#include "settings.h"
|
||||
#include <algorithm>
|
||||
|
||||
|
|
|
@ -20,6 +20,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|||
#include "guiEditBoxWithScrollbar.h"
|
||||
#include <IGUIEditBox.h>
|
||||
#include <IGUIFont.h>
|
||||
#include <IVideoDriver.h>
|
||||
#include "client/renderingengine.h"
|
||||
#include "porting.h"
|
||||
#include "gettext.h"
|
||||
|
|
|
@ -24,6 +24,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|||
#include <IGUIButton.h>
|
||||
#include <IGUIStaticText.h>
|
||||
#include <IGUIFont.h>
|
||||
#include <IVideoDriver.h>
|
||||
|
||||
#include "porting.h"
|
||||
#include "gettext.h"
|
||||
|
|
|
@ -21,6 +21,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
|
||||
#include <SViewFrustum.h>
|
||||
#include <IAnimatedMeshSceneNode.h>
|
||||
#include <IVideoDriver.h>
|
||||
#include "porting.h"
|
||||
|
||||
GUIScene::GUIScene(gui::IGUIEnvironment *env, scene::ISceneManager *smgr,
|
||||
|
|
|
@ -27,6 +27,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|||
#include <IGUIButton.h>
|
||||
#include <IGUIStaticText.h>
|
||||
#include <IGUIFont.h>
|
||||
#include <IVideoDriver.h>
|
||||
#include "settings.h"
|
||||
|
||||
#include "gettext.h"
|
||||
|
|
|
@ -20,6 +20,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
|
||||
#include "porting.h"
|
||||
#include "profilergraph.h"
|
||||
#include "IVideoDriver.h"
|
||||
#include "util/string.h"
|
||||
|
||||
void ProfilerGraph::put(const Profiler::GraphValues &values)
|
||||
|
|
|
@ -23,9 +23,12 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
#include <deque>
|
||||
#include <utility>
|
||||
#include <IGUIFont.h>
|
||||
#include <IVideoDriver.h>
|
||||
#include "profiler.h"
|
||||
|
||||
namespace irr::video {
|
||||
class IVideoDriver;
|
||||
}
|
||||
|
||||
/* Profiler display */
|
||||
class ProfilerGraph
|
||||
{
|
||||
|
|
|
@ -34,6 +34,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
#include "gettext.h"
|
||||
#include "IGUIStaticText.h"
|
||||
#include "IGUIFont.h"
|
||||
#include <IrrlichtDevice.h>
|
||||
#include <ISceneCollisionManager.h>
|
||||
|
||||
#include <iostream>
|
||||
|
|
|
@ -25,7 +25,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
#include <IEventReceiver.h>
|
||||
#include <IGUIImage.h>
|
||||
#include <IGUIEnvironment.h>
|
||||
#include <IrrlichtDevice.h>
|
||||
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
|
@ -35,6 +34,11 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
#include "itemdef.h"
|
||||
#include "client/game.h"
|
||||
|
||||
namespace irr
|
||||
{
|
||||
class IrrlichtDevice;
|
||||
}
|
||||
|
||||
using namespace irr;
|
||||
using namespace irr::core;
|
||||
using namespace irr::gui;
|
||||
|
|
|
@ -24,7 +24,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
#ifndef SERVER
|
||||
#include <IMesh.h>
|
||||
#include <IImage.h>
|
||||
#include <IrrlichtDevice.h>
|
||||
#include <IMeshSceneNode.h>
|
||||
#include <IDummyTransformationSceneNode.h>
|
||||
#include <SMesh.h>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue