protected override void Initialize(IDeviceContextHolder contextHolder) { base.Initialize(contextHolder); _material = contextHolder.GetMaterial(BasicMaterials.DebugLinesKey); _material.EnsureInitialized(contextHolder); }
protected override void Initialize(IDeviceContextHolder contextHolder) { base.Initialize(contextHolder); _material = new Kn5MaterialSimpleGl(); _material.EnsureInitialized(contextHolder); }
protected override void Initialize(IDeviceContextHolder contextHolder) { _material = contextHolder.Get <SharedMaterials>().GetMaterial(new Kn5AmbientShadowMaterialDescription(_filename)); _material.Initialize(contextHolder); base.Initialize(contextHolder); }
protected override void Initialize(IDeviceContextHolder contextHolder) { base.Initialize(contextHolder); _material = contextHolder.Get <SharedMaterials>().GetMaterial(BasicMaterials.DepthOnlyKey); _material.Initialize(contextHolder); }
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); } }
protected override void Initialize(IDeviceContextHolder contextHolder) { base.Initialize(contextHolder); _material = contextHolder.GetMaterial(BasicMaterials.SkyKey); _material.Initialize(contextHolder); }
protected override void Initialize(IDeviceContextHolder contextHolder) { base.Initialize(contextHolder); if (Material == null && MaterialKey != null) { Material = contextHolder.Get <SharedMaterials>().GetMaterial(MaterialKey); } Material?.EnsureInitialized(contextHolder); }
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); } }
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); } }