Click or drag to resize
AB4D logo

DXScene Properties

The DXScene type exposes the following members.

Properties
  NameDescription
Public propertyBackBuffer
Gets the BackBuffer as Texture2D
Public propertyBackBufferDescription
Gets the Description of the BackBuffer
Public propertyBackBufferRenderTargetView
Gets the RenderTargetView of the BackBuffer
Public propertyBackBufferShaderResourceView
ShaderResourceView that is created from BackBuffer. Created when DXScene is initialized with CreateBackBufferShaderResourceView property set to true and when swap chain is not used. The created ShaderResourceView can be used in another DXScene so that the renderer 3D scene can be used as a texture. This works only when both DXScenes are created by the same DXDevice.
Public propertyBackgroundColor
Gets or sets a Color4 that represents a background color for the scene. The color values must be alpha premultiplied - each red, green and blue value must be multiplied with alpha value (for example a fully transparent value is (0, 0, 0, 0) and not (0, 255, 255, 255) as in WPF.
Public propertyBackgroundRenderingQueue
Gets a RenderingQueue that is rendered first. Objects in this queue are not sorted and are rendered in the same order as they are added to the queue.
Public propertyBackgroundThreadsManager
Gets or sets a BackgroundThreadsManager that is used instead of BackgroundThreadsManager defined in DXDevice.
Public propertyBackgroundWaitingUntilRenderedThresholdTimeMs
Time in milliseconds that is used to enable background waiting until rendered. When DXViewportView.IsWaitingInBackgroundUntilRendered is true and after waiting for rendered in the last two frames is bigger then this time, then waiting is actually enabled (this prevents using background thread for simple scenes). Default value is 3 milliseconds.
Public propertyBuffersInitialized
Gets a Boolean that specifis if SwapChain and buffers are created. This property can be false when DXScene is initialized with zero width and height.
Public propertyCamera
Gets or sets an ICamera that is used to show the scene.
Public propertyComplexGeometryRenderingQueue
Gets a RenderingQueue that contains opaque and very complex 3D objects that are expected to take a lot of GPU time to render and should therefore start rendering as soon as possible. Usually this queue contains instanced objects, big point cloud objects or standard objects with many triangles. Objects in this queue are not sorted and are rendered in the main thread (no multi-threading rendering) and in the same order as they are added to the queue.
Public propertyCreateBackBufferShaderResourceView
When true and when swap chain is not used, then a BackBufferShaderResourceView is created from BackBuffer. Default value is false.
Public propertyDefaultCompleteRenderingStep
Gets a default CompleteRenderingStep.
Public propertyDefaultInitializeRenderingStep
Gets a default InitializeRenderingStep.
Public propertyDefaultPreparePostProcessingRenderingStep
Gets a default PreparePostProcessingRenderingStep. This rendering step is defined in the DefaultRenderPostProcessingRenderingStepsGroup.
Public propertyDefaultPrepareRenderTargetsRenderingStep
Public propertyDefaultRenderObjectsRenderingStep
Gets a default RenderObjectsRenderingStep.
Public propertyDefaultRenderPostProcessingRenderingStep
Gets a default RenderPostProcessingRenderingStep. This rendering step is defined in the DefaultRenderPostProcessingRenderingStepsGroup.
Public propertyDefaultRenderPostProcessingRenderingStepsGroup
Gets a default RenderingStepsGroup that groups PreparePostProcessing and RenderPostProcessing rendering steps.
Public propertyDefaultRenderSpritesRenderingStep
Gets a default RenderSpritesRenderingStep. This step is added to the RenderingSteps before the DefaultCompleteRenderingStep after the first SpriteBatch is created. The step is removed when the last SpriteBatch is removed from DXScene.
Public propertyDefaultResolveBackBufferRenderingStep
Public propertyDepthStencilBufferFormat
Gets or sets a depth stencil buffer format that is used in rendering the scene. Default value is D32_Float (32 bit depth buffer, no stencil buffer). If this value is changed, a new depth stencil buffer will be created in the next call to PrepareRenderTargetsRenderingStep.
Public propertyDepthStencilView
Gets the DepthStencilView
Public propertyDevice
Gets a DirectX device that is used by this DXScene.
Public propertyDpiScaleX
Gets or sets a float that represents a DPI scale factor in X direction: 1 means 96 DPI, 1.5 means 144 DPI, etc. This value is used in line and pixel rendering and scales the line thickness or size of pixels.
Public propertyDpiScaleY
Gets or sets a float that represents a DPI scale factor in Y direction: 1 means 96 DPI, 1.5 means 144 DPI, etc. This value is used in line and pixel rendering and scales the line thickness or size of pixels.
Public propertyDXDevice
Gets a DXDevice that was used to initialize this DXScene.
Public propertyDXHitTestOptions
DXHitTestOptions specifies hit testing parameters that are used with DXScene's hit testing.
Public propertyExecutePixelShaderPerSample Obsolete.
ExecutePixelShaderPerSample is obsolete. Use SupersamplingCount instead.
Public propertyForegroundRenderingQueue
Gets a RenderingQueue that is rendered after standard GeometryRenderingQueue but before TransparentRenderingQueue. Objects in this queue are not sorted and are rendered in the same order as they are added to the queue.
Public propertyFrameNumber
Gets an integer that represents the last rendered frame number (increased after each rendered frame)
Public propertyGeometryRenderingQueue Obsolete.
OBSOLETE: GeometryRenderingQueue is obsolete because it was slit into ComplexGeometryRenderingQueue, LineGeometryRenderingQueue, OtherGeometryRenderingQueue and StandardGeometryRenderingQueue. Please add your objects to any of those RenderingQueues. For Backwards compatibility the GeometryRenderingQueue is assigned to the OtherGeometryRenderingQueue.
Public propertyHardwareAccelerate3DLines
Gets or sets a boolean that specifies if rendering 3D lines is hardware accelerated by DXEngine.
Public propertyHeight
Gets an integer that represents a height of the Viewport
Public propertyIsAutomaticallyUpdatingBeforeEachRender
Gets or sets a Boolean that specifies if Update method is automatically called before each rendering of the scene (if it was not yet manually called). Default value is true.
Public propertyIsCachingCommandLists
Gets or sets a Boolean that specifies if Ab3d.DXEngine records all DirectX commands into DirectX CommandLists and reuses the command lists on next frame if only camera and light properties have changed. See remarks for more info. Default value is false.
Public propertyIsCurrentlyWaitingUntilRendered
Gets a Boolean that specifies if the background thread is currently waiting to complete rendering (this can be used for DirectXImage PresentationType where the DXEngine needs to notify WPF when the 3D scene is rendered; this is enabled by default - the DXViewportView.IsWaitingInBackgroundUntilRendered is set to true). When this property is true, then a new render pass should not begin (by default the InitializeRenderingStep is waiting on the main thread until the rendering is completed).
Public propertyIsEnabled
Gets or sets if this DXScene is enabled and is rendering the scene.
Public propertyIsInitialized
Gets a Boolean that is set to true when this DXScene is initialized - DXDevice are created and also required objects and collections are created: RenderingContext, RenderingQueues, PostProcessing. Also the SwapChain is created when the DXScene in initialized with InitializeSwapChain method (though the size of SwapChain buffers might not be final yet). Note that when IsInitialized is set to true, the DirectX buffers are initialized only when the size of viewport is already known. To see if buffers are initialized check the BuffersInitialized property.
Public propertyIsMaterialSortingEnabled
Gets or sets a Boolean that specified if sorting objects by their materials is enabled. Sorting objects usually improves rendering performance because objects with same materials are rendered one after another and this reduces the required DirectX state changes. Objects are sorted by their material hash value only when they are in the MaterialSortedRenderingQueue (usually all standard and opaque geometry objects). But sometimes user wants to have full control of the order in which the objects are sorted. In this case it is possible to disable material sorting. Default value is true.
Public propertyIsRendering
Returns true when DXScene is currently executing object rendering (is inside RenderScene method). This property can be checked from a background thread.
Public propertyIsSwapChainCreated
Gets a Boolean that specifis if DXScene will be using SwapChain to render the scene and if SwapChain is already created.
Public propertyIsTransparencySortingEnabled
Gets or sets a Boolean that specifies if sorting transparent objects by their distance to the camera is enabled. Default value is false. See remarks for more info.
Public propertyIsWaitingUntilRenderedEnabled
Gets a Boolean that specifies if the background waiting until rendered is enabled (when using DirectXImage presentation type, when DXViewportView.IsWaitingInBackgroundUntilRendered is true and when two consecutive frames took longer then BackgroundWaitingUntilRenderedThresholdTimeMs).
Public propertyLights
Gets a list of lights that are used in this DXScene.
Public propertyLineGeometryRenderingQueue
Gets a RenderingQueue that contains opaque and single-colored 3D line objects that are rendered with ThickLineEffect. Objects in this queue are not sorted but are rendered with using multi-threading.
Public propertyMasterDXScene
Gets a DXScene that is set when this DXScene is rendered a 3D scene that is defined in a MasterDXScene.
Public propertyMaxBackgroundThreadsCount
Gets or sets an integer that specifies the maximum number of background threads that can be used for multi-threaded operations. Value 0 means that no background thread will be used and that all rendering will be performed on the main thread. Value 4 means that besides the main thread up to four additional background threads can be used for rendering. The actually used number of threads can be lower if there is not a lot of objects to render. Default value is set to Environment.ProcessorCount minus 1 but 7 is the maximum value. See remarks for more info.
Public propertyMaxFarPlaneDistance
When MaxFarPlaneDistance is set to any positive value and OptimizeNearAndFarCameraPlanes is true, the calculated far plane distance is never bigger then the specified value. This value must be bigger then MinNearPlaneDistance or its value is not used. Default value is NaN.
Public propertyMinNearPlaneDistance
When MinNearPlaneDistance is set to any positive value and OptimizeNearAndFarCameraPlanes is true, the calculated near plane distance is never smaller then the specified value. Default value is NaN.
Public propertyMSAABackBuffer
Gets the MSAA BackBuffer as Texture2D (set if multisampling is used)
Public propertyMSAABackBufferDescription
Gets the Description of the MSAABackBuffer
Public propertyMSAABackBufferRenderTargetView
Get the RenderTargetView of the MSAA BackBuffer
Public propertyMultisampleCount
Gets an integer that represents a used multisample count (used for anti-aliasing)
Public propertyOptimizeNearAndFarCameraPlanes
Gets or sets a boolean that specify if NearPlaneDistance and FarPlaneDistance are automatically set by scene bounds (true by default). This can prevent z-fighting problems. If you want that that NearPlaneDistance and FarPlaneDistance are set manually, this property must be set to false.
Public propertyOtherGeometryRenderingQueue
Gets a RenderingQueue that contains opaque objects that cannot be rendered with StandardEffect. Usually this queue contains pixels, objects with physically based rendering material and other objects with non-standard effect (for example vertex colored materials). The objects in this queue are not rendered with using multi-threading. Objects in this queue are sorted so that they are grouped by material to minimize state changes.
Public propertyOverlayRenderingQueue
Gets a RenderingQueue that is rendered last. Objects in this queue are not sorted and are rendered in the same order as they are added to the queue.
Public propertyPostProcesses
Gets a collection of post processes that will be applied after rendering the 3D scene.
Public propertyRenderAntialiased3DLines
When false and UseGeometryShaderFor3DLines is also false, the 3D lines are rendered without antialiasing them. This greatly improves rendering performance. Default value is true.
Public propertyRenderConnectedLinesAsDisconnected
Gets or sets a boolean that specifies if all connected 3D lines (polylines, line arc, rectangle, etc.) are rendered as disconnected 3D lines (separate lines). Default value is false.
Public propertyRenderConnectedLinesAsDisconnectedLinesThicknessLimit Obsolete.
Gets or sets the LineThickness value that will limit rendering connected 3D lines (polylines, line arc, rectangle, etc.), as disconnected 3D lines (fully hardware accelerated). The connected 3D lines that have lower or equal LineThickness then the value of this property will be rendered as disconnected 3D line; other connected lines will still be generated on the CPU by Ab3d.PowerToys library. Default value is 3.
Public propertyRenderingContext
Gets the RenderingContext that defines the context information that are used during scene rendering.
Public propertyRenderingQueues
RenderingQueues is a read only collection of rendering queues that represent queues of low lever objects that are prepared to be rendered with DirectX. RenderingQueue are rendered in the same order as in the RenderingQueues list. The rendering is done in the RenderObjectsRenderingStep rendering step.
Public propertyRenderingSteps
Gets a RenderingStepsList that represents the rendering steps that are executed to render the 3D scene.
Public propertyRootNode
Gets or sets a root SceneNode - the first in the hierarchy.
Public propertyShaderQuality
Gets or sets a quality settings that specifies the type of shader that should be used to render the scene. If DXScene is used with DXViewportView, then this value is set from used GraphicsProfile. NOTE: Changing this property after the DXDevice is initialized will have no effect.
Public propertyShadowRenderingProvider
Gets a ShadowRenderingProvider that is currently used by this DXScene to render shadows. This property can be set by calling InitializeShadowRendering(ShadowRenderingProviderBase) method.
Public propertySSAABackBuffer
Gets the super-sampled BackBuffer as Texture2D (set if super-sampling is used)
Public propertySSAABackBufferDescription
Gets the Description of the super-sampled BackBuffer
Public propertySSAABackBufferRenderTargetView
Get the RenderTargetView of the super-sampled BackBuffer
Public propertySSAABackBufferShaderResourceView
Get the ShaderResourceView of the super-sampled BackBuffer
Public propertyStagingBackBuffer
Gets the StagingBackBuffer that is used when the final rendered image needs to be copied to main memory. This can be done only from staging buffer. When final render image in not copied to main memory the StagingBackBuffer is null.
Public propertyStagingBackBufferDescription
Gets the Description of the StagingBackBuffer
Public propertyStandardGeometryRenderingQueue
Gets a RenderingQueue that contains standard opaque objects that can be rendered with StandardEffect (all objects with StandardMaterial or objects that are created from WPF 3D objects). Objects in this queue are sorted so that they are grouped by material to minimize state changes and are also rendered with using multi-threading.
Public propertyStatistics
Gets RenderingStatistics class that contains various rendering statistics. Statistics is collected only when IsCollectingStatistics is set to true.
Public propertySupersamplingCount
Gets the super-sampling count that describes how much more pixels are rendered for each final pixel. The rendering is done on a scaled texture that is bigger for the amount specified by SupersamplingCount. At the end of rendering this texture is down-sampled into the texture with the final size. Valid values are 1 (no super-sampling), 4, 16 and 64. Value 4 means that width and height are multiplied by 2 and this produces a texture with 4 times as much pixels.
Public propertySupersamplingFactor
Gets the factor by which width and height are multiplied because of the SupersamplingCount.
Public propertySwapChain
Gets the SwapChain or null if SwapChain is not used.
Public propertyTransparentRenderingQueue
Gets a RenderingQueue that contains transparent objects. Objects in this queue are sorted by their distance to the camera - farthest objects are rendered first.
Public propertyUsedMultisamplingDescription
Gets a SampleDescription that describes what level of multisampling is used by the current DXScene. Multisampling is used to create antialiased images with rendering the multiple samples of the same pixel.
Public propertyUsedSwapChainEffect
Gets the SwapEffect that was used to create the SwapChain.
Public propertyUseGeometryShaderFor3DLines
Gets or sets a boolean that specifies if 3D lines are rendered with using GeometryShader that can create thick lines. If false, then all 3D lines will be rendered as simple DirectX lines with thickness 1. Default value is true.
Public propertyCode exampleUseSharedWpfTexture
Gets or sets a nullable Boolean that is used only when using BackBuffer without SwapChain and specifies if DXScene is using a shared resources (texture) that can be used by both DirectX 11 (DXEngine) and DirectX 9 (WPF). Using shared resources improves performance because the texture that is used to render the DirectX 11 image is shader with WPF composition engine. This means that the texture is not copied to main CPU memory and than back to GPU by WPF. When the value is not set by the user (is null), then the value is set in the DXScene initialization. It is set to true when DXEngine is using the same graphics card (adapter) then WPF. Otherwise the value is set to false.
Public propertyViewport
Gets or sets a Viewport that defines the area where the scene will be rendered.
Public propertyVirtualRealityProvider
Gets a virtual reality provider that is currently used by this DXScene. This property can be set by calling InitializeVirtualRealityRendering(VirtualRealityProviderBase) method.
Public propertyWidth
Gets an integer that represents a width of the Viewport
Top
See Also