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
3answers
239 views

Error on running exe, build using SharpDX

I have developed a windows application to read gamepad using SharpDx (XInput) and C# (VS 2008). The application is running smoothly in my development environment. But when i move to some other machine ...
0
votes
0answers
60 views

Determining desktop bounds by D3D9 adapter

I've got a Direct3D 9 application which normally runs full-screen. The user is able to select a display adapter to determine which screen it is shown on. I also offer a Windowed mode which launches ...
3
votes
1answer
1k views

Teamviewer doesn't show my game screen

I've been building a 3D engine from scratch using C# and I've tried to show the result to a friend of mine using Teamviewer. When my demo game starts he doesn't see it. He can only see the last active ...
1
vote
1answer
1k views

Can I use DirectX with C#?

I thought that if you wanted to make games using DirectX, you had to know C++. But I recently found out that that is not actually true. It looks like some parts of Direct3D can be used from C#. This ...
0
votes
2answers
263 views

how to detect same keyboard key press only once

I am designing a keyboard class that can detect the keyboard key press only one time but I still cannot figure out the way to do it. My goal is just check and perform the action only once when the ...
2
votes
2answers
268 views

Is it possible to use DirectX in pure C program?

I want to try something simple with Direct Sound. Just want to know if it's possible. Or maybe I need some other API?
0
votes
1answer
90 views

Just 2 images on a window loaded using DirectX10…But how?

I am a beginner to DX and I have tried looking everywhere for something very similar to this concept but can't find anything. I just want two rectangles on a window. Rectangle 1 : on some x,y with ...
3
votes
1answer
257 views

Finding Pixels within UV Coordinates

I am building lightmaps for 3D models. My lightmap algorithm needs to determine which pixels( lumels ) within the lightmap texture fall within the boundary of a mesh face( triangle )...this process ...
0
votes
0answers
102 views

Making a texture bank, pointer in vector killing me

I'm trying to make a texture bank. I'm not 100% as to whether I'm doing 2D or 3D but whatever, it's a basic texture bank. The goal is to use texture objects that I can use a pointer to so as to load ...
2
votes
1answer
132 views

Development with multiple libraries

I'm almost fresh to the game development and I have one question about libraries. If I choose one library, such as SFML, to develop the menu of my game, is it possible to merge with, for example, ...
2
votes
3answers
538 views

How to check if user has integrated graphics card?

I'm almost done with my Direct3D game. When user starts game first time it will adjust settings (and maximum settings) based on DirectX feature level starting from 9_1 up to 11_1. I have different ...
1
vote
1answer
66 views

How can I fix this transparency problem when my data is viewed from a certain angle?

using Microsoft.DirectX.Direct3D; using Microsoft.DirectX; I render a 3D data by setting device.RenderState.AlphaBlendEnable = true Now my top view looks like below, the outer surface layer ...
1
vote
1answer
234 views

Color grading, shaders and 3d textures

I'm trying to implement color correction with the 3d lookup table. The lookup table is actually just a 2d texture 256x16 and consists of 16 squares which one is 16x16. When it comes to rendering, I ...
1
vote
0answers
30 views

Align Object With Triangle

I currently am trying to figure out how rotate an object so it's aligned with a triangle along the Z Axis. I have the world matrix of the object and a triangle, which has it's 3 points and the normal. ...
5
votes
1answer
273 views

What does HLSL's tex2D return at (0,0)?

I'm trying to understand the mapping of texels to pixels, especially in the context of pixel shaders. I already found out the following: When I define a standard quad with vertices at integer ...
2
votes
1answer
363 views

The View-Matrix and Alternative Calculations

I'm working on a radiosity processor in DirectX 9. The process requires that the camera be placed at the center of a mesh face and a 'screenshot' be taken facing 5 different ...
1
vote
0answers
155 views

Connecting smoothly N textures on terrain

I started to create my own terrain in a quite common way, just like this: http://www.rastertek.com/tertut18.html . It is infinite and automatically generated (by using coherent noise). The areas are ...
12
votes
1answer
252 views

Accounting for waves when doing planar reflections

I've been studying Nvidia's examples from the SDK, in particular the Island11 project and I've found something curious about a piece of HLSL code which corrects the reflections up and down depending ...
0
votes
1answer
191 views

