Directx 11 issue and WPF interloping

Asked By 20 points N/A Posted on -
qa-featured

For interloping WPF and Directx 11 a shared surface queue is necessary. Why is it so? In DirectX game full screen mode, the texture is not working. How do I resolve the problem? Will the GPU save the earlier data stored in a memory if the slot is reused? Also, is it possible to change the processor resources without any issue?

SHARE
Best Answer by cyrilsia01
Best Answer
Best Answer
Answered By 1065 points N/A #94370

Directx 11 issue and WPF interloping

qa-featured

There is a Project called SlimDX that might be able to help you.

You can use this tool within a WPF application, however, you’ll need to do some effort  to get it to work.  There is an airspace issue unless you use D3DImage within WPF, which requires using a DirectX 9Ex shared surface to expose your DX11 content.

You can directly access this from

http://richardssoftware.net/Home/DirectX11Tutorials

Hope this resolves the Issue.

Answered By 10 points N/A #94371

Directx 11 issue and WPF interloping

qa-featured

Hello Anna,

Maybe it is the way that you are using the application that is causing the issue that you are getting. Try using it in the following way and see if it will help:

using SlimDX.DirectInput;

private DirectInput directInput;
private Keyboard keyboard;

[...]

//init
directInput = new DirectInput();
keyboard = new Keyboard(directInput);
keyboard.SetCooperativeLevel(form, CooperativeLevel.Nonexclusive | 
CooperativeLevel.Background);
keyboard.Acquire();

[...]

//read
KeyboardState keys = keyboard.GetCurrentState();

But it is highly recommended by Microsoft that you should use SlimDX.RawInput.

Microsoft claims that new applications should utilize Windows message loop for the keyboard as well as the mouse input instead of DirectInput, and they should also make use of XInput instead of DirectInput for Xbox 360 controllers.

Regards,

Carl

Related Questions