directx

Which parts of Graphics Pipelines are done using CPU & GPU?

Which parts of pipelines are done using CPU and which are done using GPU? Reading Wikipedia on Graphics Pipeline, maybe my question does not precisely represent what I am asking. Referring to this question, which "steps" are done in CPU and which are done in GPU? Edit: My question is more into which parts of logical high level steps n...

Missing Direct3D.dll dependency while using MDX

I have taken a perfectly working MDX piece of code to Windows 2008R2 (all DX drivers installed) and am getting the following, rather bizarre, error. Any idea what this could mean? System.BadImageFormatException: Could not load file or assembly 'Microsoft.DirectX.Direct3D.dll' or one of its dependencies. is not a valid Win32 application...

Using the Windows 7 and DirectX SDKs with VS2005

I have Visual Studio 2005 and want to teach myself DirectX in my free time. I downloaded the latest Windows 7 and DirectX SDKs. According to Microsoft's website, the latest DirectX SDK is not compatible with Visual Studio 2005 (I assume they mean it's not compatible with the SDK it came with). Can I configure VS2005 to use the SDKs I dow...

Send a keystroke to a DirectX application w/o activating it

Is there any way to send a key press to a DirectX application using Windows API without activating its window? I know there is a solution for simple applications, but DirectX handles this quite different... The solution is preferred in C++, and libraries are OK. Thanks! ...

How to play video stream from WebCamera using Microsoft.DirectX.AudioVideoPlayback?

How to play video stream from WebCamera using Microsoft.DirectX.AudioVideoPlayback? in C++ or C# ...

C++ online Role Playing Game (RPG)

So I've been learning C++ and SDL to make some basic 2d games. I want to create a game sort of like World of Warcraft but a 2D version. I want it to be on-line and use a database or something to start data like amount of Gold, HP, etc. I was wondering though, if I do this in SDL, would it still work on-line or would the user have to down...

book "Programming Role Playing Games with DirectX 2nd edition" and newer DirectX api

I got the book "Programming Role Playing Games with DirectX 2nd edition" and I notice there are things in the book that are now considered deprecated. There is a whole Section on DirectPlay. And as much as I would like to avoid this section, I am afraid it might screw up the entire engine he is trying to build. So I was just curious to ...

determining if value is in range with 0=360 degree problem.

Hi, I am making a piece of code for DirectX app. It's meaning is to not show faces that are not visible. Normaly it would be just using Z-buffer, but I'm making many moves and rotations of mesh, so I would like to not do them and save computing power. I will describe this on cube. You are looking from the front so you see just one face a...

Changing anchor point in DirectX c++

I would like to build turret, that can rotate in all axis. So the base could rotate in Y axis and the barrel in X/Z axis depending on actual Y value, just like normal turret, that have half ball base and the barrel is cylinder. What is best way to do this in simple DirectX? (I'm not using any prepared packs, because I want to elarn it no...

DirectX 10 Resource Leak

At the end of my DirectX application I get "The Direct3D device has a non-zero reference count, meaning some objects were not released.". The application is large and not written by me, how can I go about debugging what resources are not being released? ...

How to compute bounding box/sphere across multiple meshes (C#)

I load multiple meshs from .x files in different mesh variables. Now I would like to calculate the bounding sphere across all the meshes I have loaded (and which are being displayed) Please guide me how this could be achieved. Can VertexBuffers be appended togather in one variable and the boundingSphere be computed using that? (if yes h...

Where can I find some in-depth DirectX 11 tutorials?

So far the only tutorials I've been able to find are on directx11tutorials.com, which are essentially inferred from the existing samples. Does anyone know where to find other tutorials, or better yet open source projects using DirectX 11? (Extra points for project code using DirectX 11 :) ) ...

What approaches are available to revert an IDirect3DDevice9 instance to its default render state?

Given an instance of IDirect3DDevice9, what approaches are available to put it in its original render state (i.e. the state it was in when the device was initially created)? The cleanest way that I've come across is to create a state block via IDirect3DDevice9::CreateStateBlock just after the device has been created so that it can be ap...

How can I parse through a texutre in DirectX? (IDirect3DTexture9*)

I've been trying to figure out how to parse textures in directx for two reasons: to write my own texture format and to manipulate data in existing IDirect3DTexture9 type textures. I've been looking at the IDirect3DTexture9::LockRect() function but I'm unsure how it works, are the void* pBits I get out of it in D3DLOCKED_RECT the data in...

Testing DirectX applications in Virtual PC?

I would like to test my WPF applications using Windows Virtual PC under Windows 7. In my C# code, I'm checking the WPF tier and if it's less than 2, I disable a DirectX call. In order to test on Windows XP, I'd like to use Windows Virtual PC but it seems to only run in software mode. Thus, the tier is always <2. Any ideas on how to enab...

Creating effects in 3D game from scratch, using c++ and DirectX

So the title says it. I couldn't find any info on how actualy build effects into 3D game. I'll maybe stick to some engine later, but for understanding of this whole thing I would need to try it on my own for this time. I found a few about particle systems which may be the right way but any other connection between DirectX and particle sy...

How do I use DrawPrimitiveUP so it uses the color value from my defined struct ?

I need to draw lines using DrawPrimitiveUP and I need it to use the color value from my defined structure. Important snippets from the code: struct PointVertexColor { float x, y, z; // Position DWORD color; //Colour }; #define D3DFVF_PointVertexColor ( D3DFVF_XYZ | D3DFVF_DIFFUSE ) PointVertexColor myLines[1024]; device->Draw...

HLSL: Empty fx file: X3000: unexpected token '{'

The following error appears: Test.fx(1,1): error X3000: syntax error: unexpected token '{' Text.fx contains this: Nothing. I also tried it with an effect file that works fine in another test project: float4x4 mWorld; struct TInputVertex { float3 vPosition : POSITION0; float3 vNormal : NORMAL0; float2 vTexCoord ...

Grabbing the backbuffer with DirectX 7

Hey. I'm trying to write a small chunk of code to grab the backbuffer into an array of pixels. I've barely used directX before as I'm more of a OpenGL fan. My wish is to actually replace some code in a project that grabs the backbuffer using BitBlt and DC which is very slow. This is supposed to work on all computers and that's why I chos...

DirectX meshes not being displayed properly after switching view and projection matrices

Hi, In my program, the meshes were being displayed properly, but when I change the device.transform.view and the device.transform.projection matrices from the left handed to the right handed system, the meshes are not displayed properly anymore, i.e the back faces are being illuminated and the front faces are transparent! Does anyone hav...