Questions tagged [directx11]

DirectX 11 is the primary graphics API for Microsoft platforms including Windows, Xbox One, and Windows phone.

DirectX 11 is the latest release of Microsoft's DirectX framework, which is the name of a collection of APIs, containing features to aid in game development. The most commonly used component is Direct3D which can be used to generate both and graphics.

This tag is for any question that involves the use of any of the components in the DirectX 11 framework.

757 questions
7
votes
4 answers

How best to handle ID3D11InputLayout in rendering code?

I'm looking for an elegant way to handle input layouts in my directx11 code. The problem I have that I have an Effect class and a Element class. The effect class encapsulates shaders and similar settings, and the Element class contains something…
JohnB
  • 763
  • 11
  • 19
6
votes
1 answer

What do these STATE_CREATION warnings mean in the DX11 debug output?

So I've been fighting my way through learning the DirectX 11 API with what little documentation there is out there and noticed some new D3D11 warnings in my debug output. (Atleast I think they are new, been rearranging my draw calls to try and solve…
Joel
  • 131
  • 2
  • 3
  • 10
6
votes
1 answer

World, view, projection matrix?

What does multiplying an object in local space with a WVP(world,view,projection) matrix do? My book says "local space to homogeneous clip space" Luna, Frank D. (2012-05-21). Introduction to 3D Game Programming with DirectX 11 (Kindle Location 5444).…
user73874
  • 61
  • 1
  • 1
  • 2
5
votes
2 answers

Why is there a different set-constant-buffer function for every shader type?

Why are there VSSetConstantBuffers(), GSSetConstantBuffers(), PSSetConstantBuffers() (and so on) instead of just one SetConstantBuffers() for all shaders? Should I have completely separate constant buffers for every shader type or should I use…
NPS
  • 2,314
  • 4
  • 27
  • 50
5
votes
1 answer

What do I need to reload after a device reset?

Is there a complete list of resources that need to be reloaded after a device reset? I want to make sure I'm not missing anything. Also, should I reload them from disk each time, or do I want to make in-memory copies?
Rei Miyasaka
  • 576
  • 6
  • 16
4
votes
1 answer

D3D11InfoQueue Isn't filtering out messages

I have followed the Coordinator's code advice from this page on how to query and filter the messages in the debug layer but it doesn't seem to be working. You can see from the following code that I try to filter out 2 messages but they still keep…
Elixir
  • 83
  • 1
  • 7
4
votes
1 answer

How do these Direct3D 11 components work together?

I am having a really hard time to understand how the following Direct3D components play together and what they do (or exist for) while creating a scene on the screen. render target view render target viewport back buffer target back buffer texture…
Tony Stark
  • 143
  • 3
4
votes
1 answer

Does changing a Rasterizer State affect every object (model) on the screen?

Quick easy question. When setting a Rasterizer State (like for example wireframe).....does that affect every object (model) on the screen? For example, let's pretend I have 2 cubes. I use: devcon->RSSetState(pRSWireframe); Will that affect all the…
user6465
3
votes
1 answer

How do I draw a full screen quad in DirectX 11?

How do I draw a full screen quad that shows red on the screen?
terry
  • 31
  • 1
  • 4
3
votes
2 answers

Unused constant buffers in shaders

If you define a constant buffer in a shader, for example cbuffer test : register(c2) { float4x4 data; } But never actually use the data in the shader, does that incur any runtime cost at all? It's convenient for me to do this but not at the…
JohnB
  • 763
  • 11
  • 19
3
votes
1 answer

Depth Stencil buffer mandatory?

If I disable depth and stencil buffering, do I have to create and set the depth stencil buffer?
thumbmunkeys
  • 295
  • 1
  • 15
2
votes
3 answers

How can I track down outstanding references to a D3D swap chain?

On direct3d_11.1 initialisation the swapchain is resized to the desired proportions but after the getting the backbuffer it isn't released. I check the return value and check its address which doesn't get nullified. It can't for the life of me see…
Elixir
  • 83
  • 1
  • 7
2
votes
0 answers

DXGI - Frame rate drops from ~8000 FPS to ~1500 FPS when switching to full screen mode

I've created a simple app with a DirectX11 device and swap chain (IDXGISwapChain). All it does is clear the screen with a color and call Present(0, 0) on the swap chain. The app handles full screen/windowed mode transition by itself (I passed…
user25894
  • 51
  • 1
  • 4
2
votes
1 answer

how does an SM5 shader handle loops and if statements? (HLSL/CG)

How does an SM5 compilation handle loops and if-else statements, are branching execution routines unwound and if so, to what degree? Is it only Direct Compute that can optimize branching code? searchwords: dx11, shadermodel5,
bandybabboon
  • 253
  • 3
  • 12
2
votes
1 answer

Can I count all the allocated textures in D3D11?

Is it somehow possible to get the count of all texture objects on a device?
clamp
  • 563
  • 2
  • 7
  • 19
1
2 3 4 5