Advertisement

SharpDX createswapchain error (-2005270527)

Started by May 30, 2015 11:36 AM
3 comments, last by Stakhmich 9 years, 7 months ago

i try create device and swap chain, and draw some text in other window application. i try use sharpDX and slimDX. my code


SwapChainDescription description = new SwapChainDescription();
ModeDescription mode = new ModeDescription();
SampleDescription sample = new SampleDescription();

mode.Width = 100;
mode.Height = 100;
mode.RefreshRate = new Rational(60, 1);
mode.Format = Format.R8G8B8A8_UNorm;
mode.Scaling = DisplayModeScaling.Unspecified;
mode.ScanlineOrdering = DisplayModeScanlineOrdering.Unspecified;

sample.Count = 1;
sample.Quality = 0;

description.ModeDescription = mode;
description.SampleDescription = sample;
description.BufferCount = 1;
description.Flags = SwapChainFlags.None;
description.IsWindowed = true;
description.OutputHandle = handle;      //here i put window handle from other window application
description.SwapEffect = SwapEffect.Discard;
description.Usage = Usage.RenderTargetOutput;

Device.CreateWithSwapChain(DriverType.Hardware, DeviceCreationFlags.Debug, description, out device, out swapChain); 

when i careate render form and put into description.OutputHandle = renderForm.Handle - work fine. how i can draw in other window?

DXGI_ERROR_INVALID_CALL 0x887A0001

The application provided invalid parameter data; this must be debugged and fixed before the application is released.

If you turn on the DirectX debug runtime, does it tell you anything more informative?

Advertisement

DXGI_ERROR_INVALID_CALL 0x887A0001

The application provided invalid parameter data; this must be debugged and fixed before the application is released.

If you turn on the DirectX debug runtime, does it tell you anything more informative?

ok. i will try. you are draw in other window using directx/sharpdx/slimdx?


Device.CreateWithSwapChain(DriverType.Hardware, DeviceCreationFlags.Debug, description, out device, out swapChain); 

DeviceCreationFlags.Debug - this is i creates a device that supports the debug layer. or no?

After week searching i found errors reason - winapi! i update my window 7 and it's ok!

This topic is closed to new replies.

Advertisement