Remove irrlicht.h in graphics code

This commit is contained in:
Benau 2022-11-16 10:54:38 +08:00
parent 8fb52db8f2
commit 0a1e22451b
24 changed files with 93 additions and 10 deletions

View File

@ -19,11 +19,26 @@
#define HEADER_ABSTRACT_RENDERER_HPP
#include "graphics/gl_headers.hpp"
#include <irrlicht.h>
#include <memory>
#include <string>
#include <vector>
#include <dimension2d.h>
#include <vector2d.h>
#include <vector3d.h>
namespace irr
{
namespace scene
{
class ISceneNode; class ISkinnedMesh; class ICameraSceneNode;
}
namespace video
{
class SColorf;
}
}
class RenderTarget;
enum TypeRTT : unsigned int;

View File

@ -27,6 +27,9 @@
#include <algorithm>
#ifndef SERVER_ONLY
#include <ICameraSceneNode.h>
#include <ISceneManager.h>
#include "graphics/texture_shader.hpp"
// ============================================================================

View File

@ -20,11 +20,22 @@
#ifndef SERVER_ONLY
#include "graphics/gl_headers.hpp"
#include <irrlicht.h>
#include <vector>
#include <irrArray.h>
#include <plane3d.h>
#include <vector3d.h>
using namespace irr;
namespace irr
{
namespace scene
{
class ISceneNode; class ICameraSceneNode;
}
}
class ShadowMatrices;
class DrawCalls

View File

@ -88,8 +88,6 @@
#include "utils/translation.hpp"
#include "utils/vs.hpp"
#include <irrlicht.h>
#if !defined(SERVER_ONLY) && defined(ANDROID)
#include <SDL.h>
#if SDL_VERSION_ATLEAST(2, 0, 9)

View File

@ -19,7 +19,19 @@
#define HEADER_LIGHTING_PASSES_HPP
#include "graphics/gl_headers.hpp"
#include <irrlicht.h>
#include <vector3d.h>
namespace irr
{
namespace scene
{
class ICameraSceneNode;
}
namespace video
{
class SColorf;
}
}
class FrameBuffer;
class PostProcessing;

View File

@ -29,10 +29,10 @@ namespace irr
}
using namespace irr;
#include <irrlicht.h>
#include <string>
#include <vector>
#include <map>
#include <EMaterialTypes.h>
class Material;
class XMLReader;

View File

@ -19,7 +19,6 @@
#include "utils/log.hpp"
#include "utils/vec3.hpp"
#include <irrlicht.h>
#include <IMesh.h>
#include <IMeshBuffer.h>
#include <SSkinMeshBuffer.h>

View File

@ -24,6 +24,7 @@
#include "graphics/rtts.hpp"
#include "graphics/shader_based_renderer.hpp"
#include <ISceneManager.h>
//-----------------------------------------------------------------------------
GL1RenderTarget::GL1RenderTarget(const irr::core::dimension2du &dimension,

View File

@ -18,13 +18,26 @@
#ifndef HEADER_RENDER_TARGET_HPP
#define HEADER_RENDER_TARGET_HPP
#include <irrlicht.h>
#include <dimension2d.h>
#include <rect.h>
#include <string>
class FrameBuffer;
class RTT;
class ShaderBasedRenderer;
namespace irr
{
namespace scene
{
class ICameraSceneNode; class ISceneNode;
}
namespace video
{
class ITexture; class SColor;
}
}
class RenderTarget
{
public:

View File

@ -37,6 +37,14 @@ class Skybox;
class SphericalHarmonics;
class PostProcessing;
namespace irr
{
namespace video
{
class IImage;
}
}
class ShaderBasedRenderer: public AbstractRenderer
{
private:

View File

@ -31,6 +31,7 @@
#ifndef SERVER_ONLY
#include <array>
#include <IMeshSceneNode.h>
#include <SMesh.h>
#include <SMeshBuffer.h>

View File

@ -38,6 +38,7 @@
#ifndef SERVER_ONLY
#include <IMeshSceneNode.h>
#include <SMesh.h>
#include <SMeshBuffer.h>
#include <ge_render_info.hpp>

View File

@ -39,6 +39,11 @@
#include "utils/constants.hpp"
#include "mini_glm.hpp"
#include <IMeshCache.h>
#include <ISceneManager.h>
#include <SMeshBuffer.h>
#include <SMesh.h>
#ifndef SERVER_ONLY
#include <ge_main.hpp>
#include <ge_render_info.hpp>

View File

@ -29,6 +29,9 @@
#include "utils/log.hpp"
#include "utils/string_utils.hpp"
#include <IImageLoader.h>
#include <IWriteFile.h>
#if !(defined(SERVER_ONLY) || defined(MOBILE_STK))
#include <squish.h>
static_assert(squish::kColourClusterFit == (1 << 5), "Wrong header");

View File

@ -26,7 +26,6 @@
#include <algorithm>
#include <cassert>
#include <irrlicht.h>
#if __SSE2__ || _M_X64 || _M_IX86_FP >= 2
#include <emmintrin.h>

View File

@ -25,6 +25,7 @@
#include <cmath>
#include "../../lib/irrlicht/source/Irrlicht/os.h"
#include <ISceneManager.h>
// ----------------------------------------------------------------------------
std::vector<float> STKParticle::m_flips_data;

View File

@ -26,8 +26,12 @@
#include <ge_spm.hpp>
#include <ge_spm_buffer.hpp>
#include <sstream>
#include <IMeshBuffer.h>
#include <ICameraSceneNode.h>
#include <IMeshCache.h>
#include <IMeshSceneNode.h>
#include <ISceneManager.h>
#include <ITexture.h>
#include <SMeshBuffer.h>
// ----------------------------------------------------------------------------
STKTextBillboard::STKTextBillboard(const video::SColor& color_top,

View File

@ -31,6 +31,7 @@
#include <algorithm>
#include <string>
#include <IGUIEnvironment.h>
using namespace GUIEngine;
// ============================================================================

View File

@ -31,6 +31,7 @@
#include <IGUIImage.h>
#include "../../../lib/irrlicht/source/Irrlicht/CGUIButton.h"
#include <IGUIStaticText.h>
using namespace GUIEngine;
using namespace irr::core;

View File

@ -36,6 +36,7 @@
#include "utils/constants.hpp"
#include "utils/string_utils.hpp"
#include <IBillboardSceneNode.h>
#include <IMeshSceneNode.h>
#include <ISceneManager.h>

View File

@ -36,6 +36,7 @@
#include "utils/string_utils.hpp"
#include <array>
#include <IMeshSceneNode.h>
#include <SMesh.h>
#include <SMeshBuffer.h>

View File

@ -38,6 +38,8 @@
#include "utils/translation.hpp"
#include <algorithm>
#include <IAnimatedMeshSceneNode.h>
#include <ISceneManager.h>
const float g_capture_length = 2.0f;
const int g_captured_score = 10;

View File

@ -25,6 +25,8 @@
#include "LinearMath/btQuaternion.h"
#include <ge_render_info.hpp>
#include <IAnimatedMeshSceneNode.h>
#include <ISceneManager.h>
// ============================================================================
// Position offset to attach in kart model

View File

@ -54,6 +54,7 @@
#include <algorithm>
#include <iostream>
#include <sstream>
#include <IGUIScrollBar.h>
using namespace GUIEngine;
using namespace Online;