Jump to content
  • Advertisement
Sign in to follow this  
e-milio

Device Reset fails with Points Sprites...

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

Hi... with VS C++ 6.0 and DX 9.0c i'm programming my own particle system using a dynamic VB with point sprites and a texture with alpha blending... al works correctly, and my particles are displayed as hoped, also i'm using to initialize and control the application messages and window, the mini framework from the SDK (the common files...), so the problems comes when the method Reset() is call over the device (for example you try to toggle to full screen or change the application window height or width). If you look at the code from SDK framework, the InvalidateDeviceObject() method is call, so i implemented on my particle system class this method, releasing all the device dependant objects [in this case, the VB and the texture], and also i've implemented the RestoreDeviceObject(), to re create the buffer for the points sprites and the textures after the reset, but unfortunately, this code is never execute because the reset fails, and the application aborts with an exit. I'm a totally beginner in D3D, so i'm sure that i'm missing something, by the way i've examined carefully the SDK point sprite example, and apart from that they don't use a texture, they execute the same SAFE_RELEASE() for the VB, at the InvalidateDeviceObject() method... Thanks one more time GameDev for this wonderful community!!! e-milio

Share this post


Link to post
Share on other sites
Advertisement
The problem is that you don't release something in your application. Enabling D3D debug build you'll see what objects aren't released (by ID). In control panels directx little program you can enable break in your build when certain ID is encountered. Just put that ID in the edit box, and your program will break in debug build when program encounters initalization of D3D object with that ID.
Then check if initalizatied object is released somewhere.

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!