directx

Resource Contention

While profiling my app using Pix, I noticed that the GPU is passing (in DX10 mode) most of its time in idle waiting for a resource not available. (and is always in row with the CPU (for example if the CPU is processing frame X, the GPU is also processing frame X) for this problem) Some note : 1) The app is GPU limited (the CPU is basic...

error C2228: left of '.DXGI_MODE' must have class/struct/union Direct X

I am trying to setup my swap chain Buffer but I get the following error error C2228: left of '.DXGI_MODE' must have class/struct/union 1> type is 'DXGI_MODE_SCANLINE_ORDER' Note sure what I am doing wrong. here is the code DXGI_SWAP_CHAIN_DESC swapChainDesc; // Set the width and height of the buffers in the swap chain ...

Embedding DirectX (.x files) in WPF application C#

Hi, I have DirectX .x files and I would like to display the model in WPF form. Any suggestions how to do so? Thanks, Ronny ...

What happens when I don't release a DirectX image?

I have a program that loads an image from a file with DirectX using D3DXCreateTextureFromFileEx(...), and I forgot to add the image->Release() function to the end of the program during the first test. I know that not releasing the image is bad, but what exactly happens (and is the damage permanent)? ...

Is there a DirectX equivalent to OpenGL's glLogicOp?

OpenGL allows you to set a logical bit-wise operation (OR, XOR, etc) to execute when writing a fragment out to the framebuffer. I'd like to perform fast scene voxelization (as seen in a paper by Elmar Eisemann) where I use a single framebuffer pixel to store 32 slices. Unfortunately I'm working in a DirectX 9 environment. Unless I'm m...

3d polygon in xaml

Is there any way to draw a 3d polygon in xaml/directx using only point3d? ...

DirectX 10 Primitive is not displayed

I am trying to write my first DirectX 10 program that displays a triangle. Everything compiles fine, and the render function is called, since the background changes to black. However, the triangle I'm trying to draw with a triangle strip primitive is not displayed at all. The Initialization function: bool InitDirect3D(HWND hWnd, int w...

Disable alt-enter in a Direct3D (DirectX) application

I'm reading Introduction to 3D Game Programming with DirectX 10 to learn some DirectX, and I was trying to do the proposed exercises (chapter 4 for the ones who have the book). One exercise asks to disable the Alt+Enter functionality (toggle full screen mode) using IDXGIFactory::MakeWindowAssociation. However it toggles full screen mod...

Why malloc always return NULL

Hi, guys, My dev environment is VS2008, DX9, Windows XP. I try to add protection handling to the out of memory case. When malloc return NULL, I would page some resource to disk, and release the resources in the memory. But sometimes, malloc always return NULL, even if I release most of resources and process memory usage and VM size is o...

Physically realistic decals

I'm in the process of developing a visualization engine for the company I work for. We create decals for the outside of aircraft. As such we would like to be able to visualize the our decals on the aircraft that we support. So here's the problem: in real life, if I were applying the decals to the outside of an aircraft, I pay pick a an...

Help with capture sound from microphone and play it back in C#?

Hi i got this code and i got 2 errors which i can't get rid of. Any help pls? namespace pleasework { public partial class Form1 : Form { private Thread _echoThread; private Capture _captureDevice; private CaptureBuffer _captureBuffer; private Device _playbackDevice; private SecondaryBuff...

'Microsoft.DirectX.DirectSound.InvalidCallException' occurred in Microsoft.DirectX.DirectSound.dll

I got a microphone to speaker output program which sometimes works, but most of the times this unhandled exception is appearing: 'Microsoft.DirectX.DirectSound.InvalidCallException' occurred in Microsoft.DirectX.DirectSound.dll Additional information: Error in the application. How can I solve it? private void EchoThread() ...

Switch between active objects - understanding transform/view

Hello, it is something I don't understand on transforming (meshes). Please take a look at my code (which is in Render() function) first: foreach (GeometricObject obj in this.objects) { if (obj != this.activeObject) { obj.Mesh = MeshUtils.ChangeMeshColor(obj.Mes...

WndProc(ref Message m), Prevent minimize Games, Send key strokes.

Overview: I am going to create a touch application that interfaces with games and other apps. This concept is similar to the app found on touch-buddy.com but I will be using C# and WPF instead of how the application is written in Perl. I have a few challenges I would like to evaluate. The touch-buddy app uses two approaches while intera...

Applying animation tracks to specific frames in a DirectX frame hierarchy?

I was wondering if it's possible to separate which frames get which animation tracks in DirectX. The animation controller seems to be very specific to the entire hierarchy and I'm not sure if there is a way to separate this without having to create a whole different clone to the animation controller and substituting the bone transforms (...

load directx xfile in xaml/wpf

How can I load a .x file in xaml/wpf? ...

What's the smallest DirectX installer I can distribute in my Software?

My application uses DirectX 9.0c. There are many installers for the end-user run-times, ranging from 400Kb to 100Mb+ and obviously I don't want to bloat my installer file. However, I believe there are potentially legal restrictions which mean I can't just distribute whichever MS installers I might choose. This is the one I'd ideally lik...

Reverse engineering and patching a DirectX game?

Background I am playing Imperishable Night, one of the Touhou series of games. The shoot button is 'z', moving slower is 'shift', and the arrow keys move. Unfortunately for me, using shift-z ghosts my right arrow key, so I can't move to the right while shooting. This ghosting happens in all applications, and switching keyboards fixes...

DirectX in IronRuby

I'm thinking about writing a game using DirectX, and I'm considering using IronRuby. Is IronRuby stable enough to use in production? Does IronRuby work well with DirectX? ...

How to eliminate tearing from animation?

I'm running an animation in a WinForms app at 18.66666... frames per second (it's synced with music at 140 BPM, which is why the frame rate is weird). Each cel of the animation is pre-calculated, and the animation is driven by a high-resolution multimedia timer. The animation itself is smooth, but I am seeing a significant amount of "t...