Questions tagged [direct3d9]
167 questions
6
votes
1 answer
Direct3D app runs fine if Windows Explorer is running, slows down terribly otherwise
Our Direct3D9 app works perfectly if we fully start Windows, and then launch it.
However, if we tweak Windows' startup process so that Explorer is not ran, and just Windows and our application are started, our app slows down horribly. CPU…

dario_ramos
- 7,118
- 9
- 61
- 108
6
votes
1 answer
How do I use the Direct3D Device Manager?
I'd like to share one Direct3D device between multiple threads and objects in my Direct3D application. I came across the Direct3D device manager, which looks like what I want, although I'm not doing any video processing or video…

Christian
- 61
- 3
5
votes
2 answers
Direct3D: efficient way to get system memory bitmap from IDirect3DSurface9 (default pool)?
I have IDirect3DSurface9, default pool, YUV format. How can I efficiently get bitmap bits from it? At the moment I:
create render target:
device->CreateRenderTarget(surf_desc.Width, surf_desc.Height, D3DFMT_A8R8G8B8, D3DMULTISAMPLE_NONE, 0, TRUE,…

Andriy Tylychko
- 15,967
- 6
- 64
- 112
5
votes
5 answers
How to enable VSYNC in D3D windowed app?
So, Im using D3D in a windowed application.
I inited D3D with the following parameters:
windowed: true;
backbufferformat: D3DFMT_X8R8G8B8;
presentinterval: D3DPRESENT_INTERVAL_ONE;
swapeffect: DISCARD
Each time OnPaint is called, I render the image…

St. KG
- 51
- 1
- 1
- 3
5
votes
1 answer
Update a D3D9 texture from CUDA
I’m working on a prototype that integrates WPF, Direct3D9 (using Microsoft’s D3DImage WPF class), and CUDA (I need to be able to generate a texture for the D3DImage on the GPU).
The problem is, CUDA doesn’t update my texture. No error codes are…

Soonts
- 20,079
- 9
- 57
- 130
4
votes
2 answers
Descriptive monitor name from D3D display adapter ID
As the question suggests, I'm trying to pull a descriptive monitor name to match with a display adapter name. The code below gives me a device ID like \.\DISPLAY1 which is understandable but not what I'm looking for.
// Get name.
…

nielsj
- 1,499
- 12
- 24
4
votes
0 answers
How Do you apply a vertex shader in C# for D3D9?
I am trying to write a c# program to apply a vertex shader using SharpDx. I am not sure what are the right functions to call. The purpose of the shader is to make the graphics look a little better because it looks pixelated.
I have written the…

Frank
- 215
- 3
- 9
4
votes
1 answer
How to stop Direct3D from flicker on release on multihead setup?
Have a kiosk system with a small touchscreen and a large display, and I have an app that works well playing video on the large display. For some reason, when Direct3D stops (app quits), both screens flicker (turn black, then recover).
I simplified…

Andras Tompa
- 63
- 3
3
votes
2 answers
DirectX equivalent of glBlendFunc(............)
I created a particle System in OpenGl that's working great. When I want to get a burning effect of a fire or a beam or something(Where the system kind of "glows" and fuses all the colors together) I use this method call with…

Jimmy Bouker
- 118
- 1
- 10
3
votes
1 answer
load BITMAP with D3DXLoadSurfaceFromMemory
Here is my unsuccessful try :
IDirect3DSurface9 *renderTargetSurface;
BITMAP bmp;
HBITMAP hBMP = ( HBITMAP ) LoadImage ( 0, "D:\\DATA\\FLAG_B24.BMP", IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE );
int bytes = GetObject ( hBMP, sizeof( BITMAP ), &bmp );…

HMD
- 2,202
- 6
- 24
- 37
3
votes
1 answer
calling IDirect3D9::CreateDevice() from DllMain hangs
What can be a reason?
From DllMain() on DLL_PROCESS_ATTACH I'm calling IDirect3D9::CreateDevice() and it hangs
code is straightforward, just like:
BOOL APIENTRY DllMain( HMODULE hModule,
DWORD ul_reason_for_call,
…

Andriy Tylychko
- 15,967
- 6
- 64
- 112
3
votes
1 answer
Clipplanes, vertex shaders and hardware vertex processing in Direct3D 9
I have an issue with clipplanes in my application that I can reproduce in a sample from DirectX SDK (February 2010).
I added a clipplane to the HLSLwithoutEffects sample:
...
D3DXPLANE g_Plane( 0.0f, 1.0f, 0.0f, 0.0f );
...
void…

Igor
- 31
- 2
3
votes
0 answers
DirectX9 Multiple Video Card
there is an answer about DirectX11, but DirectX9 is different.
The first parameter of IDirect3D9::CreateDevice and IDirect3D9Ex::CreateDevice is UINT Adapter, it should be a number between 0 and one less than the result of…

Clones1201
- 333
- 3
- 17
3
votes
1 answer
Enable AntiAliasing in Direct3D9 (MultiSample Render Target)
I am trying to enable AA in a D3D9 application, but am not sure how to set up the surfaces correctly. So far, I have:
IDirect3DDevice9* m_pd3dDevice;
IDirect3DSurface9* screen;
IDirect3DSurface9* msaasurf;
D3DPRESENT_PARAMETERS…

Knio
- 6,638
- 3
- 29
- 29
3
votes
1 answer
Bad behavior with Aero off in Vista
I have a directx9 application which needs to run on a machine with Aero disabled. The app runs in windowed mode. When the window is first created, it looks just fine within a single screen. When I move the window in such a way that it spans two…

Josh
- 31
- 2