Archived

This topic is now archived and is closed to further replies.

DirectX, TnL and shaders

This topic is 5380 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

How using DirectX 8 to check for Vertex, Pixel shaders and TnL hardware support? and also Vertex and Pixel shaders version hardware support? [edited by - Tolik on March 24, 2003 1:24:40 PM]

Share this post


Link to post
Share on other sites

D3DCAPSn caps;

if (caps.MaxStreams >= 1)
{
// Driver is DX8.0 capable or above
}

if (caps.DevCaps & D3DDEVCAPS_HWTRANSFORMANDLIGHT)
{
// chip can do vertex processing in hardware

if ( caps.VertexShaderVersion >= D3DVS_VERSION(1,1) )
{
// chip can do vs1.1 or above
}

if (caps.PixelShaderVersion >= D3DPS_VERSION(1,3) )
{
// chip can do ps1.3 or above
}
}


If a chip reports that it can do T&L but not any shaders, then it''s a first generation T&L chip, i.e. fixed function (like a GeForce2).

If you look at the D3DCAPSn (where n is 8 or 9) structure in the SDK documentation, you''ll find many more values you can query which will tell you more about the specific capabilities of the hardware.

--
Simon O''Connor
Creative Asylum Ltd
www.creative-asylum.com

Share this post


Link to post
Share on other sites