示例#1
0
        protected override void Initialize(IDeviceContextHolder contextHolder)
        {
            base.Initialize(contextHolder);

            _material = contextHolder.GetMaterial(BasicMaterials.DebugLinesKey);
            _material.EnsureInitialized(contextHolder);
        }
示例#2
0
        protected override void Initialize(IDeviceContextHolder contextHolder)
        {
            base.Initialize(contextHolder);

            _material = new Kn5MaterialSimpleGl();
            _material.EnsureInitialized(contextHolder);
        }
示例#3
0
        protected override void Initialize(IDeviceContextHolder contextHolder)
        {
            _material = contextHolder.Get <SharedMaterials>().GetMaterial(new Kn5AmbientShadowMaterialDescription(_filename));
            _material.Initialize(contextHolder);

            base.Initialize(contextHolder);
        }
示例#4
0
        protected override void Initialize(IDeviceContextHolder contextHolder)
        {
            base.Initialize(contextHolder);

            _material = contextHolder.Get <SharedMaterials>().GetMaterial(BasicMaterials.DepthOnlyKey);
            _material.Initialize(contextHolder);
        }
示例#5
0
        public void SetDebugMode(IDeviceContextHolder holder, bool enabled)
        {
            if (enabled == (_debugMaterial != null))
            {
                return;
            }

            if (enabled)
            {
                _debugMaterial = holder.Get <SharedMaterials>().GetMaterial(new Tuple <object, uint>(BasicMaterials.DebugKey, OriginalNode.MaterialId));
                if (_debugMaterial == null)
                {
                    return;
                }

                if (IsInitialized)
                {
                    _debugMaterial.Initialize(holder);
                    _debugMaterialInitialized = true;
                }
            }
            else
            {
                _debugMaterialInitialized = false;
                DisposeHelper.Dispose(ref _debugMaterial);
            }
        }
示例#6
0
        protected override void Initialize(IDeviceContextHolder contextHolder)
        {
            base.Initialize(contextHolder);

            _material = contextHolder.GetMaterial(BasicMaterials.SkyKey);
            _material.Initialize(contextHolder);
        }
示例#7
0
        protected override void Initialize(IDeviceContextHolder contextHolder)
        {
            base.Initialize(contextHolder);

            if (Material == null && MaterialKey != null)
            {
                Material = contextHolder.Get <SharedMaterials>().GetMaterial(MaterialKey);
            }

            Material?.EnsureInitialized(contextHolder);
        }
示例#8
0
        protected override void Initialize(IDeviceContextHolder contextHolder)
        {
            base.Initialize(contextHolder);

            _material = contextHolder.Get <SharedMaterials>().GetMaterial(OriginalNode.MaterialId);
            _material.Initialize(contextHolder);

            if (_mirrorMaterial != null && !_mirrorMaterialInitialized)
            {
                _mirrorMaterialInitialized = true;
                _mirrorMaterial.Initialize(contextHolder);
            }

            if (_debugMaterial != null && !_debugMaterialInitialized)
            {
                _debugMaterialInitialized = true;
                _debugMaterial.Initialize(contextHolder);
            }
        }
示例#9
0
        public void SetMirrorMode(IDeviceContextHolder holder, bool enabled)
        {
            if (enabled == (_mirrorMaterial != null))
            {
                return;
            }

            if (enabled)
            {
                _mirrorMaterial = holder.GetMaterial(BasicMaterials.MirrorKey);
                if (IsInitialized)
                {
                    _mirrorMaterial.Initialize(holder);
                    _mirrorMaterialInitialized = true;
                }
            }
            else
            {
                _mirrorMaterialInitialized = false;
                DisposeHelper.Dispose(ref _mirrorMaterial);
            }
        }