Axiom.Graphics.Pass.Pass C# (CSharp) Method

Pass() public method

Default constructor.
public Pass ( Technique parent, int index ) : System
parent Technique Technique that owns this Pass.
index int Index of this pass.
return System
		public Pass( Technique parent, int index )
		{
			this._parent = parent;
			this._index = index;

			lock ( passLock )
			{
				this.passId = nextPassId++;
			}

			// color defaults
			_ambient = ColorEx.White;
			_diffuse = ColorEx.White;
			_specular = ColorEx.Black;
			_emissive = ColorEx.Black;

			// by default, don't override the scene's fog settings
			_fogOverride = false;
			_fogMode = FogMode.None;
			_fogColor = ColorEx.White;
			_fogStart = 0;
			_fogEnd = 1;
			_fogDensity = 0.001f;

			// default blending (overwrite)
			_sourceBlendFactor = SceneBlendFactor.One;
			_destinationBlendFactor = SceneBlendFactor.Zero;



			// depth buffer settings
			_depthCheck = true;
			_depthWrite = true;
			_colorWriteEnabled = true;
			_depthFunction = CompareFunction.LessEqual;

			// cull settings
			_cullingMode = CullingMode.Clockwise;
			_manualCullingMode = ManualCullingMode.Back;

			// light settings
			_lightingEnabled = true;
			_runOnlyForOneLightType = true;
			_onlyLightType = LightType.Point;
			_shadingMode = Shading.Gouraud;

			// Default max lights to the global max
			_maxSimultaneousLights = Config.MaxSimultaneousLights;

			_name = index.ToString();

            IterationCount = 1;

			DirtyHash();
		}