DirectX 11 is the latest release of Microsoft's collection of APIs which contain features to aid in game development.

learn more… | top users | synonyms (2)

3
votes
1answer
1k views

What are the valid DepthBuffer Texture formats in DirectX 11? And which are also valid for a staging resource?

I am trying to read the contents of the depth buffer into main memory so that my CPU side code can do Some Stuff™ with it. I am attempting to do this by creating a staging resource which can be read ...
1
vote
2answers
753 views

Why does calling CreateDXGIFactory prevent my program from exiting?

I'm using CreateDXGIFactory to get the graphics adapters and display modes. When I call it, it works fine and I get all the data. However, when I exit my program, the main Win32 thread exits, but ...
0
votes
1answer
655 views

E_FAIL: An undetermined error occurred (-2147467259) when loading a cube texture

I'm trying to implement a skybox into my engine, and I'm having some trouble loading the image as a cube map. Everything works (but it doesn't look right) if I don't load using an ...
5
votes
1answer
821 views

Memory allocation strategy for the vertex buffers (DirectX 10/11)

I'm writing a CAD system. I have a 3D scene and there are many different objects (walls, doors, windows and so on). The user can add or delete objects. The question is: How do I keep track of all the ...
4
votes
1answer
497 views

Per-vertex position/normal and per-index texture coordinate

In my game, I have a mesh with a vertex buffer and index buffer up and running. The vertex buffer stores a Vector3 for the position and a Vector2 for the UV coordinate for each vertex. The index ...
0
votes
3answers
3k views

Should I go with OpenGL to see my future in Game Development industry? [duplicate]

Possible Duplicate: Should I continue studying OpenGL or just switch to DirectX to give me a better chance of landing a job in the game industry? I tried Google but found quite old ...
1
vote
0answers
273 views

D3DX11CreateShaderResourceViewFromFile returns E_FAIL [closed]

When trying to create a texture, my call to D3DX11CreateShaderResourceViewFromFile keeps returning E_FAIL. To me that's about as generic as it gets, and I can't figure the problem out. The code looks ...
5
votes
4answers
1k views

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 ...
2
votes
1answer
1k views

Loading textures with SharpDX in Metro

I have converted my C# game from OpenTK (OpenGL) to SharpDX (DirectX) and have it up and running from Visual Studio 2010. I also have it up and running from Visual Studio 11 in Metro, in the Windows 8 ...
2
votes
1answer
276 views

Why does my game not update unless I'm moving the mouse?

I'm pretty confused by what's happening. Now that I've finally put something moving on my screen, I notice it doesn't update unless I move the mouse, or press a key, or trigger other events. Using ...
2
votes
1answer
898 views

DX11 StreamOut to Vertex Buffer from GeometryShader, can't clear Buffer?

I'm trying to use a geometry shader to continuously modify the positions of vertices, and save the modfied verts in a buffer. I have two vertex buffers, one is bound to the IA stage / the vertex ...
0
votes
1answer
3k views

Where have the Direct3D 11 tutorials on MSDN have gone?

I've had this tutorial bookmarked for ages. I've just decided to give DX11 a real go, so I've gone through that tutorial, but I can't find where the next one in the series is! There are no links from ...
4
votes
1answer
2k views

Managing Shaders and Objects in DirectX 11

The title explains my two biggest logical problems with developing a game. It's something I sit up at night thinking about, and that is "What is the most effective way to manage shaders" and "What is ...
1
vote
1answer
121 views

Drawback of using multiple bind flags

As far as I understand Direct3D 11 I have to specify certain BindFlags in order to use a resource in a specific stage of the pipeline. From my experience some combinations are more common like ...
3
votes
1answer
1k views

DirectX11, how to properly update a staging buffer with a structured buffer's count using CopyStructureCount

Alright, I'm not quite sure what is going on with my code at the moment. I'm currently getting around to defining behavior for my particle system, and to better do this I need to know how many ...
0
votes
2answers
2k views

Adapting DirectX samples to SlimDX

I'm trying to learn DirectX and SlimDX but I'm having a terrible time getting started. I'm taking the Triangle tutorial and trying to add color and transformations. Starting with controlling color, ...
4
votes
2answers
623 views

How to deal with large depth buffer values due to extreme distances

Alright, this is semi-related to my last question here So I've got an really big coordinate system and need to handle rendering large astral bodies from extreme distances. My current approach ...
1
vote
3answers
520 views

How do you rotate a cube map?

I'm looking for suggestions on this Say you have a cube map. You want to rotate it as efficiently as possible. You can render the cube map, rotate the camera, and render the scene to another cube ...
2
votes
2answers
753 views

Is the output from D3DCompile specific to one GPU, or not?

In Direct3D 11 there is a two-stage shader compilation process; you first pass the HLSL source code into D3DCompile, which outputs a "blob" of bytecode. You then take this blob and call ...
3
votes
1answer
1k views

What is the AlphaToCoverage blend state useful for?

Alright, just finished most of my early UI stuff and I wanted the windows to have some transparency. So I expanded my application to initialize and bind blend states so that my UI shader could ...
1
vote
1answer
433 views

Determine the stride of a DirectX Texture2D line?

Is there a way to determine, or preferably calculate/predict, the the stride of a line of a DirectX 11 Texture2D resource when using SharpDX? (E.g. Can we say the stride of a line is always a power ...
3
votes
1answer
2k views

Why can't I write to my render targets?

Alright, been working on setting up my first deferred rendering attempt using a light prepass technique in Direct3D 11. Anywho, I've been having problems understanding and using render targets. Never ...
6
votes
3answers
1k views

Which of these DirectX11 calls actually sends data to the GPU?

I'm trying to learn graphics programming and DirectX11. I'm trying to learn how to minimize CPU-GPU transfer and graphics programming in general. I have a question that I have been unable to answer ...
4
votes
1answer
697 views

How to fix odd artifacts at the edges of textures in DirectX 11?

In my DirectX 11 project, when I have textures they have odd artifacts at the edges. I've seen it before and searched online, but I can't find any DirectX examples that I can get to work. You can ...
0
votes
1answer
704 views

Real-Time Terrain Deformation

I can't really find anything at all on this topic. There's a bunch of YouTube videos that show people doing it, but there aren't any articles that I can find explaining the mechanics of it. In my ...
1
vote
3answers
197 views

Extracting blend values from uint32 not working as expected

I have the following shader configuration code : uint gBlendValue = 0xffffff00; Terrain.Effect.GetVariableByName("gBlendValue").AsScalar().Set(gBlendValue); And I have the following shader code : ...
5
votes
2answers
3k views

How can I convert an OBJ model into arrays of vertices and indices?

I'm writing a simple model loader just to learn how models are loaded. I wrote a program to convert .OBJ files in a custom format. (It's virtually exactly the same as .OBJ, I wrote it once again just ...
2
votes
2answers
586 views

How do I keep a triangle strip between geometry shader invocations?

I'm using a small geometry shader to build a "ribbon" from a set of points. For each point, I create 4 vertices that represent a section of the ribbon: [maxvertexcount(4)] void GS( point GS_Input ...
3
votes
1answer
2k views

Does the latest DirectX SDK support both Direct3D 9.0c and 11?

1) What is the latest version of DirectX SDK? 2) For my purposes I need DirectX 9.0c SDK and DirectX 11 SDK. Do I need to install these libraries separately or last DirectX SDK package contains both ...
6
votes
3answers
1k views

