Esempio n. 1
0
        public TextureViewData(ModelsEx models)
        {
            this.models = models;
            var dev = ImageFramework.DirectX.Device.Get();

            DefaultBlendState = CreateBlendState(false, BlendOption.One, BlendOption.Zero);
            AlphaBlendState   = CreateBlendState(true, BlendOption.SourceAlpha, BlendOption.InverseSourceAlpha);
            AlphaDarkenState  = CreateBlendState(true, BlendOption.One, BlendOption.SourceAlpha);

            Buffer = models.SharedModel.Upload;

            Checkers = new CheckersShader(models);
        }
Esempio n. 2
0
        public void Dispose()
        {
            CheckersShader.Dispose();
            Vao.Dispose();
            samplerLinear.Dispose();
            samplerLinearMip.Dispose();
            samplerNearest.Dispose();
            samplerNearestMip.Dispose();
            TextureCache.Clear();
            GetPixelShader.Dispose();
            SrgbShader.Dispose();
            ExportShader.Dispose();

            LinearMaxStatistics.Dispose();
            SrgbMaxStatistics.Dispose();
            LinearMinStatistics.Dispose();
            SrgbMinStatistics.Dispose();
        }
Esempio n. 3
0
        public OpenGlModel(OpenGlContext context, ImagesModel images)
        {
            Debug.Assert(context.GlEnabled);
            Vao               = new VertexArray();
            CheckersShader    = new CheckersShader();
            samplerLinear     = new Sampler(TextureMinFilter.Linear, TextureMagFilter.Linear);
            samplerLinearMip  = new Sampler(TextureMinFilter.LinearMipmapLinear, TextureMagFilter.Linear);
            samplerNearest    = new Sampler(TextureMinFilter.Nearest, TextureMagFilter.Nearest);
            samplerNearestMip = new Sampler(TextureMinFilter.NearestMipmapNearest, TextureMagFilter.Nearest);
            TextureCache      = new TextureCacheModel(images, context);
            GetPixelShader    = new PixelValueShader();
            SrgbShader        = new SrgbShader();
            ExportShader      = new PixelExportShader();

            LinearMaxStatistics = new MaxStatistics(false);
            SrgbMaxStatistics   = new MaxStatistics(true);
            LinearMinStatistics = new MinStatistics(false);
            SrgbMinStatistics   = new MinStatistics(true);
            LinearAvgStatistics = new AverageStatistics(false, images);
            SrgbAvgStatistics   = new AverageStatistics(true, images);
        }
Esempio n. 4
0
 public void CheckersCompile()
 {
     CheckersShader.CompileShaders();
 }