1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-11-30 20:53:45 +01:00

Introduce EMT_INVALID as safe placeholder

This commit is contained in:
sfan5
2025-11-07 13:30:26 +01:00
parent fad3a0fa6d
commit c3790dd7af
8 changed files with 16 additions and 23 deletions

View File

@@ -38,16 +38,6 @@ IImageWriter *createImageWriterJPG();
//! creates a writer which is able to save png images
IImageWriter *createImageWriterPNG();
namespace
{
//! no-op material renderer
class CDummyMaterialRenderer : public IMaterialRenderer
{
public:
CDummyMaterialRenderer() {}
};
}
//! constructor
CNullDriver::CNullDriver(io::IFileSystem *io, const core::dimension2d<u32> &screenSize) :
SharedRenderTarget(0), CurrentRenderTarget(0), CurrentRenderTargetSize(0, 0), FileSystem(io), MeshManipulator(0),
@@ -1505,7 +1495,7 @@ void CNullDriver::deleteShaderMaterial(s32 material)
auto &ref = MaterialRenderers[idx];
if (ref.Renderer)
ref.Renderer->drop();
ref.Renderer = new CDummyMaterialRenderer();
ref.Renderer = new IMaterialRenderer();
ref.Name.clear();
}