Archived

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

Problems to create a Device w/ D3DCREATE_HARDWARE_VERTEXPROCESSING

This topic is 5976 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

Hi, My english is not good, but I will try to explain my problem. I would like to create a device(DX8-VB6) with the flag D3DCREATE_HARDWARE_VERTEXPROCESSING, but an error occurs. My video card accept this feature. I saw in the DirectX Caps Viewer to know it. Look at my code: Dim DevCaps As D3DCAPS8 Direct3D.GetDeviceCaps D3DADAPTER_DEFAULT, _ D3DDEVTYPE_HAL, DevCaps If (DevCaps.DevCaps And D3DDEVCAPS_HWRASTERIZATION) Then Set Device = Direct3D.CreateDevice(D3DADAPTER_DEFAULT, _ D3DDEVTYPE_HAL, frm.hWnd, D3DCREATE_HARDWARE_VERTEXPROCESSING _ , PresentParameters) End If Why this error occurs? Am I doing something wrong? Thank you, Euler Almeida

Share this post


Link to post
Share on other sites
D3DDEVCAPS_HWRASTERIZATION means the device can draw textured polygons in hardware...

...NOT that it can transform and light vertices in hardware...

The cap you should be checking for to determine support for hardware vertex processing is D3DDEVCAPS_HWTRANSFORMANDLIGHT

If you want to use vertex shaders you should also check which shader version is supported, if it comes back as 0.0 there is no hardware support for vertex shaders (but there might be for the fixed function T&L [see above cap])

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

Share this post


Link to post
Share on other sites