What features does D3D have that OpenGL does not (and vice versa)?

Are there any feature comparisons on Direct3D 11 and the newest OpenGL versions? Well, simply put, Direct3D 11 introduced three main features (taken from Wikipedia): Tessellation Multithreaded ...
2
votes
1answer
1k views

Why can I not map a dynamic texture in D3D?

I am trying to map a Texture2D resource in DirectX11 via SharpDX. The resource is declared as a ShaderResource, with Dynamic usage and the 'Write' CPU flag specified. My call however fails with a ...
1
vote
1answer
402 views

Marshalling C# Structs into DX11 cbuffers

I'm having some issues with the packing of my structure in C# and passing them through to cbuffers I have registered in HLSL. When I pack my struct in one manner the information seems to be able to ...
1
vote
1answer
602 views

Why are my scene's depth values not being written to my DepthStencilView?

I'm rendering to a depth map in order to use it as a shader resource view, but when I sample the depth map in my shader, the red component has a value of 1 while all other channels have a value of 0. ...
4
votes
2answers
2k views

How can I draw dashed or dotted lines with a pixel shader?

I am trying to draw the 2D graphics (like line, polyline, polygon etc.) using Direct3D for drawing I am using LINE_LIST. Now I want to make the lines thicker and apply patterns to the line as ...
8
votes
2answers
1k views

