When Reset is called on my device it is returning D3DERR_INVALIDCALL. All of my resources are D3DPOOL_MANAGED and I release my depth buffer before the call. The application is single threaded, so it shouldn''t be sending it to another window. My loop suppresses windows messages to any functions which can make a call to my IDirect3DDevice9 so that shouldn''t be a problem. The presentation parameters I pass in to the Reset() are the same as the ones I use to initally set up directX. Here they are just for reference:
d3dpp.Windowed = FALSE;
d3dpp.SwapEffect = D3DSWAPEFFECT_FLIP;
d3dpp.BackBufferFormat = d3dform;
d3dpp.EnableAutoDepthStencil = TRUE;
d3dpp.AutoDepthStencilFormat = D3DFMT_D16;
d3dpp.BackBufferWidth = SCREEN_WIDTH;
d3dpp.BackBufferHeight = SCREEN_HEIGHT;
d3dpp.BackBufferCount = NUMBUFFERS;
d3dpp.FullScreen_RefreshRateInHz = D3DPRESENT_RATE_DEFAULT;
d3dpp.PresentationInterval = D3DPRESENT_INTERVAL_ONE;
d3dpp.hDeviceWindow = g_hwnd;
d3dform is D3DFMT_R5G6B5 on my ''puter.
any ideas why I am getting that stupid generic message or how I can set up some sort of a debug something to find out why?
Brett Lynnes
cheez_keeper@hotmail.com
quote:any ideas why I am getting that stupid generic message or how I can set up some sort of a debug something to find out why?
1) One of the parameters you pass is probably not possible on the hardware, e.g. a depth buffer format which won''t work with the back buffer format.
2) The debug D3D runtime will tell you exactly "why":
a. When you install the DirectX SDK you get the option to install the debug or retail runtime, if you''re developing software, always choose debug.
b. Go to the control panel and open the DirectX applet.
c. Go to the Direct3D tab and put the "debug output level" slider to maximum.
d. Run your application in the debugger (if using MSVC, press F5) and repeat whatever process causes it to fail.
e. Once it fails, close the app if necessary and return to MSVC, now look in the "output" pane (usually at the bottom). D3D will tell you about everything noteworthy, from information about its DLL being attached to your application, to warnings about things which may harm performance to the full reason why it gave an error.
f. If your application creates its D3D device in PURE mode, creating it in non-PURE mode should enable more checking and reporting.
g. If you aren''t using something like MSVC which allows you to view debug output, you can alternatively use a standalone debug output viewer such as the free DebugView from www.sysinternals.com or even the viewer which comes with the DirectX SDK.
thanks for the good reply. didn''t help. i did however manage to find it. i called CD3DFont to make a font. you need to release them too with the ->InvalidateDeviceObjects() method. *bonk self* simple error, terrible error message on mircosoft''s part. there really should be a way to find out what object is causing reset() to fail.
Brett Lynnes cheez_keeper@hotmail.com
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
With your permission, GameDev.net uses analytics cookies to understand how people use the platform.
You can accept analytics or continue with necessary cookies only.
Learn more