示例#1
0
 public TextureShader(IDataProvider dataProvider, IEventAggregator eventAggregator,
                      ITextureLoader textureLoader) : base(eventAggregator)
 {
     _shaderProgramFactory = new ShaderProgramFactory(new ShaderFactory("Texture"));
     _figureResult         = dataProvider.GetVertexPoints("Textures");
     _textureLoader        = textureLoader;
 }
示例#2
0
        public LightningShader(IDataProvider dataProvider, IEventAggregator eventAggregator,
                               ITextureLoader textureLoader) : base(eventAggregator)
        {
            _shaderProgramFactory      = new ShaderProgramFactory(new ShaderFactory("Lightning"));
            _lampShaderProgramFactory  = new ShaderProgramFactory(new ShaderFactory("LightningLamp"));
            _worldMapProgramFactory    = new ShaderProgramFactory(new ShaderFactory("WorldMap"));
            _figureResult              = dataProvider.GetVertexPoints("Lightning");
            _worldMapResult            = dataProvider.GetVertexPoints("WorldMap");
            _textureLoader             = textureLoader;
            eventAggregator.OnKeyDown += OnOnKeyDown;


            Timer timer = new Timer();

            timer.Tick    += TimerOnTick;
            timer.Interval = 10;
            timer.Enabled  = true;
        }
示例#3
0
 public RedRectangleShader(IDataProvider dataProvider)
 {
     _shaderProgramFactory = new ShaderProgramFactory(new ShaderFactory("TriangleShader"));
     _figureResult         = dataProvider.GetVertexPoints("RedRectangle");
 }
示例#4
0
 public ColorfulRectangleShader(IDataProvider dataProvider, IEventAggregator eventAggregator)
     : base(eventAggregator)
 {
     _shaderProgramFactory = new ShaderProgramFactory(new ShaderFactory("ColorFulTriangle"));
     _figureResult         = dataProvider.GetVertexPoints("ColorFulRectangle");
 }