Skip to main content
GameDev.net gamedev.net
🔒 Locked

Hardware vertex processing

Started by glassJAw Jul 19, 2003 at 1:17 AM 1 replies 300+ views
Original Post
glassJAw
glassJAw
How do I check if the video card can use D3DCREATE_HARDWARE_VERTEXPROCESSING in IDirect3D8::CreateDevice()? I couldn''t find it in the D3DCAPS8 structure. If I specify that flag and hardware processing is unavailable, will the device automatically be created with software vertex processing or will the call fail? If the call fails: What would happen if I make the call with mixed-mode processing? Would that also fail if hardware processing is unavailable?
Kryptus
Kryptus
Here''s an answer, it''s in Visual Basic but I''m sure you''ll get the idea.

Set D3DDevice = D3D.CreateDevice(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, hWnd, D3DCREATE_HARDWARE_VERTEXPROCESSING, D3DPP)

If D3DDevice Is Nothing Then Set D3DDevice = D3D.CreateDevice(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, hWnd, D3DCREATE_SOFTWARE_VERTEXPROCESSING, D3DPP)

This code will see if hardware vertex processing can be used, if not, try software. I hope that helps
don
don
D3DDEVCAPS_HWTRANSFORMANDLIGHT

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.