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(); }
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; }
public void Dispose() { _texture = null; }
public void Free(bool force) { _texture = null; }
/// <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); }
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(); }