DirectX is a set of multimedia APIs from Microsoft aimed primarily at game developers. Popular APIs within the DirectX collection include Direct3D, XInput, and XAudio.

learn more… | top users | synonyms (1)

1
vote
1answer
433 views

DirectX post-processing pipeline

I'm trying to make a simple post processing pipeline, depicted as follows with 3 effects in this case: |------| |------| |------| I ...
0
votes
1answer
321 views

Weird shader compiler error

I am trying to draw a full screen quad without a vertex buffer. SV_VertexID should do the trick, although I get a weird error in my shader on the following line: PS_IN VS(uint VertexID : ...
5
votes
1answer
492 views

What are the rest of the blending functions used for?

In general, I know of five ways to make use of blending functions (these are for OpenGL, but replace glBlendFunc() with SetRenderState(D3DRS_SRCBLEND) and SetRenderState(D3DRS_DESTBLEND) for DirectX): ...
7
votes
2answers
1k views

D3D/DXGI handle fullscreen transition

I have a D3D11 application, and I want to add proper fullscreen suport. Now I can let DXGI switch my window to fullscreen for me, and I'm under the impression that DXGI will take care of everything ...
5
votes
1answer
1k views

2D Line drawing with Pixel Shaders

Recently I asked a question, what is the fastest way to render 2D lines using DirectX, and one of the answers mentioned this paper on Fast Prefiltered Lines which uses Pixel Shaders to accomplish ...
2
votes
1answer
152 views

Does the feature level affect multisampling?

I'm using DirectX 11 with the feature level 9_3 even though my computer could run 11_0, but I want to support older hardware as well. I'm using CheckMultisampleQualityLevels to check whether multi ...
1
vote
1answer
4k views

Will DirectX 10.1 graphics card work with DirectX 11?

I just started learning DirectX, but I have a problem with its version. I have ATI Radeon HD 4830, this card supports only DirectX 10.1, but when I ran dxdiag it said that I have DirectX 11, then I ...
2
votes
0answers
55 views

resizing directx control so that more of my object's environment is visible [closed]

I'm very new in 3D. I have a DirectX control which I want to be able to resize. A 3D object is shown in the control. On resize, I would like that object to stay the same size, only more of its ...
2
votes
2answers
2k views

OpenGL vs DirectX difference from Graphics card perspective?

I want to know the difference in purely hardware level if there is any. For example the most simple question: Is there a chip for DirectX and another chip for OpenGL? What do hardware producers do to ...
2
votes
1answer
444 views

How slow is generating a new Vertex Buffer?

I am currently working on a project that does 2D sprite-like graphics on Windows 8 (Metro-style app). For that purpose I am using Direct3D with quads to act as sprites. My problem is that it get's ...
2
votes
1answer
242 views

Direct3D shader compilation fails with constant buffers

I've been particularly annoyed by a 'bug' for a couple days involving D3DCompile and vertex shaders with constant buffers. I'm assuming the bug is my fault (missing flag or small nuance of the poorly ...
8
votes
1answer
295 views

Curious Transparent Holes Render Artifact

So I'm trying to implement "smooth" terrain in my block engine by giving each surface block a heightmap. Basically, what I do to generate these "heightmaps" for each block is I generate the heights ...
0
votes
1answer
502 views

DirectX9 fullscreen, render immediately?

Is it possible, somehow to avoid the single frame of black that appears before a DirectX9 window is displayed in fullscreen? My code looks like this. INT WINAPI wWinMain( HINSTANCE hInst, ...
0
votes
2answers
231 views

Is it viable to wrap D3D to change its API style?

I have an interest in developing games professionally and have started learning DirectX 11 to that end. I come from a Java background, but with the recent changes introduced with C++11, I've come to ...
2
votes
1answer
174 views

Nine Patch Images in DirectX

In Android development I found nine patch images very useful to draw images that have a fixed border. When the image is scaled the inner part scales, but the border stays at a fixed size. I was ...
0
votes
4answers
773 views

At this point in time, avoid XNA? [closed]

XNA seemed like a valid option a few years ago, but XNA was never a real success, and now it seems like a footnote, even Microsoft seems to treat it that way. Should I just go the DirectX route ...
1
vote
2answers
214 views

Diffuse light direction

I'm learning a tutorial from Rastertek about diffuse light with DX 11, here's the shader code: float4 LightPixelShader(PixelInputType input) : SV_TARGET { float4 textureColor; float3 ...
0
votes
2answers
482 views

SharpDX (DirectX) - possible to measure Frame time?

I'm trying to benchmark various ways to draw 2D lines and have a snag. A D3D10Device that I draw with (and flush) doesn't appear to block, so I can't accurately measure frame rate (or time to render 1 ...
1
vote
1answer
330 views

Is using Sprites the most recommended way for doing 2d animations with Directx?

I am working on a game engine of my own and I was using Vertex buffers to create triangles and then draw textures on them. Now I want to extend it so I can do simple 2d animations using "sprite ...
12
votes
3answers
4k views

Fastest way to render lines with AA, varying thickness in DirectX

So I'm doing some DirectX development, using SharpDX under .NET to be exact (but DirectX/C++ API solutions are applicable). I'm looking for the fastest way to render lines in an orthogonal projection ...
3
votes
1answer
192 views

Why are some objects not rendering properly?

Here's a button I exported from Blender into a .x format: Now here it is in the game with BasicEffect applied to everything: And now with my custom shader: And there's the problem. While the ...
3
votes
2answers
2k views

Does Monogame on Windows Desktop use OpenGL or DirectX by default?

if i use monogame 3.0 beta on windows desktop, does it use the directx renderer (sharpdx) or the opengl renderer by default? if it uses directx is there away to make sharpdx call directly? thanks!
1
vote
3answers
578 views

Event Based Render / Update Loop

I'm working on a few game dev tools which use OpenGL or DirectX to render 3D models (viewing). Consider your favorite 3D modeling software package (Softimage, Maya, 3DS Max, modo, etc.). Note that ...
1
vote
2answers
811 views

Go to fullscreen and back in directX

I'm now learning how to use directX (10 - 11), and i use materials from SDK samples, http://www.rastertek.com/ and http://takinginitiative.net/category/graphics-programming/directx-10-tutorials. But i ...
3
votes
1answer
237 views

What happens to a D3D11 application when Windows hibernates?

In D3D9 there was the concept of a "device reset". When a device reset occurred textures created with D3DPOOL_DEFAULT had to be recreated, but textures created with D3DPOOL_MANAGED didn't, because, ...
7
votes
4answers
217 views

Game development for multiple Microsoft platforms

I intend to develop games for Microsoft's Windows Store, however, I'm confused between their platforms, so please clarify those questions: Is there any technology (XNA, DirectX), so a game can be ...
1
vote
1answer
242 views

DirectX procedural programming

Well I'm learning DX11 and I hope someday I can start a simple 3D engine. I'm following tutorial series and I realised that I have no need to create any class to mantain my code (the tutorials also ...
0
votes
1answer
134 views

Why and how should I cast DirectX function parameters?

I'm learning DX11 and I found that in some D3D functions, a parameter has to be cast just like in the GetBuffer function of the swapChain: the third parameter has to be of type void*, so when calling ...
2
votes
1answer
307 views

DirectX11 CreateWICTextureFromMemory Using PNG

I've currently got textures loading using CreateWICTextureFromFile however I'd like a little more control over it, and I'd like to store images in their byte form in a resource loader. Below is just ...
3
votes
1answer
323 views

DirectX Unproject troubles

I have an orthographic projection and I try to unproject a point from screen space. Following are the view and projection matrices: var w2 = ScreenWidthInPixels/2; var h2 = ScreenHeightInPixels/2; ...
5
votes
2answers
1k views

ConsumeStructuredBuffer, what am I doing wrong?

I'm trying to implement the 3rd exercise in chapter 12 of Introduction to 3D Game Programming with DirectX 11, that is: Implement a Compute Shader to calculate the length of 64 vectors. Previous ...
0
votes
1answer
117 views

Can I publish an indie game on XBL made with directx

So I know that XNA can be used to publish games on Xbox Live Indie Games and I signed up for the $100/year subscription thing. I haven't downloaded XNA yet but I was wondering if I can publish a game ...
7
votes
3answers
769 views

Isometric smooth fog

I'm working on a simple 2d game with direct3d 9. It's a isometric game with diamond tiles and a staggered map. This is what I have: As you see I have some kind of fog which is acomplished by having ...
0
votes
1answer
573 views

DirectX 9.0c and C++ GUI

Well, I'm trying to code a gui for my engine, but I've got some problems. I know how to make a UI overlay but buttons are still black magic for me. Anything I tried was to compilcated ( if it goes big ...
1
vote
1answer
133 views

Texture the quad with different parts of texture

I have a 2D quad. Let say it's position is (5,10) and size is (7,11). I want to texture it with one texture, but using three different parts of it. I want to texture the part of quad from x = 5 to x ...
9
votes
4answers
1k views

Avoid if statements in DirectX 10 shaders?

I have heard that if statements should be avoid in shaders, because both parts of the statements will be execute, and than the wrong will be dropped (which harms the performance). It's still a ...
1
vote
0answers
1k views

Black Screen: How to set Projection/View Matrix [closed]

I have a Windows Phone 8 C#/XAML with DirectX component project. I'm rendering some particles, but each particle is a rectangle versus a square (as I've set the vertices to be positions equally offset ...
3
votes
1answer
188 views

blurry image rendered

I'm using Direct2D to render a PNG image using a ID2D1BitmapRenderTarget and then caling it's GetBitmap() function and rendering the image using ID2D1HwndRenderTarget::DrawBitmap(). Some of the ...
2
votes
1answer
132 views

Do shader program compilers optimise divide-by-PoT-constants to bitshift operations?

So just to restate that, let's say we have this: float f = g / 2; Given the divisor is a constant, will the shader compiler auto-optimise this to a bitshift operation, as some language compilers are ...
4
votes
1answer
803 views

Spherical to Cartesian Coordinates

Well I'm reading the Frank's Luna DirectX10 book and, while I'm trying to understand the first demo, I found something that's not very clear at least for me. In the updateScene method, when I press A, ...
0
votes
2answers
386 views

How can I capture every frame in DirectX 9 using a shader

This is actually a follow up to this question How to capture the screen in DirectX 9 to a raw bitmap in memory without using D3DXSaveSurfaceToFile The proponent of the best solution suggested that I ...
4
votes
1answer
2k views

In HLSL pixel shader , why is SV_POSITION different to other semantics?

In my HLSL pixel shader, SV_POSITION seems to have different values to any other semantic I use. I don't understand why this is. Can you please explain it? For example, I am using a triangle with the ...
5
votes
1answer
564 views

Zooming into Mouse Position

I'm trying to implement my camera class for a simulation. But I cant figure out how to zoom into my world based on the mouse position. I mean the object under the mouse cursor should remain at the ...
1
vote
1answer
167 views

Direct3d - Code structure

I'm learning directx in a master's degree and they taught us to have a GraphicsLayer class which is the one connecting with the direct3d library. That way this class is completly independent from the ...
1
vote
1answer
163 views

How can I efficiently render a very large model?

I have a huge model I want to draw in my XNA application; due to its size I am experiencing a tremendous loss of performance. The model has about 50,000,000 edges and has a size on disk of 205 MB in ...
3
votes
1answer
581 views

Where is the Shader Designer in Visual Studio?

I have Visual Studio 2012 Ultimate and I've been trying to access the Shader Designer. I searched through MSDN's text and Channel9's videos, but they keep failing to mention how to access it. Can ...
8
votes
3answers
9k views

Does Windows 8 still support DirectX 9?

Is Windows 8 supporting DirectX 9? Because I was looking through some samples written in C++ and DirectX 9 made for Windows 8. It wasn't that, like I know it ( look here ...
-2
votes
1answer
328 views

Confusing Callbacks

I'm trying to programm now a "game", and started with the EmptyProject that's provided by the DirectX SDK. The problem is that the Callbacks are confusing me. Can please someone explain me? Edit: ...
1
vote
2answers
858 views

Optimal way to learn DirectX? [closed]

I am finding it very difficult to learn DirectX 11. The MSDN website is just full of unorganized information that doesn't seem to help at all. I am particularly looking for something that explains ...
2
votes
1answer
138 views

DirectX 9.0c Lights?

I'm still learning DirectX from a book. It says that a graphiccards can only handle 15 lights. I'm just a bit confused , there are a lot of games using more lights, or are this just some alpha ...