Begin() public method

public Begin ( DeviceManager deviceManager ) : void
deviceManager DeviceManager
return void
Beispiel #1
0
            private static void Set_Slow(DeviceManager deviceManager, Material material, ref MaterialParameterValues parameters)
            {
                if (deviceManager.CurrentMaterial != null)
                {
                    deviceManager.CurrentMaterial.End(deviceManager);
                }

                deviceManager.CurrentMaterial = material;
                deviceManager.UpdateTargetInfo(null, false, true);

                if (material != null)
                {
                    material.Begin(deviceManager, ref parameters);
                }
            }
Beispiel #2
0
        public override void Begin(DeviceManager deviceManager)
        {
            if (BaseMaterial != null)
            {
                BaseMaterial.Begin(deviceManager);
            }
            else
            {
                base.Begin(deviceManager);
            }

            if (BeginHandlers != null)
            {
                foreach (var handler in BeginHandlers)
                {
                    handler(deviceManager);
                }
            }
        }
Beispiel #3
0
            public ActiveMaterial(DeviceManager deviceManager, Material material)
            {
                DeviceManager = deviceManager;
                Material      = material;

                if (deviceManager.CurrentMaterial != material)
                {
                    if (deviceManager.CurrentMaterial != null)
                    {
                        deviceManager.CurrentMaterial.End(deviceManager);
                    }

                    deviceManager.CurrentMaterial = material;

                    if (material != null)
                    {
                        material.Begin(deviceManager);
                    }
                }
            }