Skip to content

Replace "SMeshBuffer.h" with "CMeshBuffer.h" #16106

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions irr/include/SMeshBuffer.h

This file was deleted.

2 changes: 1 addition & 1 deletion irr/include/SkinnedMesh.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

#include "IAnimatedMesh.h"
#include "ISceneManager.h"
#include "SMeshBuffer.h"
#include "CMeshBuffer.h"
#include "SSkinMeshBuffer.h"
#include "quaternion.h"
#include "vector3d.h"
Expand Down
2 changes: 1 addition & 1 deletion irr/src/CBillboardSceneNode.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#pragma once

#include "IBillboardSceneNode.h"
#include "SMeshBuffer.h"
#include "CMeshBuffer.h"

namespace irr
{
Expand Down
2 changes: 1 addition & 1 deletion irr/src/COBJMeshFileLoader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include "IMeshManipulator.h"
#include "IVideoDriver.h"
#include "SMesh.h"
#include "SMeshBuffer.h"
#include "CMeshBuffer.h"
#include "SAnimatedMesh.h"
#include "IReadFile.h"
#include "fast_atof.h"
Expand Down
2 changes: 1 addition & 1 deletion irr/src/COBJMeshFileLoader.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include "IMeshLoader.h"
#include "ISceneManager.h"
#include "irrString.h"
#include "SMeshBuffer.h"
#include "CMeshBuffer.h"

namespace irr
{
Expand Down
8 changes: 6 additions & 2 deletions src/client/clouds.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,16 @@

#include "irrlichttypes_bloated.h"
#include "constants.h"
#include "irr_ptr.h"
#include "skyparams.h"
#include <iostream>
//irr includes
#include <irr_ptr.h>
#include <ISceneNode.h>
#include <SMaterial.h>
#include <SMeshBuffer.h>
#include <CMeshBuffer.h>

namespace scene = irr::scene;
namespace video = irr::video;

class IShaderSource;

Expand Down
13 changes: 8 additions & 5 deletions src/client/content_cao.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@
// Copyright (C) 2010-2013 celeron55, Perttu Ahola <celeron55@gmail.com>

#include "content_cao.h"
#include <IBillboardSceneNode.h>
#include <ICameraSceneNode.h>
#include <IMeshManipulator.h>
#include <IAnimatedMeshSceneNode.h>
#include "client/client.h"
#include "client/renderingengine.h"
#include "client/sound.h"
Expand Down Expand Up @@ -34,10 +30,17 @@
#include <cmath>
#include "client/shader.h"
#include "client/minimap.h"
//irr includes
#include <IBillboardSceneNode.h>
#include <ICameraSceneNode.h>
#include <IMeshManipulator.h>
#include <IAnimatedMeshSceneNode.h>
#include <quaternion.h>
#include <SMesh.h>
#include <IMeshBuffer.h>
#include <SMeshBuffer.h>
#include <CMeshBuffer.h>

using namespace irr;

class Settings;
struct ToolCapabilities;
Expand Down
13 changes: 9 additions & 4 deletions src/client/hud.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,17 @@
#pragma once

#include <vector>
#include <IGUIFont.h>
#include <SMaterial.h>
#include <SMeshBuffer.h>
#include "irr_ptr.h"
#include "irr_aabb3d.h"
#include "../hud.h"
//irr includes
#include <IGUIFont.h>
#include <IMesh.h>
#include <SMaterial.h>
#include <CMeshBuffer.h>
#include <irr_ptr.h>

namespace scene = irr::scene;
namespace video = irr::video;

class Client;
class ITextureSource;
Expand Down
6 changes: 4 additions & 2 deletions src/client/mapblock_mesh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// Copyright (C) 2010-2013 celeron55, Perttu Ahola <celeron55@gmail.com>

#include "mapblock_mesh.h"
#include "CMeshBuffer.h"
#include "client.h"
#include "mapblock.h"
#include "map.h"
Expand All @@ -21,9 +20,12 @@
#include <algorithm>
#include <cmath>
#include "client/texturesource.h"
// irr includes
#include <SMesh.h>
#include <IMeshBuffer.h>
#include <SMeshBuffer.h>
#include <CMeshBuffer.h>

using namespace irr;

/*
MeshMakeData
Expand Down
10 changes: 7 additions & 3 deletions src/client/mapblock_mesh.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,20 @@
#pragma once

#include "irrlichttypes.h"
#include "irr_ptr.h"
#include "IMesh.h"
#include "SMeshBuffer.h"

#include "util/numeric.h"
#include "client/tile.h"
#include "voxel.h"
#include <array>
#include <map>
#include <unordered_map>
// irr includes
#include <irr_ptr.h>
#include <IMesh.h>
#include <CMeshBuffer.h>

namespace scene = irr::scene;
namespace video = irr::video;

namespace irr::video {
class IVideoDriver;
Expand Down
10 changes: 5 additions & 5 deletions src/client/mesh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
#include "log.h"
#include <cmath>
#include <iostream>
#include <IAnimatedMesh.h>
#include <SAnimatedMesh.h>
// irr includes
#include <IAnimatedMeshSceneNode.h>
#include "S3DVertex.h"
#include "SMesh.h"
#include "SMeshBuffer.h"
#include <S3DVertex.h>
#include <CMeshBuffer.h>

using namespace irr;

inline static void applyShadeFactor(video::SColor& color, float factor)
{
Expand Down
8 changes: 8 additions & 0 deletions src/client/mesh.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@
#include "SColor.h"
#include "SMaterialLayer.h"
#include "nodedef.h"
// irr includes
#include <SColor.h>
#include <SMaterialLayer.h>
#include <SMesh.h>
#include <SAnimatedMesh.h>

namespace scene = irr::scene;
namespace video = irr::video;

namespace irr {
namespace scene {
Expand Down
10 changes: 7 additions & 3 deletions src/client/minimap.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,20 @@
#pragma once

#include "irrlichttypes.h"
#include "irr_ptr.h"
#include "rect.h"
#include "SMeshBuffer.h"

#include "../hud.h"
#include "mapnode.h"
#include "util/thread.h"
#include <map>
#include <string>
#include <vector>
// irr includes
#include <irr_ptr.h>
#include <rect.h>
#include <CMeshBuffer.h>

namespace scene = irr::scene;
namespace video = irr::video;

namespace irr {
namespace video {
Expand Down
2 changes: 1 addition & 1 deletion src/client/particles.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#include "settings.h"
#include "profiler.h"

#include "SMeshBuffer.h"
using namespace irr;

using BlendMode = ParticleParamTypes::BlendMode;

Expand Down
14 changes: 9 additions & 5 deletions src/client/particles.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,20 @@
#pragma once

#include "irrlichttypes_bloated.h"
#include "irr_ptr.h"
#include "ISceneNode.h"
#include "S3DVertex.h"
#include "SMeshBuffer.h"

#include "../particles.h"
#include <mutex>
#include <memory>
#include <vector>
#include <unordered_map>
#include "../particles.h"
// irr includes
#include <irr_ptr.h>
#include <ISceneNode.h>
#include <S3DVertex.h>
#include <CMeshBuffer.h>

namespace scene = irr::scene;
namespace video = irr::video;

namespace irr::video {
class ITexture;
Expand Down
10 changes: 7 additions & 3 deletions src/client/sky.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,19 @@
#pragma once

#include "irrlichttypes_bloated.h"
#include <ISceneNode.h>
#include <SMeshBuffer.h>
#include <array>
#include "camera.h" // CameraMode
#include "irr_ptr.h"
#include "skyparams.h"
// irr includes
#include <ISceneNode.h>
#include <CMeshBuffer.h>
#include <irr_ptr.h>

#define SKY_MATERIAL_COUNT 12

namespace scene = irr::scene;
namespace video = irr::video;

namespace irr::video
{
class IVideoDriver;
Expand Down
9 changes: 5 additions & 4 deletions src/client/wieldmesh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,13 @@
#include "log.h"
#include "util/numeric.h"
#include <map>
#include <IMeshManipulator.h>
#include "client/renderingengine.h"
#include <SMesh.h>
#include <IMeshBuffer.h>
#include <SMeshBuffer.h>
#include "item_visuals_manager.h"
// irr includes
#include <IMeshManipulator.h>
#include <CMeshBuffer.h>

using namespace irr;
Copy link
Contributor

@appgurueu appgurueu May 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR adds a bunch of these (as well as namespace scene = irr:scene; namespace video = irr:video;) which are redundant, as there is still the using namespace irr; in irrlichttypes.h?

For now I would curtail the scope of this PR and simply get rid of them.

I would prefer it if this was just what the PR title currently says it is which is something like a clean 10 loc diff, but I'm fine with keeping the header cleanup in here (and maybe updating the PR title).

Copy link
Author

@omicron1100 omicron1100 May 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Originally, I had these to make it easier to refactor the headers incrementally. I have another potential PR that more thoroughly cleans up the headers (deletes irrlichttypes_bloated.h, moves using into the appropriate cpp files, etc) but seeing as it touches over 100 files, I didn't want to place a huge burden on the team in reviewing it all at once. I'm still not sure the best way to approach this.


#define WIELD_SCALE_FACTOR 30.0f
#define WIELD_SCALE_FACTOR_EXTRUDED 40.0f
Expand Down
Loading