Table of Contents

Class ScreenCloneRenderCore

Namespace
HelixToolkit.SharpDX.Core
Assembly
HelixToolkit.SharpDX.dll

Limitation: Under switchable graphics card setup(Laptop with integrated graphics card and external graphics card), only monitor outputs using integrated graphics card is fully supported. Trying to clone monitor outputs by external graphics card, the clone window must reside in those monitors which is rendered by external graphics card, or error will be occurred. Ref: https://support.microsoft.com/en-us/help/3019314/error-generated-when-desktop-duplication-api-capable-application-is-ru

public class ScreenCloneRenderCore : RenderCore, IDisposable, IGUID, IThrowingShadow, IScreenClone
Inheritance
ScreenCloneRenderCore
Implements
Inherited Members

Constructors

ScreenCloneRenderCore()

Initializes a new instance of the ScreenCloneRenderCore class.

public ScreenCloneRenderCore()

Properties

CloneRectangle

Gets or sets the clone rectangle.

public Rectangle CloneRectangle { get; set; }

Property Value

Rectangle

The clone rectangle.

Output

Gets or sets the output.

public int Output { get; set; }

Property Value

int

The output.

ShowMouseCursor

Gets or sets a value indicating whether [show mouse cursor].

public bool ShowMouseCursor { get; set; }

Property Value

bool

true if [show mouse cursor]; otherwise, false.

StretchToFill

Gets or sets a value indicating cloned rectangle is stretched during rendering, default is false;

public bool StretchToFill { get; set; }

Property Value

bool

true if stretch; otherwise, false.

Methods

GetCursorVertexBound(int, int, int, int, ref Vector4)

protected virtual void GetCursorVertexBound(int viewportWidth, int viewportHeight, int deskWidth, int deskHeight, ref Vector4 rect)

Parameters

viewportWidth int
viewportHeight int
deskWidth int
deskHeight int
rect Vector4

GetTextureBound(int, int)

Gets the texture bound. Ouput: x(left), y(right), z(top), w(bottom)

protected virtual Vector4 GetTextureBound(int screenWidth, int screenHeight)

Parameters

screenWidth int

Width of the screen.

screenHeight int

Height of the screen.

Returns

Vector4

GetVertexBound(int, int, int, int)

Return Quad NDC coordinate for vertex. Ouput: x(left), y(right), z(top), w(bottom)

protected virtual Vector4 GetVertexBound(int viewportWidth, int viewportHeight, int deskWidth, int deskHeight)

Parameters

viewportWidth int
viewportHeight int
deskWidth int
deskHeight int

Returns

Vector4

OnAttach(IRenderTechnique?)

Called when [attach].

protected override bool OnAttach(IRenderTechnique? technique)

Parameters

technique IRenderTechnique

The technique.

Returns

bool

OnDetach()

Called when [detach].

protected override void OnDetach()

OnUpdateCanRenderFlag()

Called when [update can render flag].

protected override bool OnUpdateCanRenderFlag()

Returns

bool

Render(RenderContext, DeviceContextProxy)

Called when [render].

public override void Render(RenderContext context, DeviceContextProxy deviceContext)

Parameters

context RenderContext

The context.

deviceContext DeviceContextProxy

The device context.