Questions which are specifically related to version 9.0 of DirectX SDK. If your question is not specific to this version of SDK (i.e. it could apply to DirectX 10 and 11 as well), use the 'directx' tag.

learn more… | top users | synonyms (2)

4
votes
3answers
3k views

How to capture the screen in DirectX 9 to a raw bitmap in memory without using D3DXSaveSurfaceToFile

I know that in OpenGL I can do something like this glReadBuffer( GL_FRONT ); glReadPixels( 0, 0, _width, _height, GL_RGB, GL_UNSIGNED_BYTE, _buffer ); And its pretty fast, I get the raw bitmap in ...
1
vote
1answer
191 views

How can I set the world matrix from an array of floats in D3D9?

I have objects that hold their own transform matrix (calculated every frame by the physics system) held in a linear array of floats as follows: [m0, m1, m2, m3] [m4, m5, m6, m7] [m8, m9, m10, ...
9
votes
3answers
2k views

Pixel-perfect rendering to a rendertarget with a fullscreen quad

I have some trouble rendering a bunch of values to a rendertarget. The values never end up in the exact range I want them to. Basically I use a fullscreen quad and a pixel shader to render to my ...
7
votes
3answers
1k views

What is a better abstraction layer for D3D9 and OpenGL vertex data management?

My rendering code has always been OpenGL. I now need to support a platform that does not have OpenGL, so I have to add an abstraction layer that wraps OpenGL and Direct3D 9. I will support Direct3D 11 ...
5
votes
1answer
1k views

2D Line drawing with Pixel Shaders

Recently I asked a question, what is the fastest way to render 2D lines using DirectX, and one of the answers mentioned this paper on Fast Prefiltered Lines which uses Pixel Shaders to accomplish ...
3
votes
5answers
999 views

How do I convert DirectX's .X from binary encoding to text encoding and back

As far as I know, .X format can be text encoded and binary-encoded. I basically want to look into the model I'm playing with, get a better understanding of .X, possibly make some changes in it and ...
2
votes
2answers
302 views

Implementing Geometry Instancing in DirectX

I have a project that I'm doing in Managed DirectX (DX9) where I want to render lots of grass. My current method (many draw calls) is slow, but I've heard Geometry Instancing can fix that. I know ...
2
votes
2answers
416 views

How can one access the depth buffer for Unreal Tournament 2004?

I'm looking for a way of getting depth buffer data for a virtual 3D sensor. Currently the method used is raycasting (implemented in UnrealScript), but I want to use the depth buffer data instead for ...
2
votes
1answer
443 views

D3D9 Effects- variable parameters

I've created some simple Phong shading code from a sample. The issue is that the sample only handles one light. If I wanted a variable number of lights set at the start of each frame, how could I ...
1
vote
1answer
904 views

How to set orthgraphic matrix for a 2d camera with zooming?

I'm using ID3DXSprite to draw my sprites and haven't set any kind of camera projection matrix. How to setup an orthographic projection matrix for camera in DirectX which it would be able to support ...
1
vote
2answers
1k views

Can't get debug spew for Direct3D9

The Direct3D9 debug runtime's debug output does not appear to be working correctly. I linked against d3dx9d.lib instead of d3dx9.lib and defined D3D_DEBUG_INFO and I also set the debug runtime on in ...
0
votes
2answers
86 views

Directx9, FBX sdk and indices problem

So I've set up my program, know how to get everything going except for one thing: indices. I've been stumped as to how I retrieve that set of data. Does anyone know what I function I need to get them? ...
0
votes
2answers
366 views

How can I capture every frame in DirectX 9 using a shader

This is actually a follow up to this question How to capture the screen in DirectX 9 to a raw bitmap in memory without using D3DXSaveSurfaceToFile The proponent of the best solution suggested that I ...