call reset succesfull
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.
Your problem is the Font->Release(). If you remove this it should work. If you release your font it no longer exists...
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
DirectX Debug Output where can i found that use that or set it up.
Someone got a tutorial or post of how it works.
Someone got a tutorial or post of how it works.
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
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
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.
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
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement