public TextureCacheModel(ImagesModel images, OpenGlContext glContext)
        {
            this.images    = images;
            this.glContext = glContext;

            images.PropertyChanged += ImagesOnPropertyChanged;
        }
Exemple #2
0
        /// <summary>
        /// window after the opengl host was initialized
        /// </summary>
        /// <param name="app"></param>
        /// <param name="window"></param>
        public Models(App app, MainWindow window, WindowViewModel viewModel)
        {
            this.App  = new AppModel(app, window);
            GlContext = new OpenGlContext(window, viewModel);
            GlContext.Enable();

            Images      = new ImagesModel(GlContext, App);
            GlData      = new OpenGlModel(GlContext, Images);
            Display     = new DisplayModel(Images, GlContext);
            Equations   = new ImageEquationsModel(Images);
            Progress    = new ProgressModel();
            FinalImages = new FinalImagesModel(GlData.TextureCache, Images);
            Filter      = new FiltersModel();
            Statistics  = new StatisticsModel();
            Export      = new ExportModel(Images, Display);

            GlContext.Disable();
        }
Exemple #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);
        }
Exemple #4
0
 public ImagesModel(OpenGlContext context, AppModel app)
 {
     this.app     = app;
     this.context = context;
     images       = new List <ImageData>();
 }