Questions tagged [direct3d9]

167 questions
0
votes
1 answer

Direct3D9 Get D3DPRESENT_PARAMETERS From IDirect3DDevice9

Is there a way to retrieve all info that requires to re-build D3DPRESENT_PARAMETERS from a created device? In Direct3D11 ID3D11DeviceContext saves all this trouble, but how would you go and get all the necessary information to re-construct present…
user7867434
0
votes
1 answer

Packaging a custom DirectX redistributable installer

Following MS' advice we have stripped most files from the DX installer contents for our D3D9 application, getting it down to 5Mb in total. But now I;d like to package these files into a single installer, like the redistributable installers MS…
Mr. Boy
  • 60,845
  • 93
  • 320
  • 589
0
votes
1 answer

DirectX Multiple Textures On Same Vertex Buffer

I'm pretty new to DirectX and still learning and I think my lack of understanding is not that advanced to find a good direction to solve my problem. I'm using here Direct3D-9 and trying to render a texture in certain uv coordinates of a vertex…
user7867434
0
votes
0 answers

DirectX: How to get right frame?

I want to capture desktop on which there is an stereo app. My code IDirect3D9 *d3d = nullptr; IDirect3DDevice9* device = nullptr; IDirect3DSurface9 *surfaceMono = nullptr, *surfaceLeft=nullptr, *surfaceRight=nullptr,…
saqef
  • 39
  • 6
0
votes
1 answer

Can I use Direct3D to generate thumbnails?

I can use D3DXCreateTextureFromFile to load an image, and D3DXSaveTextureToFile to save it, but how can I resize it? Should I use IDirect3DDevice9::SetRenderTarget and render to a texture? Is it slower than doing it on CPU?
siods333333
  • 29
  • 10
0
votes
1 answer

D3D9 HLSL Matrixed My Brain

I'm seeking help from all of you expert with Direct3D. Frankly I'm getting nuts by a really weird behavior from HLSL. It's the way I specify matrices. Now my question D3DX 9 functions: D3DXMatrixOrthoOffCenterRH and others... Do they return a…
Joseph
  • 1
  • 1
0
votes
1 answer

Rotate camera over centre of a model

i have 2 meshes rendered with DirectX 9 and a camera that is looking at 0,0,0. One mesh is located at 0,0,0 and the other one at 5,0,0. How can i rotate the camera around 0,0,0 to always look the two meshes but from the new position? I would like to…
Stefano
  • 3,213
  • 9
  • 60
  • 101
0
votes
3 answers

Memory management of hDCs

I've got an ID3DXFont (which is Direct3D9, by the way) which offers a method GetDC() which returns a handle to a device context (hDC). How is the memory for this value managed? MSDN doesn't mention anything about it and it doesn't provide it's own…
Puppy
  • 144,682
  • 38
  • 256
  • 465
0
votes
0 answers

Direct 3D 9 CreateDevice method fails

I am trying to create a direct 3D 9 device. I am setting everything up with this piece of code: LPDIRECT3D9 pD3D = Direct3DCreate9(D3D_SDK_VERSION); D3DPRESENT_PARAMETERS d3dpp; ZeroMemory(&d3dpp, sizeof(d3dpp)); d3dpp.Windowed =…
user143366
  • 11
  • 2
0
votes
0 answers

Copy depth buffer with non-lockable format (D24S8) to system memory with Direct3D9, Win 8.1

EDIT: As ozeanix points out in the comments it is not possible to copy a D24S8 surface to system memory. Unfortunately you also cannot bind the surface (or rather its containing texture) to a pixel shader. I ended up going the reimplementation way,…
Apollo13
  • 119
  • 1
  • 1
  • 11
0
votes
2 answers

RGBA pixel data into D3DLOCKED_RECT

I'm trying to update a 128x128 D3DLOCKED_RECT with sub images using the following code, but it seems to squish them down along the top, the X offset is ignored and the y offset is 60 percent off. I've also tried to make the texture the correct size…
0
votes
0 answers

Hooked Direct3D 9, but my stuff is not drawn

Hello everyone I am messing around with some DLL injection stuff. Therefore I downloaded a simple Direct3D 9 sample application (it shows only a cube), which I want to manipulate. I already managed to hook the EndScene and Reset function of this…
user143366
  • 11
  • 2
0
votes
1 answer

IDirect3D9::CreateDevice prevents GTK+ 2 Cairo rendering

I need to call the Cairo Graphics API (included with GTK+ 2.24.10 bundle), whilst also using the Direct3D 9 API (DirectX SDK March 2009). To test, I make basic Cairo function calls as follows: #include ... cairo_surface_t…
Jeff
  • 71
  • 10
0
votes
1 answer

LPD3DXFONT does not draw

I am having an issue with my LPD3DXFONT not drawing anymore. DrawText() returns D3D_OK and was working just fine earlier. My primitives and sprites are drawing just fine, but all of the text is no longer visible. I believe it may have been a change…
John
  • 5,942
  • 3
  • 42
  • 79
0
votes
1 answer

Tutorial 2 of msdn "Direct3D Tutorial Win32 Sample"

Hi I am trying to do Tutorial2 of https://code.msdn.microsoft.com/windowsdesktop/Direct3D-Tutorial-Win32-829979ef#content. In Tutorial 1 I had to add #pragma comment(lib,"d3d11.lib") to make it work. In Tutorial 2, I added 2 pragmas,#pragma…
Niraj
  • 25
  • 4