Exemplo n.º 1
0
 public override void SetupBrush(FrameworkElement parent, ref PositionColoredTextured[] verts, float zOrder, bool adaptVertsToBrushTexture)
 {
     base.SetupBrush(parent, ref verts, zOrder, adaptVertsToBrushTexture);
     _visualTexture = ContentManager.Instance.GetRenderTexture(_renderTextureKey);
     _screen        = parent.Screen;
     PrepareVisual();
 }
Exemplo n.º 2
0
 public void Allocate()
 {
     if (_texture == null)
     {
         _texture = ContentManager.Instance.GetRenderTexture(_name);
     }
     if (_texture.IsAllocated)
     {
         return;
     }
     _texture.AllocateDynamic(GRADIENT_TEXTURE_WIDTH, GRADIENT_TEXTURE_HEIGHT);
     CreateGradient();
 }
 public void Allocate()
 {
   if (_texture == null)
     _texture = ContentManager.Instance.GetRenderTexture(_name);
   if (_texture.IsAllocated)
     return;
   _texture.AllocateDynamic(GRADIENT_TEXTURE_WIDTH, GRADIENT_TEXTURE_HEIGHT);
   CreateGradient();
 }
 public void Dispose()
 {
   _texture = null;
 }
 public void Free(bool force)
 {
   _texture = null;
 }
Exemplo n.º 6
0
 public void Dispose()
 {
     _texture = null;
 }
Exemplo n.º 7
0
 public void Free(bool force)
 {
     _texture = null;
 }
Exemplo n.º 8
0
 /// <summary>
 /// Renders the <see cref="FrameworkElement"/> to the given <paramref name="renderTarget"/>. This method works with
 /// textures internally which do not support multisampling.
 /// </summary>
 /// <param name="renderTarget">Render target.</param>
 /// <param name="renderContext">Render context.</param>
 public void RenderToTexture(RenderTextureAsset renderTarget, RenderContext renderContext)
 {
   RenderToSurfaceInternal(renderTarget.Surface0, renderContext);
 }
Exemplo n.º 9
0
 public override void SetupBrush(FrameworkElement parent, ref PositionColoredTextured[] verts, float zOrder, bool adaptVertsToBrushTexture)
 {
   base.SetupBrush(parent, ref verts, zOrder, adaptVertsToBrushTexture);
   _visualTexture = ContentManager.Instance.GetRenderTexture(_renderTextureKey);
   _visualSurface = ContentManager.Instance.GetRenderTarget(_renderSurfaceKey);
   _screen = parent.Screen;
   PrepareVisual();
 }