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
75
irr/include/EVideoTypes.h
Normal file
75
irr/include/EVideoTypes.h
Normal file
|
@ -0,0 +1,75 @@
|
|||
// Copyright (C) 2002-2012 Nikolaus Gebhardt
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "SMaterial.h" // MATERIAL_MAX_TEXTURES
|
||||
|
||||
namespace irr::video
|
||||
{
|
||||
|
||||
//! enumeration for geometry transformation states
|
||||
enum E_TRANSFORMATION_STATE
|
||||
{
|
||||
//! View transformation
|
||||
ETS_VIEW = 0,
|
||||
//! World transformation
|
||||
ETS_WORLD,
|
||||
//! Projection transformation
|
||||
ETS_PROJECTION,
|
||||
//! Texture 0 transformation
|
||||
//! Use E_TRANSFORMATION_STATE(ETS_TEXTURE_0 + texture_number) to access other texture transformations
|
||||
ETS_TEXTURE_0,
|
||||
//! Only used internally
|
||||
ETS_COUNT = ETS_TEXTURE_0 + MATERIAL_MAX_TEXTURES
|
||||
};
|
||||
|
||||
//! Special render targets, which usually map to dedicated hardware
|
||||
/** These render targets (besides 0 and 1) need not be supported by gfx cards */
|
||||
enum E_RENDER_TARGET
|
||||
{
|
||||
//! Render target is the main color frame buffer
|
||||
ERT_FRAME_BUFFER = 0,
|
||||
//! Render target is a render texture
|
||||
ERT_RENDER_TEXTURE,
|
||||
//! Multi-Render target textures
|
||||
ERT_MULTI_RENDER_TEXTURES,
|
||||
//! Render target is the main color frame buffer
|
||||
ERT_STEREO_LEFT_BUFFER,
|
||||
//! Render target is the right color buffer (left is the main buffer)
|
||||
ERT_STEREO_RIGHT_BUFFER,
|
||||
//! Render to both stereo buffers at once
|
||||
ERT_STEREO_BOTH_BUFFERS,
|
||||
//! Auxiliary buffer 0
|
||||
ERT_AUX_BUFFER0,
|
||||
//! Auxiliary buffer 1
|
||||
ERT_AUX_BUFFER1,
|
||||
//! Auxiliary buffer 2
|
||||
ERT_AUX_BUFFER2,
|
||||
//! Auxiliary buffer 3
|
||||
ERT_AUX_BUFFER3,
|
||||
//! Auxiliary buffer 4
|
||||
ERT_AUX_BUFFER4
|
||||
};
|
||||
|
||||
//! Enum for the flags of clear buffer
|
||||
enum E_CLEAR_BUFFER_FLAG
|
||||
{
|
||||
ECBF_NONE = 0,
|
||||
ECBF_COLOR = 1,
|
||||
ECBF_DEPTH = 2,
|
||||
ECBF_STENCIL = 4,
|
||||
ECBF_ALL = ECBF_COLOR | ECBF_DEPTH | ECBF_STENCIL
|
||||
};
|
||||
|
||||
//! Enum for the types of fog distributions to choose from
|
||||
enum E_FOG_TYPE
|
||||
{
|
||||
EFT_FOG_EXP = 0,
|
||||
EFT_FOG_LINEAR,
|
||||
EFT_FOG_EXP2
|
||||
};
|
||||
|
||||
} // irr::video
|
||||
|
|
@ -9,14 +9,16 @@
|
|||
#include "ITexture.h"
|
||||
#include "irrArray.h"
|
||||
#include "matrix4.h"
|
||||
#include "plane3d.h"
|
||||
#include "dimension2d.h"
|
||||
#include "position2d.h"
|
||||
#include "IMeshBuffer.h"
|
||||
#include "EDriverTypes.h"
|
||||
#include "EDriverFeatures.h"
|
||||
#include "EPrimitiveTypes.h"
|
||||
#include "EVideoTypes.h"
|
||||
#include "SExposedVideoData.h"
|
||||
#include "SOverrideMaterial.h"
|
||||
#include "S3DVertex.h" // E_VERTEX_TYPE
|
||||
#include "SVertexIndex.h" // E_INDEX_TYPE
|
||||
|
||||
namespace irr
|
||||
{
|
||||
|
@ -36,77 +38,12 @@ class ISceneNode;
|
|||
|
||||
namespace video
|
||||
{
|
||||
struct S3DVertex;
|
||||
struct S3DVertex2TCoords;
|
||||
struct S3DVertexTangents;
|
||||
class IImageLoader;
|
||||
class IImageWriter;
|
||||
class IMaterialRenderer;
|
||||
class IGPUProgrammingServices;
|
||||
class IRenderTarget;
|
||||
|
||||
//! enumeration for geometry transformation states
|
||||
enum E_TRANSFORMATION_STATE
|
||||
{
|
||||
//! View transformation
|
||||
ETS_VIEW = 0,
|
||||
//! World transformation
|
||||
ETS_WORLD,
|
||||
//! Projection transformation
|
||||
ETS_PROJECTION,
|
||||
//! Texture 0 transformation
|
||||
//! Use E_TRANSFORMATION_STATE(ETS_TEXTURE_0 + texture_number) to access other texture transformations
|
||||
ETS_TEXTURE_0,
|
||||
//! Only used internally
|
||||
ETS_COUNT = ETS_TEXTURE_0 + MATERIAL_MAX_TEXTURES
|
||||
};
|
||||
|
||||
//! Special render targets, which usually map to dedicated hardware
|
||||
/** These render targets (besides 0 and 1) need not be supported by gfx cards */
|
||||
enum E_RENDER_TARGET
|
||||
{
|
||||
//! Render target is the main color frame buffer
|
||||
ERT_FRAME_BUFFER = 0,
|
||||
//! Render target is a render texture
|
||||
ERT_RENDER_TEXTURE,
|
||||
//! Multi-Render target textures
|
||||
ERT_MULTI_RENDER_TEXTURES,
|
||||
//! Render target is the main color frame buffer
|
||||
ERT_STEREO_LEFT_BUFFER,
|
||||
//! Render target is the right color buffer (left is the main buffer)
|
||||
ERT_STEREO_RIGHT_BUFFER,
|
||||
//! Render to both stereo buffers at once
|
||||
ERT_STEREO_BOTH_BUFFERS,
|
||||
//! Auxiliary buffer 0
|
||||
ERT_AUX_BUFFER0,
|
||||
//! Auxiliary buffer 1
|
||||
ERT_AUX_BUFFER1,
|
||||
//! Auxiliary buffer 2
|
||||
ERT_AUX_BUFFER2,
|
||||
//! Auxiliary buffer 3
|
||||
ERT_AUX_BUFFER3,
|
||||
//! Auxiliary buffer 4
|
||||
ERT_AUX_BUFFER4
|
||||
};
|
||||
|
||||
//! Enum for the flags of clear buffer
|
||||
enum E_CLEAR_BUFFER_FLAG
|
||||
{
|
||||
ECBF_NONE = 0,
|
||||
ECBF_COLOR = 1,
|
||||
ECBF_DEPTH = 2,
|
||||
ECBF_STENCIL = 4,
|
||||
ECBF_ALL = ECBF_COLOR | ECBF_DEPTH | ECBF_STENCIL
|
||||
};
|
||||
|
||||
//! Enum for the types of fog distributions to choose from
|
||||
enum E_FOG_TYPE
|
||||
{
|
||||
EFT_FOG_EXP = 0,
|
||||
EFT_FOG_LINEAR,
|
||||
EFT_FOG_EXP2
|
||||
};
|
||||
|
||||
const c8 *const FogTypeNames[] = {
|
||||
"FogExp",
|
||||
"FogLinear",
|
||||
|
|
|
@ -6,14 +6,16 @@
|
|||
|
||||
#include "IReferenceCounted.h"
|
||||
#include "dimension2d.h"
|
||||
#include "IVideoDriver.h"
|
||||
#include "EDriverTypes.h"
|
||||
#include "EDeviceTypes.h"
|
||||
#include "IEventReceiver.h"
|
||||
#include "ICursorControl.h"
|
||||
#include "ITimer.h"
|
||||
#include "IOSOperator.h"
|
||||
#include "irrArray.h"
|
||||
#include "IrrCompileConfig.h"
|
||||
#include "position2d.h"
|
||||
#include "SColor.h" // video::ECOLOR_FORMAT
|
||||
|
||||
namespace irr
|
||||
{
|
||||
|
@ -38,6 +40,9 @@ class ISceneManager;
|
|||
namespace video
|
||||
{
|
||||
class IContextManager;
|
||||
class IImage;
|
||||
class ITexture;
|
||||
class IVideoDriver;
|
||||
extern "C" IRRLICHT_API bool IRRCALLCONV isDriverSupported(E_DRIVER_TYPE driver);
|
||||
} // end namespace video
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
#include "line3d.h"
|
||||
#include "aabbox3d.h"
|
||||
#include "matrix4.h"
|
||||
#include "IVideoDriver.h"
|
||||
#include "EVideoTypes.h"
|
||||
|
||||
namespace irr
|
||||
{
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
#include "IGUISpriteBank.h"
|
||||
#include "IImageLoader.h"
|
||||
#include "IFileSystem.h"
|
||||
#include "IVideoDriver.h"
|
||||
#include <X11/XKBlib.h>
|
||||
#include <X11/Xatom.h>
|
||||
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
#include "IGUIEnvironment.h"
|
||||
#include "IImageLoader.h"
|
||||
#include "IFileSystem.h"
|
||||
#include "IVideoDriver.h"
|
||||
#include "os.h"
|
||||
#include "CTimer.h"
|
||||
#include "irrString.h"
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
#include "IFileSystem.h"
|
||||
#include "IGUIElement.h"
|
||||
#include "IGUIEnvironment.h"
|
||||
#include "IVideoDriver.h"
|
||||
#include "os.h"
|
||||
#include "CTimer.h"
|
||||
#include "CLogger.h"
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
#include "COSOperator.h"
|
||||
#include "dimension2d.h"
|
||||
#include "IGUISpriteBank.h"
|
||||
#include "IVideoDriver.h"
|
||||
#include <winuser.h>
|
||||
#include "SExposedVideoData.h"
|
||||
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
#include "ICameraSceneNode.h"
|
||||
#include "SViewFrustum.h"
|
||||
|
||||
#include "os.h"
|
||||
#include "irrMath.h"
|
||||
|
||||
namespace irr
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue