mirror of
https://github.com/minetest/irrlicht.git
synced 2025-06-28 22:36:09 +02:00
Add API to delete shader materials
This commit is contained in:
@ -5,6 +5,8 @@
|
||||
#ifndef __E_MATERIAL_TYPES_H_INCLUDED__
|
||||
#define __E_MATERIAL_TYPES_H_INCLUDED__
|
||||
|
||||
#include "irrTypes.h"
|
||||
|
||||
namespace irr
|
||||
{
|
||||
namespace video
|
||||
@ -67,6 +69,9 @@ namespace video
|
||||
0
|
||||
};
|
||||
|
||||
constexpr u32 numBuiltInMaterials =
|
||||
sizeof(sBuiltInMaterialTypeNames) / sizeof(char*) - 1;
|
||||
|
||||
} // end namespace video
|
||||
} // end namespace irr
|
||||
|
||||
|
@ -356,6 +356,15 @@ public:
|
||||
scene::EPT_TRIANGLES, scene::EPT_TRIANGLE_STRIP, 0,
|
||||
callback, baseMaterial, userData);
|
||||
}
|
||||
|
||||
//! Delete a shader material and associated data.
|
||||
/**
|
||||
After you have deleted a material it is invalid to still use and doing
|
||||
so might result in a crash. The ID may be reused in the future when new
|
||||
materials are added.
|
||||
\param material Number of the material type. Must not be a built-in
|
||||
material. */
|
||||
virtual void deleteShaderMaterial(s32 material) = 0;
|
||||
};
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user