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 #define HEADER_ABSTRACT_RENDERER_HPP
#include "graphics/gl_headers.hpp" #include "graphics/gl_headers.hpp"
#include <irrlicht.h>
#include <memory> #include <memory>
#include <string> #include <string>
#include <vector> #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; class RenderTarget;
enum TypeRTT : unsigned int; enum TypeRTT : unsigned int;

View File

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

View File

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

View File

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

View File

@ -19,7 +19,19 @@
#define HEADER_LIGHTING_PASSES_HPP #define HEADER_LIGHTING_PASSES_HPP
#include "graphics/gl_headers.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 FrameBuffer;
class PostProcessing; class PostProcessing;

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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