// Copyright (C) 2017 Michael Zeilfelder // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h #ifndef __S_OVERRIDE_MATERIAL_H_INCLUDED__ #define __S_OVERRIDE_MATERIAL_H_INCLUDED__ #include "SMaterial.h" namespace irr { namespace video { struct SOverrideMaterial { //! The Material values SMaterial Material; //! Which values are overridden /** OR'ed values from E_MATERIAL_FLAGS. */ u32 EnableFlags; //! For those flags in EnableFlags which affect layers, set which of the layers are affected bool EnableLayerFlags[MATERIAL_MAX_TEXTURES]; //! Which textures are overridden bool EnableTextures[MATERIAL_MAX_TEXTURES]; //! Overwrite complete layers (settings of EnableLayerFlags and EnableTextures don't matter then for layer data) bool EnableLayers[MATERIAL_MAX_TEXTURES]; //! Set in which render passes the material override is active. /** OR'ed values from E_SCENE_NODE_RENDER_PASS. */ u16 EnablePasses; //! Global enable flag, overwritten by the SceneManager in each pass /** The Scenemanager uses the EnablePass array and sets Enabled to true if the Override material is enabled in the current pass. */ bool Enabled; //! Default constructor SOverrideMaterial() : EnableFlags(0), EnablePasses(0), Enabled(false) { for ( int i=0; i