Engines/FlatRedBallXNA/FlatRedBall/Graphics/GenericEffect.cs
/// <summary>
/// Set the parameters for Basic Shader
/// </summary>
Set the parameters for Basic Shader
Set the parameters for Basic Shader
private void SetBasicEffectParameters()
        {
            mBasicEffect.World              = this.World;
            mBasicEffect.View               = this.View;
            mBasicEffect.Projection         = this.Projection;
            mBasicEffect.LightingEnabled    = this.LightingEnabled;
            if (this.LightingEnabled)
            {
#if !MONOGAME
                mBasicEffect.DirectionalLight0.DiffuseColor     = this.DirectionalLight0.DiffuseColor;
                mBasicEffect.DirectionalLight0.Direction        = this.DirectionalLight0.Direction;
                mBasicEffect.DirectionalLight0.Enabled          = this.DirectionalLight0.Enabled;
                mBasicEffect.DirectionalLight0.SpecularColor    = this.DirectionalLight0.SpecularColor;
                mBasicEffect.DirectionalLight1.DiffuseColor     = this.DirectionalLight1.DiffuseColor;
                mBasicEffect.DirectionalLight1.Direction        = this.DirectionalLight1.Direction;
                mBasicEffect.DirectionalLight1.Enabled          = this.DirectionalLight1.Enabled;
                mBasicEffect.DirectionalLight1.SpecularColor    = this.DirectionalLight1.SpecularColor;
                mBasicEffect.DirectionalLight2.DiffuseColor     = this.DirectionalLight2.DiffuseColor;
                mBasicEffect.DirectionalLight2.Direction        = this.DirectionalLight2.Direction;
                mBasicEffect.DirectionalLight2.Enabled          = this.DirectionalLight2.Enabled;
                mBasicEffect.DirectionalLight2.SpecularColor    = this.DirectionalLight2.SpecularColor;
#endif
            }
            mBasicEffect.DiffuseColor       = this.DiffuseColor;
            mBasicEffect.AmbientLightColor  = this.AmbientLightColor;
            mBasicEffect.FogColor           = this.FogColor;
            mBasicEffect.FogEnabled         = this.FogEnabled;
            mBasicEffect.FogStart           = this.FogStart;
            mBasicEffect.FogEnd             = this.FogEnd;
            mBasicEffect.VertexColorEnabled = this.VertexColorEnabled;
            mBasicEffect.Alpha              = this.Alpha;
            mBasicEffect.Texture            = this.Texture;
            mBasicEffect.TextureEnabled     = this.TextureEnabled;
#if !MONOGAME
            mBasicEffect.PreferPerPixelLighting = this.PreferPerPixelLighting;
            mBasicEffect.SpecularColor = this.SpecularColor;
            mBasicEffect.SpecularPower = this.SpecularPower;
#endif
        }
private void SetBasicEffectParameters ( ) { mBasicEffect . World = this . World ; mBasicEffect . View = this . View ; mBasicEffect . Projection = this . Projection ; mBasicEffect . LightingEnabled = this . LightingEnabled ; if ( this . LightingEnabled ) { if ! MONOGAME mBasicEffect . DirectionalLight0 . DiffuseColor = this . DirectionalLight0 . DiffuseColor ; mBasicEffect . DirectionalLight0 . Direction = this . DirectionalLight0 . Direction ; mBasicEffect . DirectionalLight0 . Enabled = this . DirectionalLight0 . Enabled ; mBasicEffect . DirectionalLight0 . SpecularColor = this . DirectionalLight0 . SpecularColor ; mBasicEffect . DirectionalLight1 . DiffuseColor = this . DirectionalLight1 . DiffuseColor ; mBasicEffect . DirectionalLight1 . Direction = this . DirectionalLight1 . Direction ; mBasicEffect . DirectionalLight1 . Enabled = this . DirectionalLight1 . Enabled ; mBasicEffect . DirectionalLight1 . SpecularColor = this . DirectionalLight1 . SpecularColor ; mBasicEffect . DirectionalLight2 . DiffuseColor = this . DirectionalLight2 . DiffuseColor ; mBasicEffect . DirectionalLight2 . Direction = this . DirectionalLight2 . Direction ; mBasicEffect . DirectionalLight2 . Enabled = this . DirectionalLight2 . Enabled ; mBasicEffect . DirectionalLight2 . SpecularColor = this . DirectionalLight2 . SpecularColor ; endif } mBasicEffect . DiffuseColor = this . DiffuseColor ; mBasicEffect . AmbientLightColor = this . AmbientLightColor ; mBasicEffect . FogColor = this . FogColor ; mBasicEffect . FogEnabled = this . FogEnabled ; mBasicEffect . FogStart = this . FogStart ; mBasicEffect . FogEnd = this . FogEnd ; mBasicEffect . VertexColorEnabled = this . VertexColorEnabled ; mBasicEffect . Alpha = this . Alpha ; mBasicEffect . Texture = this . Texture ; mBasicEffect . TextureEnabled = this . TextureEnabled ; if ! MONOGAME mBasicEffect . PreferPerPixelLighting = this . PreferPerPixelLighting ; mBasicEffect . SpecularColor = this . SpecularColor ; mBasicEffect . SpecularPower = this . SpecularPower ; endif }
Set the parameters for Basic Shader
Set the parameters for Basic Shader