Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 30 Jan 2013
Offline Last Active Apr 14 2013 02:19 PM

Topics I've Started

[Solved] IDirect3DDevice9::Clear error

30 January 2013 - 12:47 PM

I've been learning DirectX over the last few days, and I seem to be having a problem with the Clear method for clearing the backbuffer: 


bool Draw()
	//clear the scene
		D3DCOLOR_XRGB(0, 0, 100), 1.0f, 0) == D3DERR_INVALIDCALL)
		return false;

	d3ddev->ColorFill(backbuffer, NULL, D3DCOLOR_XRGB(0, 0, 100));
        return true;


d3ddev is of type LPDIRECT3DDEVICE9 and otherwise works fine - if I comment out the d3d->Clear(...) line the rest will function as intended, no other issues elsewhere in the code (ColorFill will run and fill the screen dark blue, which seems to achieve the same effect). Curious as to why Clear doesn't work though. Any ideas?