Questions tagged [direct3d9]

167 questions
0
votes
1 answer

How to render formatted text in Direct3D9?

I'm writing an application which needs to draw a lot of text - several lines, maybe tens of lines - in Direct3D9. The text can be heavily formatted (i.e. different typefaces, styles, sizes) and can contain unicode symbols from different charsets.…
himself
  • 11
  • 1
0
votes
1 answer

D3D9 circle primitive bug

I tried to draw a 2D circle with D3D9 per vertices and DrawPrimitive but failed somehow. The white points in the picture below representing my vertices and the cyan circle is rendered with my function. This is my ellipse function RETURN…
DevilsJin
  • 109
  • 1
  • 13
0
votes
1 answer

Translate VertexBuffer

I have created a vertex buffer which holds the vertices for a circle at (0, 0) with radius 2.5. I want to draw this circle wherever the mouse is so I captured WM_MOUSEMOVE and I store the mouse's position in a point P. I've already setup by world,…
Brandon
  • 22,723
  • 11
  • 93
  • 186
0
votes
1 answer

rounded edges/corners in DirectX (D3D9)

I created my own little 2D-Engine with DirectX (okey, should be more like a GUI in the end) and tried to create rounded edges for a simple Rectangle. Since I never done this with a graphics framework before I had no idea how to supply this. For now,…
DevilsJin
  • 109
  • 1
  • 13
0
votes
1 answer

Direct3d9 load texture fail

I am working on a sort of big project. And I have been facing a fatal problem at the end of the day of the project. I guess it might be from memory leak, anyways please listen to my voice. The first time I launch the program, it works fine. and I…
Phiru
  • 39
  • 1
  • 8
0
votes
1 answer

Full screen Direct3D9 device only displays at native resolution when second monitor is plugged in

With a single monitor my program works in both windowed and full screen mode (using any resolution chosen from EnumAdapterModes), but when I plug in my second monitor (running the same code) I can create a full screen device at any resolution from…
Alex
  • 201
  • 2
  • 10
0
votes
2 answers

Direct3D9 BackBuffer to PixelArray

I'm trying to hook a DirectX game. I successfully loaded my hook and I'm able to save images/backbuffer to the disk using: HRESULT Capture(IDirect3DDevice9* Device, const char* FilePath) { IDirect3DSurface9* RenderTarget = nullptr; HRESULT…
Brandon
  • 22,723
  • 11
  • 93
  • 186
0
votes
1 answer

Deadlocks and crashes when debugging after upgrade to VS2012

My app uses a C++/CLI class which extends System.Windows.Forms.UserControl and wraps a native C++ class which does Direct3d9 rendering using the Effects framework. Everything was working great until we upgraded our solution from VS2010 SP1 to…
dario_ramos
  • 7,118
  • 9
  • 61
  • 108
0
votes
1 answer

IDirect3DDevice9 Release deadlock

What could cause this? I use direct3d9 from a dll on windows 8. No calls originate from DllMain. All calls to the api and winapi for my window are done from the same thread. All ressources associated with the device were freed.
typ1232
  • 5,535
  • 6
  • 35
  • 51
0
votes
1 answer

How do I render a fullscreen frame with a different resolution than my display?

I am in the process of teaching myself DirectX development while going through all the tutorials on http://directxtutorial.com/. I have run into a problem that I believe is related to me having multiple monitors. My display is 1920 x 1080. When…
Brandon
  • 261
  • 1
  • 8
  • 17
0
votes
2 answers

LNK2005 errors using Direct3D9

I am trying to set up a basic application at the moment and I want to use Direct3D9 as the API to draw primitive shapes. For example, I want to create a circle which will be drawn by the circle object and a triangle in the triangle object etc. My…
Chris
  • 191
  • 1
  • 13
0
votes
1 answer

Direct3D 9 functions return value

Since the function's return value is utilized for error message, how do the functions return the necessary information back to the caller? For example: IDirect3D9::CreateDevice method
zzz
  • 161
  • 4
  • 12
0
votes
1 answer

macro equal to function?

FAILED macro Macro (computer science) After I read the articles above, I still not very sure whether macro is just a function or anything else. Is macro equal to function? Example: // Create a Direct3D 9 device. hr =…
zzz
  • 161
  • 4
  • 12
0
votes
2 answers

drawing coordinate system axes in corner of screen in direct3d

I have a direct3d environment in a MFC window and i would like to draw the coordinate system axes in the corner of the screen, as any 3d software has. I thought this would be no problem, but issues occurred when i started moving the camera around.…
0
votes
1 answer

What is the best way to have lights in Direct3D 9

The current method i use drops the fps to 30 when having 5 lights. What is the best way to have lights like in a AAA title. They have lights everywhere but runs smooth. What i use now…
Dilhan Geeth
  • 187
  • 2
  • 11