FAQ Database Discussion Community


Hide DirectX9 game window on ShellExecute or CreateProcess

visual-c++,window,hide,directx-9
I have been trying both ShellExecute and CreateProcess to Launch a game - My goal is to hide the game window. The game is built using DirectX9. For some reason I am struggling on this issue. I am using the following codes independently but without success SHELLEXECUTEINFO ShExecInfo = {0};...

Rendering a circle with a Vertex shader in DirectX

shader,hlsl,directx-9
I am trying to draw a simple 2D circle by manipulating texcoord coordinates inside a vertex shader. This is the code: float2 uv2 = 2.0 * (TextureCoordinate.xy - 0.5); float tnm = 1.0 - length(uv2); In pixel shader, this draws a circle. The same code inside the vertex shader would...

DirectX 9 vertex colors ingored when lighting is enabled?

c++,directx,directx-9,lighting
Well, the question says it. When I have light disabled (pd3dDevice->SetRenderState(D3DRS_LIGHTING, TRUE);) I get the colors as expected, when I set it to true, I get pure black, even if I set the ambient light, but that's fixed when also setting a material. But the vertex colors are then ignored...

Drawing a textured quad looks distorted

c++,directx,directx-9
I am following along on the book called Introduction To 3D Game Programming With Directx 9.0 and I've copied and pasted the following example out of the book: struct Vertex { float _x, _y, _z; float _nx, _ny, _nz; float _u, _v; // texture coordinates static const DWORD FVF; };...

DirectX 9 not rendering after adding transforms

c++,3d,directx,direct3d,directx-9
so far I got a cube rendered without any transforms (thus it was rendered in an orthographic perspective), and I am working on the previous code to get it into a perspective view, with all the matrices involved. I changed the Flexible Vertex Format so as not to have RHW...

DirectX moving my GUIBox

c++,math,directx,directx-9
I'm creating a overlay for a friend of mine, I wanted to implement so I can move my box dynamically when I'm holding left mouse button. This is my current method: if (mouse.isClicked() && (cursor.x >= mainGUIBox.x) && (cursor.x < (mainGUIBox.x+mainGUIBox.w)) && (cursor.y >= mainGUIBox.y) && (cursor.y < (mainGUIBox.y+40))) {...

DirectX 9 projection matrix infinite element?

c++,graphics,3d,directx-9
I've been banging my head on doing transformations in DirectX 9 and during debugging I finally noticed a problem, when calling D3DXMatrixPerspectiveFovLH(&projection, D3DX_PI/4, yRes/xRes, 1, 100); the first element (_11) of projection is #INF, which I'm pretty sure it should not be. This is directly after declaring this matrix and...