0
\$\begingroup\$

I'm considering the use of SlimDX in a managed Windows Forms Application. Available with DirectX is DXUT. I use DXUT to handle events such as window resizing and 'lost devices.'

How well does SlimDX account for these occurrences? If I were to use SlimDX, how would I account for the functionality of DXUT in managed code?

\$\endgroup\$
0
\$\begingroup\$

SlimDX is a lightweight wrapper around DirectX APIs, and DXUT isn't a core DirectX API. Thus, SlimDX doesn't wrap it.

If you want to deal with window management, resizing, et cetera, you have to do that yourself using the Windows Forms API. When your form handles a resize event, you may need to deal with resizing your back buffer or viewport, depending on your specific needs.

Note that "lost device" scenarios are not something core to DXUT, they are an aspect of Direct3D 9 and are perfectly supported by SlimDX in basically exactly the same way you'd handle them natively.

\$\endgroup\$
  • \$\begingroup\$ What about the callbacks used in DXUT when the device is lost? How does SlimDX notify the application? Can I set callbacks for these scenarios? How would I release( or Dispose() ) the resources held in video memory? \$\endgroup\$ – P. Avery Mar 31 '14 at 17:40
  • \$\begingroup\$ SlimDX notifies your application the same way D3D9 does: the return code of Present or TestCooperativeLevel. \$\endgroup\$ – Josh Mar 31 '14 at 17:54
  • \$\begingroup\$ thanks! i found some deprecated samples here . These samples are more substantial than the current ones found on website... \$\endgroup\$ – P. Avery Mar 31 '14 at 18:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.