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)

0
votes
1answer
13 views

Strange quaternion rotation

I was implementing some quaternion rotations in too my infant 3d game engine and the rotations were really strange? Excuses my cluelessness. Anyways this is what I have: static XMVECTOR ...
2
votes
0answers
44 views

HLSL defines vs static const

So far I've been declaring all my constant variables as static const in my hlsl shader code, yet virtually every single shader piece I've come across uses #defines instead. I know the reasons I would ...
0
votes
2answers
74 views

Quaternion Rotation Help

So I'm making a little engine with DirectX 11 and C++. (Some other help from other API's as well) DirectX has this function XMMatrixRotationQuaternion(XMVECTOR quaternion). I know nothing about this ...
3
votes
1answer
47 views

How do I edit a Texture2D at run-time to visually indicate connected tiles?

I'm making a 2D sandbox game in C# and MonoGame, and I have a couple of tile sprites. These tile are loaded in-game as Texture2Ds. I want to have blocks visually connect to adjacent blocks. An ...
0
votes
2answers
30 views

Using the DirectX Extension-Library with Windows 8

I need to use the extended DirectX-Library (D3DX...), but I am programming on Windows 8 (VS), so the DirectX 11-SDK is already included, but without the extension-library. Do I have to download the ...
-1
votes
0answers
92 views

How to learn C++ from a game development perspective? [closed]

I already know pretty much C++. I want to relearn C++ because I want to be a hardcore game developer. Which C++ topics should I give emphasis to? Which books should I read? which libraries should I ...
0
votes
0answers
27 views

How to take process snapshot for running DirectX programs? [closed]

Mabye it is more appropriate to post here than StackOverflow. This same question is there. Is it possible to take a complete restorable snapshot of a running or suspended DirectX program while NOT ...
0
votes
1answer
46 views

Constant buffer not updating

I'm trying to rotate models independently of each other however I cannot for the life of my figure out how. I have gotten to the stage of writing this: std::vector<int>::size_type st = ...
1
vote
1answer
39 views

Static constants set to default value in HLSL

I'm using dx11 and I'm working on SSAO. I am having wierd results, so I tried debugging it using RenderDoc and stepping through the pixel shader log, all the values of the static array seems to ...
1
vote
2answers
91 views

Directx fbx loader

I am trying to build a game with animation in c++ with DirectX. I have some fbx files with animation that I want to integrate in my game. But I do not want to draw the fbx files as a FbxScene or ...
0
votes
1answer
39 views

Diffuse Maps and DirectX

How would I load two diffuse maps onto one mesh. I have a mesh with multiple sub meshes but each one of those sub meshes has a vertex buffer and I don't think that's very efficient. How could I have ...
0
votes
0answers
28 views

How to take a screenshot with java from directX

I'm looking for a way to take a screenshot with a Java application of any running directX game. I use the following code Robot robot = new Robot(); GraphicsConfiguration config = ...
1
vote
1answer
89 views

How to handle game objects in DirectX

Coming from XNA, I would use the content pipeline and create XML files for game objects. However, if I changed something in the XML, I would need to do a rebuild of the project so it will create the ...
-2
votes
0answers
46 views

Creating a DirectX 11 Project with VS 2013 on Wndows 8?

I have problems to set up a DirectX 11 Project [no App] on VS 2013 Pro. I read that Win 8 already has the SDK integrated, but how can I use it's headers/library? Where are the library/include fodlers ...
0
votes
1answer
90 views

Ambient occlusion: Correct culling after anisotropy correction

I've added simple color based ambient occlusion to my game. First it looked like this (from giawa.com): The description: "Due to anisotropy, the ambient occlusion shading on the top left is ...
1
vote
0answers
81 views

Enable IME in a non-windows control

I'm writing my own game in DirectX using C#. I'm at the point where I'm implementing my own textbox, written from scratch. It has the very basic functions for now, but works well. I want, however, to ...
0
votes
1answer
45 views

HLSL SampleCmp compile error

When trying to compile the following HLSL: Texture2DArray gShadowmap : register(TEXTURE_REGISTER_DEPTH); SamplerState gShadowmapSampler : register(SAMPLER_REGISTER_DEPTH); // ... float3 projCoords ...
4
votes
2answers
168 views

