Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
Alexei Tereschenko
Why not to use hardware vertex processing instead of software one if
it is available in D3D render driver? With hardware processing
testsprite2 runs three times faster on all videocards which I could
test.
  • Loading branch information
slouken committed Jun 16, 2009
1 parent e1e88f4 commit 4a1e5c0
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/video/win32/SDL_d3drender.c
Expand Up @@ -412,9 +412,16 @@ D3D_CreateRenderer(SDL_Window * window, Uint32 flags)
pparams.PresentationInterval = D3DPRESENT_INTERVAL_IMMEDIATE;
}

IDirect3D9_GetDeviceCaps(videodata->d3d, D3DADAPTER_DEFAULT,
D3DDEVTYPE_HAL, &caps);

result = IDirect3D9_CreateDevice(videodata->d3d, D3DADAPTER_DEFAULT, /* FIXME */
D3DDEVTYPE_HAL,
windowdata->hwnd,
(caps.
DevCaps &
D3DDEVCAPS_HWTRANSFORMANDLIGHT) ?
D3DCREATE_HARDWARE_VERTEXPROCESSING :
D3DCREATE_SOFTWARE_VERTEXPROCESSING,
&pparams, &data->device);
if (FAILED(result)) {
Expand Down

0 comments on commit 4a1e5c0

Please sign in to comment.