DeviceCaps.SupportsHardwareTransformAndLight Property (Microsoft.DirectX.Direct3D)
How Do I...?
- Check for Shader Support
Indicates whether the device supports transformation and lighting in hardware.
Definition
Visual Basic Public ReadOnly Property SupportsHardwareTransformAndLight As Boolean C# public bool SupportsHardwareTransformAndLight { get; } C++ public:
property bool SupportsHardwareTransformAndLight {
bool get();
}JScript public function get SupportsHardwareTransformAndLight() : boolean
Property Value
System.Boolean
Value that is true if the device supports transformation and lighting in hardware, or false if it does not.This property is read-only.
How Do I...?
Check for Shader Support
This example shows how to check the hardware device for shader support.
To determine whether the hardware device supports shaders, Microsoft Direct3D allows the application to check the shader version.
To check for shader support:
- Obtain the device's capabilities by using the Manager.GetDeviceCaps method.
- Using the capabilities object obtained with the previous call, check the shader version by calling Caps.VertexShaderVersion.
[C#] public bool CheckShaderSupport() { Version v1_1 = new Version(1,1); // check version is at least shader 1.1 // retrieve the device caps Caps caps = Manager.GetDeviceCaps(0, DeviceType.Hardware); // check the supported shader version if ((caps.VertexShaderVersion >= v1_1) && (caps.PixelShaderVersion >= v1_1)) { return true; } return false; }