How can I manually construct a right-handed orthographic projection matrix?

I need the formula to create a orthographic projection matrix. I am using GLM math libary and DirectX11. The reason I cannot use GLM to create it is because the NDC spaces are different between DX11 ...
1
vote
2answers
176 views

How to detect graphics API at runtime with SDL2?

Using SDL2, is there a way to determine at runtime whether the application is using OpenGL, OpenGLES, or DirectX? EDIT: If there is a way to figure it out without using the SDL2 API, I'm willing to ...
0
votes
1answer
58 views

Deferred Lighting - How to map to the generated texture?

I'm trying to implement deferred lighting and I have done the first and second pass but I'm stuck on the third as I don't know how to map from the current pixel being drawn to the generated texture ...
2
votes
0answers
85 views

How to implement simple shadows on XNA?

UPDATE: See photos below the description I try desperately to implement shadows on my XNA games. My game is a style of games like Voxel (minecraft). The problem is that I do not find support / ...
0
votes
1answer
50 views

HLSL Pixel Shader Sematics

I have a HLSl pixel shader that I'm using to create a deferred buffer, I have simplified the code to show you: struct PS_INPUT { float4 PosWVP : SV_POSITION; float4 ...
0
votes
0answers
20 views

Shader | Special Effect - Unit selection [duplicate]

I would like to know how the shaders used to show which unit is selected are made. Here is an image to illustrate. How the merge effect of the blue circles can be achieved ? I didn't found any ...
8
votes
3answers
633 views

Correct method for choosing the user's video cards?

My game uses DirectX 10, and I'm having a problem where users are reporting that my game isn't picking up on their graphics card. Instead it prefers to run on their integrated Intel card, ruining ...
0
votes
1answer
93 views

Fullscreen triangle SV_POSITION and deferred shading

So I'm trying deferred shading in DirectX11. I am using the following method (used in the FXAA shader and described here: http://www.altdev.co/2011/08/08/interesting-vertex-shader-trick/) to render ...
0
votes
1answer
93 views

DirectX UV coordinates are flipped

I'm loading a simple model, which is composed of vertices that have position, normal and UV texture coordinates. The thing is, displaying that model using DirectX 9 or 10 shows that the UV ...
6
votes
1answer
446 views

How do commercial games engines organise the index/vertex buffers?

Preface: This question is going to be coming from a Direct3D point-of-view, because that's what I'm familiar with. Obviously we incur a slight overhead every time we change the vertex or index ...
1
vote
1answer
45 views

What is DirectX 11's equivalent of D3DCAPS9::MaxVertexIndex of DirectX 9?

I'm porting a DirectX 9 program to DirectX 11. How do I get the value in DirectX 11 that is retrieved using D3DCAPS9::MaxVertexIndex in DirectX 9? Thanks in advance.
1
vote
1answer
126 views

Estimated framerate for custom engine?

I've been writing my own engine with C++ and DirectX 11. I've got 3d models loaded in with diffuse maps, normal maps, and shadows. There's other things with the engine but my question doesn't pertain ...
0
votes
1answer
63 views

DirectX9 Drawing Sprites out of place due to offset

This is my very first time into DirectX. Im trying to make a simple 2D game, just for learning the basics. And i've achieved that. The next step is to draw an animation using sprites. For that, i ...
3
votes
2answers
274 views

Update and render in separate threads

I'm creating a simple 2D game engine and I want to update and render the sprites in different threads, to learn how it is done. I need to synchronise the update thread and the render one. ...
-1
votes
1answer
44 views

Why does this code to render a triangle in SlimDX only show a black screen?

