directx-10

E_INVALIDARG: An invalid parameter was passed to the returning function

我的未来我决定 提交于 2019-12-02 17:57:59
问题 I'm trying to make simple SlimDX example to test some performance vs GDI and unfortunately I got stuck on the very beginning. I've created simple Console Application in VS2010 and added this code to programs main method: // 0. STEP SlimDX.Direct3D10.Device device = new SlimDX.Direct3D10.Device(DriverType.Hardware, DeviceCreationFlags.BgraSupport); SlimDX.Direct2D.Factory factory = new SlimDX.Direct2D.Factory(); // 1. STEP Texture2DDescription textureDesc = new Texture2DDescription();

Copy Texture to Texture

守給你的承諾、 提交于 2019-12-02 08:29:18
I've done 2 programs to use Shared Resources, running on SlimDX & DirectX10. One program will display the shared texture on a 3D mesh. The 2nd program will load an image as texture. So far I need to pass the shared handled everytime the texture is update from a new image. Now, is there a way that I can initialize a fixed size shared texture (Texture2D), then everytime when I load a new image, all I need to do is load it as texture, then copy it to the existing texture. This way the shared handle would not change, and I can save some overhead of passing the shared handle. For DirectX9, I do

E_INVALIDARG: An invalid parameter was passed to the returning function

我们两清 提交于 2019-12-02 07:55:07
I'm trying to make simple SlimDX example to test some performance vs GDI and unfortunately I got stuck on the very beginning. I've created simple Console Application in VS2010 and added this code to programs main method: // 0. STEP SlimDX.Direct3D10.Device device = new SlimDX.Direct3D10.Device(DriverType.Hardware, DeviceCreationFlags.BgraSupport); SlimDX.Direct2D.Factory factory = new SlimDX.Direct2D.Factory(); // 1. STEP Texture2DDescription textureDesc = new Texture2DDescription(); textureDesc.Width = 512; textureDesc.Height = 512; textureDesc.MipLevels = 1; textureDesc.ArraySize = 1;

.NET How to detect if DirectX 10 is supported?

限于喜欢 提交于 2019-12-01 06:55:59
I would like to find out from .NET code whether DirectX 10 is supported on the machine, preferably without using managed DirectX or XNA assemblies. Thank you in advance! To check DirectX10, we're actually calling the D3DX10CheckVersion function via platform invoke. This requires presence of the D3DX10 DLLs in the C:\Windows\System32 or C:\Windows\SysWow64 folders (platform dependent). If these are not present, then you need to install the DirectX10 Runtime on the target PC. The actual support DirectX version / DirectX SDK version can be determined from the parameters to the P/Invoke call. Here

.NET How to detect if DirectX 10 is supported?

て烟熏妆下的殇ゞ 提交于 2019-12-01 04:13:01
问题 I would like to find out from .NET code whether DirectX 10 is supported on the machine, preferably without using managed DirectX or XNA assemblies. Thank you in advance! 回答1: To check DirectX10, we're actually calling the D3DX10CheckVersion function via platform invoke. This requires presence of the D3DX10 DLLs in the C:\Windows\System32 or C:\Windows\SysWow64 folders (platform dependent). If these are not present, then you need to install the DirectX10 Runtime on the target PC. The actual

How to save backbuffer to file in DirectX 10?

不问归期 提交于 2019-11-28 06:04:55
I want to render a video frame-by-frame using DirectX 10. The frames would be processed later by some other tool like mencoder or ffmpeg. I had no problems doing so in DX9 using D3DXSaveSurfaceToFile . Now, in DX10 I've found D3DX10SaveTextureToFile , but had no luck using it to save my backbuffer. I use the following code: ID3D10Resource *backbufferRes; _defaultRenderTargetView->GetResource(&backbufferRes); D3D10_TEXTURE2D_DESC texDesc; texDesc.ArraySize = 1; texDesc.BindFlags = 0; texDesc.CPUAccessFlags = D3D10_CPU_ACCESS_READ; texDesc.Format = backbufferSurfDesc.Format; texDesc.Height =

How to save backbuffer to file in DirectX 10?

放肆的年华 提交于 2019-11-27 01:11:31
问题 I want to render a video frame-by-frame using DirectX 10. The frames would be processed later by some other tool like mencoder or ffmpeg. I had no problems doing so in DX9 using D3DXSaveSurfaceToFile . Now, in DX10 I've found D3DX10SaveTextureToFile , but had no luck using it to save my backbuffer. I use the following code: ID3D10Resource *backbufferRes; _defaultRenderTargetView->GetResource(&backbufferRes); D3D10_TEXTURE2D_DESC texDesc; texDesc.ArraySize = 1; texDesc.BindFlags = 0; texDesc