コード例 #1
0
ファイル: CubeTextureView.cs プロジェクト: lypvc/ImageViewer
        public override void Draw(ITexture texture)
        {
            if (texture == null)
            {
                return;
            }

            base.Draw(texture);

            var dev = Device.Get();

            dev.OutputMerger.BlendState = data.AlphaBlendState;

            shader.Run(data.Buffer, GetTransform(), models.Display.Multiplier, CalcFarplane(), models.Display.DisplayNegative, ((TextureArray2D)texture).GetCubeView(models.Display.ActiveMipmap), data.GetSampler(models.Display.LinearInterpolation));

            dev.OutputMerger.BlendState = data.DefaultBlendState;
        }
コード例 #2
0
        public override void Draw(int id, ITexture texture)
        {
            if (texture == null)
            {
                return;
            }

            base.Draw(id, texture);

            var dev = Device.Get();

            dev.OutputMerger.BlendState = models.ViewData.AlphaBlendState;

            ShaderResourceView overlay = null;

            if (models.Overlay.Overlay != null)
            {
                overlay = ((TextureArray2D)models.Overlay.Overlay).GetCubeView(models.Display.ActiveMipmap);
            }
            shader.Run(GetTransform(), CalcFarplane(), ((TextureArray2D)texture).GetCubeView(models.Display.ActiveMipmap), overlay);

            dev.OutputMerger.BlendState = models.ViewData.DefaultBlendState;
        }