directx

HUGE framerate difference between release/debug builds

I'm working on a DirectX game and I'm finding that during release builds I'm getting 170fps average, however in debug builds I'm getting ~20fps. I was wondering if this massive difference is normal between release and debug builds especially since in debug I don't have any traces being out put? I know there hsould be a performance gap b...

Best backwards compatible way to programmatically capture sound going to speakers

What would be the best approach to take in order to achieve a backwards compatible (Windows XP through Windows 7) way to capture sound that is being sent to the speakers on a machine, even if the audio driver doesn't expose the "Stereo Mix" recording device. For extra points, it would be great if this approach allowed for capturing soun...

Why is my DirectShow-based video player producing choppy results, while WMP plays the same videos smoothly?

I am having problems writing a good C++/DirectX9/DirectShow video player. I have tried using the DirectShow samples and modifying them. I've tried VMR9 and TextureRenderer. In all my attempts the video playback is choppy and jerky. In one case I got it nearly smooth, but the audio was out of sync! Windows Media Player always manages ...

C# OS Loader lock Visual Studio 2010

In VS 2008 when I try to step into the return new Triangles(element, mesh); line, I get the following error the first time DLL 'C:\Windows\assembly\GAC\Microsoft.DirectX\1.0.2902.0__31bf3856ad364e35\Microsoft.DirectX.dll' is attempting managed execution inside OS Loader lock. Do not attempt to run managed code inside a DllMain or im...

Audio plaback on laptop

Hi , I wrote simple audio playback application on c++ via latest DirectX SDK. On PC it working fine (Windows xp, Vista, Windows 7), but when I execute application on laptop it produce only silence. What differnce between audio on PC and laptop? ...

DirectX, Managed DX, XNA, which one to use?

What happened to unmanaged DX, using Win32 and C++? Is it dead or dying? Will it lose support/development like MDX? Is XNA just a fad for hobbyists? Top games these days are still made with unmanaged DX, right? ...

Automatic locking of DirectX buffers

I'm currently dealing with some old DirectX code that looks (quite often at very different places) something like this: LPDIRECT3DVERTEXBUFFER9 buffer; //create the vertex buffer correctly here ... buffer->Lock(...); //loop through the buffer to check something for(...) { if(checkPositive) return true; //some other code still in...

Mouse Events for DirectX.AudioVideoPlayback

When I create an DirectX.AudioVideoPlayback object and give it a control (say a panel) as an owner, it seems to lose some events - in my case, MouseClick and MouseDoubleClick. MouseDown, MouseUp and MouseMove all continue to function, and I can rework the missing events into those three, but it's not ideal. Does anybody know a way arou...

Are there major differences between shader languages?

I am currently learning GLSL. It would seem that once you learn one of the shader languages, learning one of the others would not be too difficult. Is it something analogous to learning a widget toolset like wxWidgets and then switching to Qt? Once you get the idea of what is happening within one widget toolset, another toolset will d...

System.IO.FileNotFoundException

This one is a long story: i have recently built a win32 application in Visual Studio that uses DirectX and I sent it to some friends to verify that it works on other machines. They all had .NET installed, but the app didn't worked for all of my friends. In two cases there we're some "could not load file or assembly Microsoft.DirectX.Di...

Linker issue calling the D3DX10CreateEffectFromFile() method

Having issues trying to retrieve a effect file for directX. If I do not include the D3DX10CreateEffectFromFile() method, the application compiles correctly. If I do include it. I get the following error 1>GXDX.obj : error LNK2019: unresolved external symbol _D3DX10CreateEffectFromFileW@48 referenced in function "public: virtual void __...

Should Direct3D be used over OpenGL in Windows?

Since Microsoft is generally a bit bias toward Direct3D, would a scene using VBO's in Direct3D be faster than the same scene using VBO's in OpenGL, or would it be the same since it's up to the Graphics Card driver? Thanks ...

can not count array elements after passing as argument

I am having issues counting the array elements after passing it into an arguement void GXDX::LoadMesh(GXVector vertices[], UINT indices[] = NULL) { D3D10_BUFFER_DESC bufferDesc; UINT numVerts = sizeof(vertices)/sizeof(GXVector); bufferDesc.Usage = D3D10_USAGE_DEFAULT; bufferDesc.ByteWidth = sizeof(GXVector) * numVerts;...

A good IDE for C++/Windows Programming

Possible Duplicate: Best C++ IDE or Editor for Windows What is a very simple lightweight and free IDE for developing C++ with DirectX? I use Dev-C++ for simple C/C++ programs and like it very much. However, It does not seem to support DirectX. I have also tried Express edition of Microsofts C++ environment. I was wodering i...

Error_1_The name 'MainForm_ResizeMove' does not exist in the current context

Hi, I tried to recreate the BitmapMixer sample from Directshow.NET in VS 2010 (The original sample works fine) and got the following errors in the Form1.cs Error 1 The name 'MainForm_ResizeMove' does not exist in the current context C:\Documents and Settings\TLNA\my documents\visual studio 2010\Projects\mybitmapMixer\myBitmapMixe...

Setting a Texture in a shader's constant buffer in D3D10

Ok I have a shader compiled up under D3D10. I am obtaining a shader reflection to get details of all the constants/globals in the shader. However I'm a little confused on something ... how do I set a texture to a constant buffer? I assume I don't just Map the constant buffer and copy the ID3D10Texture pointer into it ... I assume I us...

Shared Resources in SlimDX with DX10

I'm trying out the shared resources feature of DX10, as I needed this for one of my project. But I'm can't find much sample or code especially using SlimDX. According to DX10 documentation, I just need to specified the resources as Shared, then I can open it using OpenSharedResource() from another application. With a simple test applicat...

D3D10 HLSL: How do I bind a texture to a global Texture2D via reflection?

Ok so assuming I have, somewhere in my shader, a statement as follows (Note I am enabling legacy support to share shaders between DX9 and DX10): Texture2D DiffuseMap; I can compile up the shader with no problems but I'm at a slight loss as to how I bind a ShaderResourceView to "DiffuseMap". When I "Reflect" the shader I rather assu...

Low level mouse hook and DirectX

I'm building an application which needs to filter some mouse clicks system-wide. That is, I need to make the system ignore some mouse button clicks at special occasions. I use low level mouse hook and SetWindowsHookEx to filter out these clicks. It works relatively well, except for WPF applications. I guess that's because these applicat...

VB.NET - Can Directx retrieve codec IDs?

Hi StackOverflow, continuing my video converter here and I thought I should have codec information available to the users. I have Directx fully imported into my project and am getting video size, length, FPS, everything, but can I also get the video and audio stream properties? Like average bit-rate, codec name (fourcc - xvid, divx, x264...