Click or drag to resize
AB4D logo

DXSceneUseGeometryShaderFor3DLines Property

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.

Namespace: Ab3d.DirectX
Assembly: Ab3d.DXEngine (in Ab3d.DXEngine.dll) Version: 7.0.8865.1045
Syntax
C#
public bool UseGeometryShaderFor3DLines { get; set; }

Property Value

Boolean
Remarks

UseGeometryShaderFor3DLines 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.

Setting UseGeometryShaderFor3DLines to false can increase performance when showing many 3D lines.

NOTE
UseGeometryShaderFor3DLines must be set before the 3D objects are initialized (after the DXScene was created; when using DXSceneView it is recommended to change the value of this property in DXSceneDeviceCreated event handler). The following examples shows how to do that when using DXViewportView (named MainDXViewportView):

Example
C#
MainDXViewportView.DXSceneDeviceCreated += delegate(object sender, EventArgs args)
{
    // Called after DXScene and DXDevice were initialized and before SceneNodes are created
    if (MainDXViewportView.DXScene != null) // DXScene can be null in case of WPF rendering
        MainDXViewportView.DXScene.UseGeometryShaderFor3DLines = true;
};
See Also