Why would you want multiple render targets?

In d3d11, you can bind multiple render targets ID3D11DeviceContext::OMSetRenderTargets. But why would you want to do this?
4
votes
1answer
2k views

How do I create a CPU read/write buffer in SlimDX (what are the legal combinations of Usage and CPUAccess flags)?

Currently, I create a vertex buffer in SlimDX like so: SlimDX.Direct3D11.BufferDescription Description = new SlimDX.Direct3D11.BufferDescription(); Description.BindFlags = ...
9
votes
1answer
6k views

DirectX11, how do I manage and update multiple shader constant buffers?

Alright, I'm having a hard time grasping how constant buffers are bound to a pipeline stage and updated. I understand that DirectX11 can have up to 15 shader-constant buffers per stage and each buffer ...
0
votes
4answers
771 views

Access violation in DirectX OMSetRenderTargets

I receive the following error when running the Triangle sample application for DirectX 11 in D3D_FEATURE_LEVEL_9_1: Unhandled exception at 0x527DAE81 (d3d11_1sdklayers.dll) in ...
5
votes
3answers
5k views

What happened to .fx files in D3D11?

It seems they completely ruined .fx file loading / parsing in D3D11. In D3D9, loading an entire effect file was D3DXCreateEffectFromFile( .. ), and you got a ID3DXEffect9, which had great methods ...
0
votes
1answer
756 views

D3D11 - Setting multiple ID3D11SamplerStates for the pixel shader stage once and leaving them be

In my Direct3D 11 application, I am using several sampler states to retrieve texture data. Some of them are used in all pixel shaders, some of them are only used in very specific ones. The question ...
2
votes
2answers
347 views

handling errors in a framework

I'm writing a D3D11 framework and I'm trying to clean it up a little, and I'm unsure how to handle errors and return codes in my classes/code. What is the "best" and cleanest way to implement error ...
2
votes
1answer
754 views

Direct3D11 feature level

If I set the directx feature level to D3D_FEATURE_LEVEL_9_3 but I have a graphics card which supports D3D_FEATURE_LEVEL_11_0 does that prevent directx11 features from working even though my graphics ...
3
votes
2answers
4k views

Mapping a Vertex Buffer in DirectX11

I have a VertexBuffer that I am remapping on a per frame base for a bunch of quads that are constantly updated, sharing the same material\index buffer but have different width/heights. However, ...
0
votes
1answer
699 views

Points in d3d11

D3D10/D3D11 drops support for point primitives. I'm trying to render a set of points for quick and dirty debug, any suggestions/quick hacks for getting large size points to show up in D3D11?
1
vote
1answer
754 views

Multiple Render Targets not saving data

I originally posted this question on stack overflow, but realised it might be better here. The original question can be found here I'm using SlimDX, targeting DirectX 11 with shader model 4. I have a ...
1
vote
1answer
1k views

Proper vertex buffer use

How're you supposed to use vertex buffers? Say you have 500 distinct deformable shapes/models in the world (ie you want to be able to change/delete vertices from the models somewhat arbitraily as the ...
2
votes
1answer
2k views

I cannot update a shader constant via a constant buffer in DirectX 11

I've tried everything I can think of, but I cannot get a constant buffer to update a variable in my shader in DirectX 11. I followed the examples on msdn. I read and re-read the articles on constant ...
2
votes
1answer
406 views

Hemicube algorithm d3d9 or d3d11, float valued colors

The hemicube algorithm renders the scene to 5 sides of a half-cube, from the perspective of each polygon. Assume you place the hemicube around me and render to the 5 sides. The idea is, we can see ...
5
votes
1answer
1k views

Render to Texture2DArray slices in DirectX11?

I would like to set a slice of a Texture2DArray as a render target in D3D/DirectX11. It's not clear how to do this. What I'm looking for is the DirectX equivalent of glFramebufferTextureLayer(), ...
0
votes
1answer
5k views

How did you learn DirectX 11? [closed]

How did you learn the DirectX 11 API? MSDN documentation, tutorials, blogs, sample applications, books, etc?