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); }
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(); }
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); }
public void CheckersCompile() { CheckersShader.CompileShaders(); }