Jump to content
  • Advertisement
Sign in to follow this  
SystemFiles

call reset succesfull

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

How to call reset succesfull i now do this: HRESULT WINAPI nReset( LPDIRECT3DDEVICE9 m_pD3Ddev, D3DPRESENT_PARAMETERS* pPresentationParameters ) { if( Font != NULL ) Font->Release( ); if( Font != NULL ) Font->OnLostDevice( ); HRESULT hRet = oReset( m_pD3Ddev, pPresentationParameters ); if( hRet == D3D_OK ) { if( Font != NULL ) Font->OnResetDevice( ); } return hRet; } If i change resolution or ALT+TAB it doesnt crash but i dont see my text.

Share this post


Link to post
Share on other sites
Advertisement
Your problem is the Font->Release(). If you remove this it should work. If you release your font it no longer exists...

Share this post


Link to post
Share on other sites
Quote:
Original post by SystemFiles
Thx, It works if i ALT+TAB but when i change resolution it crash.


What does the directX debug output say. This should tell exactly what is going on when it happens.

Regards

CHad

Share this post


Link to post
Share on other sites
Go to your start menu-> then all programs -> then your microsoft directx SDK (date) folder -> then DirectX Control Panel.

When the control panel is in front of you click the Direct3D 9 tab. Then move the "Debug Output Level" all the way up to more. From there select the "Use Debug Version of Direct3D 9" switch. Under that select the "Maximum Validation" and "Enable Shader Debugging". "Break on Memory Leaks", "Break on D3D9 Error", and "Break on AllocID" you will be switching on and off once you realize what errors directX is reporting.

Finally add this at the top of one of you header files

#define D3D_DEBUG_INFO

Now when you run your program in debug mode directX will print text to your output window about what is happening.

Do all that and get back to us.

Regards

Chad

Share this post


Link to post
Share on other sites
Oke i dont really know how did works but i just set #define D3D_DEBUG_INFO above my RenderClass header. And when i start my game it only gives a black screen and then exit. If i disable "Break on Memory Leaks" or "Break on D3D9 error" then it start up but nothing get printed on the screen.

Share this post


Link to post
Share on other sites
Quote:
Original post by SystemFiles
Oke i dont really know how did works but i just set #define D3D_DEBUG_INFO above my RenderClass header. And when i start my game it only gives a black screen and then exit. If i disable "Break on Memory Leaks" or "Break on D3D9 error" then it start up but nothing get printed on the screen.


What does your debug output say when you don't have "Break on memory Leaks" or "Break on D3D9 error" selected?

Regards

Chad

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!