Here is the code: var elements = new VertexElement[] { new VertexElement(0,0,DeclarationType.Float3,DeclarationMethod.Default, ...
1
vote
0answers
162 views

Windows Phone 8.1 emulator for DirectX landscape

July 16, 2014 update: I have converted the SharpDX "MiniCube" sample project to a Universal 8.1 project. It is 100% self-contained. It will demonstrate this issue. There is a "READ ME.txt" file ...
0
votes
0answers
42 views

Transform texture coordinates when using shader

Assuming I define four vertices of a quad with texture coordinates that cover a whole texture or region of a texture, I can animate these coordinates by setting a transform using SetTransform( ...
0
votes
2answers
89 views

Was there any equivalent of glVertex3f in Direct3D?

I know that OpenGL's Vertex3f is a bit old but I can't find any information about suitable equivalent for that function that was used in DirectX. Was there any equivalent in DX?
0
votes
0answers
42 views

DirectX9 Normal/Bump Mapping Weird Texturing Artifact

As you can see the artifact here is like a triangle of the mesh getting more light. The important part of my code is below. This is the vertex declaration. VertexElement[0].Stream = 0; ...
3
votes
1answer
89 views

Using sky for indirect lighting - should I remove the sun?

I'm attempting to achieve slightly more realistic ambient lighting in outdoor scenes using the sky cubemap. When rendering an object, I first calculate the direct lighting contribution using ...
0
votes
0answers
50 views

DXGI - IDXGISwapChain::ResizeTarget _com_error 0x887A0022 (DXGI_ERROR_NOT_CURRENTLY_AVAILABLE)

I have (yet another) issue with DXGI in that I get a very strange error when I attempt to change display resolution while in fullscreen and I just can't seem to find the solution to it. This only ...
10
votes
1answer
296 views

Rendering only a part of the screen in high detail

If graphics are rendered for a large viewing angle (e.g. a very large TV or a VR headset), the viewer can't actually focus on the entire image, just a part of it. (Actually, this is the case for ...
2
votes
1answer
111 views

How can I compile a Direct3D 9 effect from a file?

I started working with shaders recently in DirectX9. I noticed that there is a D3DXCompileShaderFromFile function for IDirect3DVertexShader9 and pixel shader. Which compiles the shader and gives you ...
1
vote
0answers
61 views

How do I save my programmatically generated Mesh to a .X file in SlimDX? [closed]

The Mesh has been created properly with SlimDX, but Mesh.ToXFile(barMesh, "foo.x", XFileFormat.Text,CharSet.Unicode); throws a NullReferenceException. I checked that barMesh is not null. Inside the ...
8
votes
1answer
372 views

Picture rendered from above and below using an Orthographic camera do not match

I'm using an orthographic camera to render slices of a model (in order to voxelize it). I render each slice both from above and below in order to determine what is inside each slice. The model I ...
0
votes
1answer
65 views

Load Meshes with Bullet Physics

I just started implementing some physics in my game with Bullet Physics and I was just wondering how would i use bullet physics to load in meshes. For my for DirectX I load in x files into a ...
1
vote
1answer
52 views

How should I interpret these DirectX Caps Viewer values?

Briefly asking - what do the nodes mean and what the difference is between them in DirectX Caps Viewer? DXGI Devices Direct3D9 Devices DirectDraw Devices The most interesting for me is 1 vs 2. In ...
1
vote
1answer
37 views

HLSL 5.0 vector interpolation issues

I'm having issues with the depth components of my shadowmapping shaders. The shadow map rendering shader is fine, and works very well. The world rendering shader is more problematic. The only value ...
1
vote
0answers
72 views

AddFontMemResourceEx and D3DXCreateFont corruption

I'm trying to load a font from a buffer using AddFontMemResourceEx and then creating a D3D font with D3DXCreateFont. This works fine on every platform except Windows XP, where it causes the wrong ...
0
votes
1answer
67 views

How to load a DDS file with mipmaps

I believe there's a D3DX function that can load a DDS file with mipmaps but D3DX is deprecated. Any function/library that can load it and that's not deprecated? I need it for DirectX if it makes any ...
0
votes
0answers
95 views

How do I find the camera direction vector for 3D sound purposes? (C++, DirectX)

Question I'm trying to make a sound class for playing 3D sound effects with DirectSound and DirectX, without using DirectSound's 3D libraries. The plan is to have every game object constantly play ...
2
votes
1answer
202 views

Direct3D 11: Changing fullscreen resolution does not work

In my application I can switch back and forth between windowed and fullscreen mode using IDXGISwapChain::SetFullscreenState. When the WM_SIZE is handled, IDXGISwapChain::ResizeBuffers is called in ...
0
votes
1answer
39 views

DepthStencilView and alphaBlendState

I have create a 2D game with directx11 and i want to use a depth buffer instead of a painter's algorithm to draw the sprites but i have a problem since i'm not really good with directx 3d programming. ...