Sign in to follow this  
SystemFiles

call reset succesfull

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
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
Quote:
Original post by SystemFiles
Were can i found the output file ?


What IDE are you using? Visual Studios? It is not a file. It should be part of your debug pan.

If you are using Visual Studios then hit ALT-2 or go to View->Output. When you run your program in Debug mode look at the Output tab which by default show be at the bottom.

Regards

Chad

Share this post


Link to post
Share on other sites
See Here, and Here.

What is the exact error you get, and what line of code does the debugger break on?

Also, this is a very bad habit to get into:
if( hRet == D3D_OK )
Instead, use:
if( SUCCEEDED(hRet) )
As it is, you're checking 1 of the 2 billion possible success codes.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this