The application made a call that is invalid. Either the parameters of the call or the state of some object was incorrect.
Enable the D3D debug layer in order to see details via debug messages.
An user of my app is having some problem capturing the screen with the DesktopDuplication API. Upon starting the capture, the app crashes because the app is unable to release the frame of the OutputDuplication. User's PC details: Windows 10.0.18362.0, 64 bits Nvidia GeForce GTX 960, driver version 441.66 Error [...] read more
I have a Direct2D render target created with ID2D1Factory::CreateDxgiSurfaceRenderTarget. When I receive a WM_SIZE message, I try to resize the corresponding swap chain by calling IDXGISwapChain::ResizeBuffers, but it fails with DXGI_ERROR_INVALID_CALL (0x887a0001). I believe it's because of the following stated by the ResizeBuffers documentation: > You can't resize a swap [...] read more
I am having issues retrieving a swapchain and device from directx. further info is in the code void GXDX::StartUp(HWND* mainWindow,int w, int h) { //width and height are members of GXDX width = w; //contains the width height = h; //contains the height this->mainWindow = mainWindow; // Is a handle [...] read more
I want to create multiple render target view and i tried it but i can't get buffer more than 2. I've already set DXGI_SWAP_CHAIN_DESC's BufferCount value as BufferSize UINT const BufferSize = 4; ID3D11Texture2D* BufferTemp; ID3D11RenderTargetView** RenderTargetView = new ID3D11RenderTargetView*[BufferSize]; for (UINT i = 0; i < BufferSize; i++) { [...] read more
I have an implementation in directx9 where I have taken GDI DC to render drawing. But the similar code in directx11 does not get GDI DC instead throws invalid call exception. Implementation in directx9: IF_DX9ERR_THROW_HR(m_spIDevice->CreateTexture(UINT(cSizeOverlay.cx), UINT(cSizeOverlay.cy), 1, D3DUSAGE_DYNAMIC, D3DFMT_X8R8G8B8, D3DPOOL_DEFAULT, &m_spIOverlay, nullptr)); m_spIOverlaySurface = nullptr; IF_DX9ERR_THROW_HR(m_spIOverlay->GetSurfaceLevel(0, &m_spIOverlaySurface)); D3DSURFACE_DESC descOverlay; ::ZeroMemory(&descOverlay, [...] read more
When calling IDXGISwapChain::ResizeBuffer() the call fails and returns this error from the HRESULT 0x887a0001 otherwise known as DXGI_ERROR_INVALID_CALL. What happens prior to this call is, I call ID3D11DeviceContext::ClearState() and release the ID3D11RenderTargetView and ID3D11DepthStencilView. The above views are the only views bound to the the IDXGISwapChain. I will post the [...] read more
I'm trying to make a simple frame counter for DirectX 12 games using Dear IMGUI. I simply want to overlay a small transparent window that displays the sequential order of frames during gameplay. To do so, I hook Present(), so I can get the SwapChain, and count the number of [...] read more
I want to create a swap chain that I can alter my alpha values so it can get semi-transparent. My code is here: #include <Windows.h> #include <d3d11.h> #include <d2d1_3.h> #include <dxgi1_6.h> #include <dwmapi.h> #pragma comment(lib, "d3d11.lib") #pragma comment(lib, "dwmapi.lib") #pragma comment(lib, "d2d1.lib") LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wparam, [...] read more
I am trying to render DirectX12 in SwapChainPanel by using SharpDx but creating a SwapChain fails for an unknown reason. Here is a simplified version of what I have: // select adapter based on some simple scoring mechanism SelectedAdapter = SelectAdapter(); // create device using (var defaultDevice = new Device(SelectedAdapter, [...] read more
I tried to make this sample resizable. I added only this event handler on Resize, but I get error 0x887A0001. What can I do? static void form_Resize(object sender, EventArgs e) { backBuffer.Dispose(); renderView.Dispose(); device.Dispose(); swapChain.ResizeBuffers(1, form.ClientSize.Width, form.ClientSize.Height, Format.Unknown, SwapChainFlags.AllowModeSwitch); } read more
With Monogame I'm able to switch to fullscreen mode using ToggleFullScreen without any problems, but when I try to switch back to windowed mode I get this: > SharpDX.SharpDXException was unhandled HResult=-2005270527 > Message=HRESULT: [0x887A0001], Module: [SharpDX.DXGI], ApiCode: > [DXGI_ERROR_INVALID_CALL/InvalidCall], Message: The application made a call > that is invalid. [...] read more
First: I am using C# and C++ on windows 7. I have created a basic rendering engine in c++ with directx 10. It works good as a stand alone application. But, when I sending the Form.Handle of a WinForm I want to render inside to the engine it crashes during [...] read more
I'm learning DX11 by following this tutorial on DirectXTutorials.com. I'm at the point where I have created the device and it's context and now need to create the swap chain. However, when I call CreateSwapChainForCoreWindow(...), it leaves the swap chain as a nullptr and returns 0x887a0001. DirectX Error Lookup spits [...] read more
I have a POSCAR file containing atom positions (x,y,z) for a molecule. I am using this app to edit this POSCAR file. Now I want to display a model of the molecule to select a atom and changing parameters or deleting the selected atom. Now is my question: what is [...] read more
I've searched for the solution a lot, but i can't find it. Here is my code: namespace MySharpDXGame { public class Game { public static void Main() { Game game = new Game(); game.InitializeGraphics(); RenderLoop.Run(game.MainForm, game.RenderCallback); } private RenderForm MainForm; private const int Width = 1280; private const int Height [...] read more
I'm using Windows 7 Ultimate 64 bit with Visual Studio 2012 Ultimate and my GPU supports DirectX11. I was using SharpDX for a long time in 2.6.3 version. When I'm updating to any newer version my code and any code from examples is throwing SharpDXException: "Additional information: HRESULT: [0x887A0001], Module: [...] read more
In the following code, where device is an instance of ComPtr<ID3D12Device> that was successfully initialized with D3D12CreateDevice, I am getting an failing HRESULT. I get the value 0x887a0001. I would appreciate any ideas as to what I am doing wrong. DXGI_SWAP_CHAIN_DESC1 swapChainDesc = {}; swapChainDesc.Width = 0; swapChainDesc.Height = 0; [...] read more
I have a problem with switching from render to a windows form control to render to fullscreen. so I ripped the problem to a small example project that only includes the swapchain and device initialization and the fullscreen switch. using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using System.Windows.Forms; using [...] read more