An API independent way of managing video memory?

I'm developing a game. The game architecture is very modular. I have a "Graphics Engine", which uses either a Direct3D or OpenGL renderer. However the user does not have access to the renderers ...
3
votes
2answers
62 views

Local shape color blending

I am trying to implement this in Unity 4 Pro. But I am stuck in the blending part. I don't understand how you could blend multiples textures/colors using multiples volumes on an object. How could you ...
4
votes
2answers
236 views

Open World Object Management

I'm currently creating a system that essentially creates a world at run-time based on a seed I choose. In this system, I made it so that there are certain "chunks" that divide up different sections of ...
3
votes
1answer
343 views

Vertex Buffer Sharing between DirectX11 and Directx9

In my d3d9 engine i want to take benifit of compute shader of d3d11. So firstly I created a vertex buffer in d3d11 with D3D11_BIND_UNORDERED_ACCESS and then tried to create the d3d9 vertex buffer ...
0
votes
0answers
49 views

C++, Direct3D - Creating mesh from texture [duplicate]

I am making a game similar to Minecraft. I want to create the mesh for the tool held in the players hand (e.g. a pickaxe). I have a texture for the tool which is 32x32 pixels and I want to be able to ...
1
vote
1answer
234 views

How do I copy the depth buffer to CPU memory in Direct3D 9?

I have code in OpenGL that uses glReadPixels to copy the depth buffer to a CPU memory buffer: glReadPixels(0, 0, w, h, GL_DEPTH_COMPONENT, GL_FLOAT, dbuf); How do I achieve the same in Direct3D? I ...
3
votes
1answer
194 views

Adding false if statement to pixel shader produces a lag

One of lines in pixel shader produces a lag (lower fps). I can't understand why. if (TextureEnabled) color *= texDiffuse.Sample(texDiffuseSam, input.UV); Interesting fact is: TextureEnabled is ...
4
votes
4answers
732 views

Face-Click Detection ( like in Minecraft )

I am working on a box-based game engine like minecraft and I was wondering how to detect the "clicked face" when placing blocks. I have created this engine in C++ ( DirectX / D3D ), C# ( XNA ) and ...
0
votes
3answers
430 views

XNAMath: Question on types XMFLOAT3/4, XMVECTOR (D3D 11)

I don't want to use XMVECTOR which i currently use in my DirectX 11 C++ game code. Because it is too much for me in memory. I want to use XMFLOAT3 or 4, but the problem is there is no matrix/vector ...
0
votes
2answers
391 views

First person camera: problem

I have created a simple camera class, moved it from my C# (XNA) source to C++ for d3d. Commonly it is okay, but something is wrong with rotation. If i increase its pitch/yaw values, according to ...
2
votes
1answer
258 views

Early Z-test / depth-test in DirectX 11

As a DirectX noob i'm trying to wrap my head around depth buffers and specifically how pixel shaders are called for obscured pixels. From what i understand, the rasterizer calls the pixel shader for ...
0
votes
1answer
412 views

Direct3D11 + Assimp imported model corrupted/failed

I use Assimp library to import vertex and index data from model file. I don't know how to correctly create index buffer from mFaces array of aiMesh. Or something wrong, because i my model is ...
3
votes
1answer
188 views

Gamepad thumbsticks active range

for my current project I use gamepad. I was successfull in hooking it up in C# through SlimDX. Everything works fine, only problem is that thumbsticks don't fully use the active range. If I move ...
1
vote
2answers
188 views

How can I use D3DXLoadMeshFromX with Direct3D 11?

I'm trying to write some class for loading meshes from X files. But I can't use the function D3DXLoadMeshFromX because its third parameter is LPDirect3DDevice9. In my D3D initialization code I ...
1
vote
1answer
108 views

Whats the point of this LPDIRECT3DDEVICE9 reference?

I'm going through the DirectX 9 MSDN documentation Which lead me to something rather peculiar, do you need a class reference in DirectX 9? Can someone tell me what the point of the class ...
0
votes
1answer
43 views

DirectX D3DXVec3Normalize unresolved external symbol

