directx-11

Error TRK0005 Failed to locate: “fxc.exe”. The system cannot find the file specified

风格不统一 提交于 2019-12-13 17:49:54
问题 I am converting a visual studio c++ direct x project from visual studio 2017 to visual studio 2015. So far I have changed the project build tools to v140. this is the current error message fxc.exe is the Effect-Compiler Tool and according to msdn it should be located in (SDK root)\Utilities\Bin\x86. I am not sure how to find that location. 回答1: I just encountered the same issue, but the solution I finally implemented is more of a hack: It seems that VS2015 expands the Windows SDK environment

Render thick lines with instanced rendering in directx 11

一世执手 提交于 2019-12-13 06:46:31
问题 I want to implement thick lines in directx11. I thought, I can use the instanced rendering technique to render a "high quality" geometry for each line like this picture shows: P1 and P2 are representing the not equidistant line verticies wich are given in as a "D3D11_PRIMITIVE_TOPOLOGY_LINELIST". The line thickness is stored into the constantbuffer. each line has the same thickness. The instance geometry also has an indexbuffer with the information about how to connect the vertices to

Application works in visual studio but release/debug exe does not

五迷三道 提交于 2019-12-13 06:24:23
问题 I am making a game using dx11 . When I compile and run the code in visual studio it works fine however if I try and run the code from the .exe file in either the debug or release folders I got the following error: "Could not initialize direct sound" I have not moved the folders/directories at all. Is this something to do with direct sound not being compatible with dx11 ? If so why would it still run inside visual studio. I am using MS Visual Studio 10. My direct sound class has the following:

Windows 8 Store App DirectX 11.1 Enabling Blendstate with loaded PNG texture with alpha

跟風遠走 提交于 2019-12-13 06:17:40
问题 I am loading a PNG with transparency to a texture with the following code: ComPtr<IWICStream> stream; ComPtr<IWICBitmapDecoder> bitmapDecoder; ComPtr<IWICBitmapFrameDecode> bitmapFrame; ComPtr<IWICFormatConverter> formatConverter; unsigned int width, height D3D11_SUBRESOURCE_DATA resourceData; ZeroMemory(&resourceData, sizeof(resourceData)); DX::ThrowIfFailed( m_wicFactory->CreateStream(&stream) ); DX::ThrowIfFailed( stream->InitializeFromMemory( rawFileBytes->Data, rawFileBytes->Length) );

Directx 11 depth test not working

断了今生、忘了曾经 提交于 2019-12-13 03:22:02
问题 I cannot get my program to correctly choose which models to place in front. I have followed the MSDN code exactly. My code appears to correctly draw all polygons in a particular call of DrawIndexed, but each subsequent call seems to cause models to be drawn in the order they are drawn, not based on whether they are closer to the screen. Here is my code for initializing Direct3d: DXGI_SWAP_CHAIN_DESC sd; ZeroMemory( &sd, sizeof( sd ) ); sd.BufferCount = 1; sd.BufferDesc.Width = width; sd

Compilers who are supports DirectX 11 libraries

瘦欲@ 提交于 2019-12-12 18:32:42
问题 Which compilers other than Visual Studio 2010 and 2008 support DirectX SDK Jun 2010? I am a beginner, and I want to program with DirectX 11, but i have a VERY limited internet and may download only little files (300 MB). It would be interesting to know all compilers that can be used to program for DirectX 11. 回答1: Here is a short list of compilers that actually include the headers and/or libraries of DirectX 10/11 of the box: TDM-GCC x64 builds starting with version 4.7 ship with DirectX 10

DirectX D3D11CreateDeviceAndSwapChain returning E_INVALIDARG

纵然是瞬间 提交于 2019-12-12 14:26:58
问题 I have the following call, and no matter what I try, hresult is always E_INVALIDARG: LogMessage(L"Creating swap chain. Emulation: " + std::to_wstring(useSoftwareEmulation) + L", Debugging: " + std::to_wstring(enableRenderDebugging)); HRESULT hresult = D3D11CreateDeviceAndSwapChain( (useSoftwareEmulation ? NULL : currentAdapter), (useSoftwareEmulation ? D3D_DRIVER_TYPE_WARP : D3D_DRIVER_TYPE_UNKNOWN), NULL, (enableRenderDebugging ? D3D11_CREATE_DEVICE_DEBUG | D3D11_CREATE_DEVICE_DEBUGGABLE : 0

Access floats of XMMatrix - () operator not working

折月煮酒 提交于 2019-12-12 12:16:10
问题 I'm trying to do some 3D stuff in DirectX (I'm migrating from OpenGL) and I've hit a snag. I want to access the values of an XMMATRIX and looking at the Microsoft documentation there should be an () operator: float& operator ()( size_t Row, size_t Column ); So I tried using as such: XMMATRIX i = XMMatrixIdentity(); float j = i(0,0); But Intellisense gives me the error: IntelliSense: call of an object of a class type without appropriate operator() or conversion functions to pointer-to-function

Programmatically creating directx 11 textures, pros and cons of the three different methods

二次信任 提交于 2019-12-12 07:09:51
问题 The msdn documentation explains that in directx 11 there are multiple ways to fill a directx 11 texture programmatically: (1) Create the texture with default usage texture and initialize it with data from memory (2) Create the texture with dynamic usage, use DeviceContext Map to get a pointer to texture memory, write to it, then use Unmap to indicate you are done (at which point I guess it is copied to the gpu) (3) Create the texture with staging usage and follow same steps as for dynamic

Invisible geometry in DX11

为君一笑 提交于 2019-12-12 02:56:32
问题 After struggling for many hours to understand and compensate for Microsoft's deprecation of D3DX in Windows 8, I've run into a problem that I can't shake off. The first time I started my program, it became immortal because of an access violation. After having restarted my computer and recompiling and running the same code, it doesn't crash, but the cube I should be seeing just isn't there. I'm also getting a warning that "object declared on the heap may not be aligned 16". AFAIK from my