Exemple #1
0
            public layer(DirectX9Renderer owner)
            {
                this.owner     = owner;
                this.layername = $"Image_3d_{id++}";

                base.IsFrontBufferAvailableChanged += Layer_IsFrontBufferAvailableChanged;

                //  owner.window.Resources[this.layername] = ;

                //      BeginRenderingScene();

                this.rec = new System.Windows.Shapes.Rectangle()
                {
                    //  Width = owner.viewsize.width,
                    //   Height = owner.viewsize.height,
                    Fill = /* new SolidColorBrush(System.Windows.Media.Color.FromArgb(255, 255, 255, 0))*/ new ImageBrush(this),
                    HorizontalAlignment = HorizontalAlignment.Stretch,
                    VerticalAlignment   = VerticalAlignment.Stretch
                };

                //  DrawingVisual drawingVisual = new DrawingVisual();

                // Retrieve the DrawingContext in order to create new drawing content.

                /*   DrawingContext drawingContext = this.RenderOpen();
                 *
                 * // Create a rectangle and draw it in the DrawingContext.
                 * Rect rect = new Rect(new System.Windows.Point(0, 0), new System.Windows.Size(320, 80));
                 * drawingContext.DrawRectangle(System.Windows.Media.Brushes.LightBlue, (System.Windows.Media.Pen)null, rect);
                 *
                 * // Persist the drawing content.
                 * drawingContext.Close();*/
            }
 public RenderFrame(DirectX9Renderer owner, int levels)
 {
     this.owner        = owner;
     this.Textures     = new Texture[levels];
     this.rendertarget = new Surface[levels];
 }
Exemple #3
0
 public VideoFrame(DirectX9Renderer owner)
 {
     this.owner    = owner;
     this.Textures = new Texture[1];
 }
Exemple #4
0
 public _rendererlock(IRenderer renderer)
 {
     this.renderer = renderer as DirectX9Renderer;
     this.renderer.Lock();
 }