I have simple DirectX project: #include <d3dx10.h> #include <d3dx10math.h> #pragma comment(lib, "d3d10.lib") #pragma comment(lib, "d3dx10.lib") int main() { D3DXVECTOR3 u(1.0f, ...
2
votes
1answer
219 views

Do I need to update my DirectX SDK in order to fix a crash with D3D10_CREATE_DEVICE_DEBUG?

I am currently using the DirectX June 2010 SDK. Everything was working fine with my installation until recently. Unfortunately I'm not sure what changed or when, but now when I create a device with ...
2
votes
3answers
157 views

Is creating vertex/index buffer optimized this way?

I have some vertices in an array from which I create a vertex buffer. Let's say I have vertices: v1, v2, v3, v4 I use indices: 0, 1, 2, 3 Is there any performance impact if I change the indices ...
2
votes
0answers
139 views

Chunk Texture3D GPU generated vertices

I read GPU Gems 3 from NVidia about procedural terrain. It's quite interesting but not applicable for me because I only read the online version without the shipped DVD so I'm not able to download the ...
-1
votes
1answer
489 views

Is SDL a game engine? [closed]

I would like to ask if SDL is considered a game engine, or just a library like Open and Direct3D?
1
vote
0answers
65 views

Directx Texturing problem [closed]

I've recently started exploring Directx 11. I'm almost done the introduction so I started making my own *.obj parser and it works beautifully. I accounted for the right-hand coordinate system of 3ds ...
1
vote
2answers
268 views

how to set image resource path for D3DXCreateTextureFromFileEx method?

I try to merge all the image resources to a folder called resource. So, set image path as "resource/" but my directX framework only works if I compile at VS 2010. If I run from the debug folder it ...
2
votes
1answer
55 views

Is it possible to retrieve shader function names associated with a technique pass using the DirectX Effect API?

For example, given the pass pass p0 { SetVertexShader(CompileShader(vs_4_0, VSFunction())) SetPixelShader(CompileShader(ps_4_0, PSFunction())) } Ss it possible to retrieve the names ...
2
votes
1answer
101 views

Any possibility to render XNA scene via POV-Ray

We are creating special purpose application. Its not game but its 3d Application that functions like game. We require app to have different places and we want to allow user to roam inside such places ...
3
votes
1answer
275 views

Direct3D reducing DrawIndexed CPU usage

I am trying to optimise some of my rendering to get is useable on lower end machines (in my case a 2GHz i5 laptop with a GT 520M). A quick investigation showed that the GPU isnt actually getting to ...
1
vote
0answers
212 views

2D Camera transformation sidescroller

i am currently trying to dive into 2D programming with DirectX, especially bulding a tile based sidescroller. I have worked with some chapters from a book (Advanced 2D Game Development) but always ...
3
votes
1answer
108 views

What is the difference between DXGI_SWAP_EFFECT_DISCARD and DXGI_SWAP_EFFECT_SEQUENTIAL?

I have difficulty understanding the difference between those two values of the DXGI_SWAP_EFFECT enumeration. MSDN documentation states: DXGI_SWAP_EFFECT_DISCARD Use this flag to specify the ...
2
votes
2answers
154 views

How to correctly Dispose a SourceVoice once its finished

i am starting to play a sound with XAudio2 and SourceVoice and once its finished, it should be correctly disposed to not have any leaks. i was expecting it to be something like this: ...
2
votes
2answers
1k views

Does DirectX implement Triple Buffering?

As AnandTech put it best in this 2009 article: In render ahead, frames cannot be dropped. This means that when the queue is full, what is displayed can have a lot more lag. Microsoft doesn't ...
2
votes
1answer
93 views

Shader Variable Types

I have a simple question. what are the meaning of : half4 myHalf; myHalf.yyyy; myHalf.xxzz; // or myHalf.yw Thanks a lot !
1
vote
2answers
356 views

How to blend the sprite into background?

I try to blend the character into game but I still cannot remove the blue color in the sprite sheet and discover that the white area of sprite is semi-transparent. Before that, the color ...
3
votes
0answers
152 views

SSAO Distortion [closed]

I'm currently (attempting) to add SSAO to my engine, except it's...not really work, to say the least. I use a deferred renderer to render my scene. I have four render targets: Albedo, Light, Normal, ...