Jump to content
  • Advertisement
Sign in to follow this  
whizkid667

IDirect3DDevice9::BeginScene failed: D3DERR_INVALIDCALL

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

When I ran my application in DirectX Control panel 'retail version' I didn't get any error. But as soon as I changed to the Debug version I got this error : "BeginScene failed: D3DERR_INVALIDCALL Direct3D9: (ERROR) :BeginScene, already in scene. BeginScene failed." I know this comes when I call the begin scene again without using the end scene. What I tried in my application was to toggle between full screen and windowed mode. So as the user gives the command to go to the full screen mode I release the present Device pointer and create another device. When I switch from Windowed to full screen mode there is no error. The error only creeps up when I come back from full screen to windowed mode. I have used the Begin scene and end scene functions only once and it is not repeated anywhere. My strong suspicion is that the device may get released in between the begin scene and end scene and so when the begin scene is called again it gives an error. But again, the point is that am creating a new device pointer and will the Begin scene function of one device affect the another. If it affects, then why didn't it give an error when I switched from Windowed to full screen???

Share this post


Link to post
Share on other sites
Advertisement
You shouldn't be releasing your device to change mode, you should use the IDirect3DDevice9::Reset() function to do that. And only call that outside of the BeginScene..EndScene block.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!