Split CNullDriver::checkImage into 2 functions to avoid some memory allocations in addTexture

Avoid creating dummy arrays when we work with non array images.
Just a minor speed improvement.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6329 dfc29bdd-3216-0410-991c-e03cc46cb475
This commit is contained in:
cutealien
2022-04-06 20:20:36 +00:00
parent 2ddd6f5355
commit 64fc9113fc
3 changed files with 84 additions and 88 deletions

View File

@ -707,6 +707,7 @@ namespace video
bool checkPrimitiveCount(u32 prmcnt) const;
bool checkImage(const core::array<IImage*>& image) const;
bool checkImage(ECOLOR_FORMAT format, const core::dimension2du& size) const;
// adds a material renderer and drops it afterwards. To be used for internal creation
s32 addAndDropMaterialRenderer(IMaterialRenderer* m);