Class DX11RenderBufferProxyBase
- Namespace
- HelixToolkit.SharpDX.Render
- Assembly
- HelixToolkit.SharpDX.dll
public abstract class DX11RenderBufferProxyBase : DisposeObject, IDisposable
- Inheritance
-
DX11RenderBufferProxyBase
- Implements
- Derived
- Inherited Members
Constructors
DX11RenderBufferProxyBase(IDeviceResources, bool)
Initializes a new instance of the DX11RenderBufferProxyBase class.
public DX11RenderBufferProxyBase(IDeviceResources deviceResource, bool useDepthStencilBuffer = true)
Parameters
deviceResourceIDeviceResourcesThe device resources.
useDepthStencilBufferbool
Fields
VSyncInterval
The vertical synchronize internal. Only valid under swapchain rendering mode. Default = 0
0: disable; 1: Sync with frame; More detail: Present(int, PresentFlags)
public int VSyncInterval
Field Value
d2dTarget
The D2D controls
protected D2DTargetProxy? d2dTarget
Field Value
Properties
BackBuffer
public ShaderResourceViewProxy? BackBuffer { get; }
Property Value
ColorBuffer
public ShaderResourceViewProxy? ColorBuffer { get; }
Property Value
ColorBufferSampleDesc
Gets or sets the sample description.
public SampleDescription ColorBufferSampleDesc { get; }
Property Value
- SampleDescription
The sample description.
D2DTarget
Gets the d2 d controls.
public D2DTargetProxy? D2DTarget { get; }
Property Value
- D2DTargetProxy
The d2 d controls.
DepthStencilBuffer
The depth stencil buffer
public ShaderResourceViewProxy? DepthStencilBuffer { get; }
Property Value
DepthStencilBufferNoMSAA
The depth stencil buffer
public ShaderResourceViewProxy? DepthStencilBufferNoMSAA { get; }
Property Value
Device
The currently used Direct3D Device
public Device1? Device { get; }
Property Value
- Device1
Device2D
Gets the device2 d.
public Device? Device2D { get; }
Property Value
- Device
The device2 d.
DeviceContext2D
Gets the device context2 d.
public DeviceContext? DeviceContext2D { get; }
Property Value
- DeviceContext
The device context2 d.
DeviceContextPool
Gets the device context pool.
public IDeviceContextPool? DeviceContextPool { get; }
Property Value
- IDeviceContextPool
The device context pool.
DeviceResources
Gets or sets the device resources.
protected IDeviceResources DeviceResources { get; }
Property Value
- IDeviceResources
The device resources.
Format
Gets or sets the texture format.
public Format Format { get; set; }
Property Value
- Format
The format.
FullResDepthStencilPool
public TexturePool? FullResDepthStencilPool { get; }
Property Value
FullResPPBuffer
public PingPongColorBuffers? FullResPPBuffer { get; }
Property Value
FullResRenderTargetPool
public TexturePool? FullResRenderTargetPool { get; }
Property Value
HalfResDepthStencilPool
public TexturePool? HalfResDepthStencilPool { get; }
Property Value
HalfResRenderTargetPool
public TexturePool? HalfResRenderTargetPool { get; }
Property Value
HasMSAA
Whether render target/depth stencil buffer are MSAA buffers.
public bool HasMSAA { get; }
Property Value
Initialized
Gets or sets a value indicating whether this is initialized.
public bool Initialized { get; }
Property Value
- bool
trueif initialized; otherwise,false.
MSAA
Set MSAA level. If set to Two/Four/Eight, the actual level is set to minimum between Maximum and Two/Four/Eight
public MSAALevel MSAA { get; }
Property Value
QuarterResDepthStencilPool
public TexturePool? QuarterResDepthStencilPool { get; }
Property Value
QuarterResRenderTargetPool
public TexturePool? QuarterResRenderTargetPool { get; }
Property Value
TargetHeight
Gets or sets the height of the target.
public int TargetHeight { get; }
Property Value
- int
The height of the target.
TargetWidth
Gets or sets the width of the target.
public int TargetWidth { get; }
Property Value
- int
The width of the target.
UseDepthStencilBuffer
Gets or sets a value indicating whether [use depth stencil buffer].
public bool UseDepthStencilBuffer { get; }
Property Value
- bool
trueif [use depth stencil buffer]; otherwise,false.
Methods
BeginDraw()
Begins the draw.
public virtual bool BeginDraw()
Returns
ClearRenderTarget(DeviceContextProxy, Color4)
Clears the render target.
public void ClearRenderTarget(DeviceContextProxy context, Color4 color)
Parameters
contextDeviceContextProxyThe context.
colorColor4The color.
ClearRenderTarget(DeviceContextProxy, Color4, bool, bool)
Clears the buffers with the clear-color
public void ClearRenderTarget(DeviceContextProxy context, Color4 color, bool clearBackBuffer, bool clearDepthStencilBuffer)
Parameters
contextDeviceContextProxycolorColor4clearBackBufferboolclearDepthStencilBufferbool
ClearRenderTargetBinding(DeviceContextProxy)
Clears the render target binding.
public void ClearRenderTargetBinding(DeviceContextProxy context)
Parameters
contextDeviceContextProxyThe context.
DisposeBuffers()
Disposes the buffers.
protected virtual void DisposeBuffers()
EndDraw()
Ends the draw.
public virtual bool EndDraw()
Returns
GetMSAASampleDescription()
protected virtual SampleDescription GetMSAASampleDescription()
Returns
- SampleDescription
Initialize(int, int, MSAALevel)
Initializes.
public ShaderResourceViewProxy? Initialize(int width, int height, MSAALevel msaa)
Parameters
Returns
OnCreateBackBuffer(int, int)
protected abstract ShaderResourceViewProxy? OnCreateBackBuffer(int width, int height)
Parameters
Returns
OnCreateRenderTargetAndDepthBuffers(int, int, bool, out ShaderResourceViewProxy?, out ShaderResourceViewProxy?)
protected virtual void OnCreateRenderTargetAndDepthBuffers(int width, int height, bool createDepthStencilBuffer, out ShaderResourceViewProxy? colorBuffer, out ShaderResourceViewProxy? depthStencilBuffer)
Parameters
widthintheightintcreateDepthStencilBufferboolcolorBufferShaderResourceViewProxydepthStencilBufferShaderResourceViewProxy
OnDispose(bool)
Releases unmanaged and - optionally - managed resources.
protected override void OnDispose(bool disposeManagedResources)
Parameters
disposeManagedResourcesbooltrueto release both managed and unmanaged resources;falseto release only unmanaged resources.
Present()
Presents this drawing..
public virtual bool Present()
Returns
RaiseOnDeviceLost()
Raises the on device lost.
protected void RaiseOnDeviceLost()
Resize(int, int)
Resize render target and depthbuffer resolution
public virtual ShaderResourceViewProxy? Resize(int width, int height)
Parameters
Returns
SetDefaultRenderTargets(DeviceContextProxy, bool)
Sets the default render-targets
public void SetDefaultRenderTargets(DeviceContextProxy context, bool isColorBuffer = true)
Parameters
contextDeviceContextProxyisColorBufferbool
Events
DeviceLost
Occurs when [on device lost].
public event EventHandler<EventArgs>? DeviceLost
Event Type
OnNewBufferCreated
Occurs when [on new buffer created].
public event EventHandler<Texture2DArgs>? OnNewBufferCreated