Thanks for all your help guys!
@EvilSteve
d3ddev->Clear(0, NULL, D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER, D3DCOLOR_XRGB(0, 0, 0), 1.0f, 0);
done that now, thanks.
Yeh, I am getting d3d device to be null?!!? I dont understand why though. This only happens when hardware acceleration is on!
This is how it is declared:
LPDIRECT3DDEVICE9 d3ddev;
Its showing as:
__vfptr = CXX0030: Error: expression cannot be evaluated
Also I cant find "d3d9d.lib" in my SDK! I only have the normal one without debug! So ive commented this one out.
Im also getting a failure on this line when i debug:
if(FAILED(d3d->GetDeviceCaps(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, &D3DCaps))) return false;
which is what is causing the above to be null.
If I miss that line(comment out) then I get a failure on:
d3d->CreateDevice(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, hWnd, VertexProcessing, &d3dpp, &d3ddev)
Are all these occuring because I dont have d3d9d.lib? or is it some other problem?
I will also try and catch those memory leaks! With Trial and error i guess!
oh and by the way I am using D3DSWAPEFFECT_DISCARD :)
thanks