Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Questions tagged [directx9]

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.

Filter by
Sorted by
Tagged with
8 votes
4 answers
16k 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 ...
cloudraven's user avatar
1 vote
1 answer
351 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: ...
gardian06's user avatar
  • 1,203
8 votes
3 answers
3k 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 ...
sam hocevar's user avatar
  • 23.9k
7 votes
1 answer
6k 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 ...
Dr. Andrew Burnett-Thompson's user avatar
4 votes
5 answers
2k 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 ...
bohdan_trotsenko's user avatar
3 votes
2 answers
3k 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 ...
davidweitzenfeld's user avatar
3 votes
1 answer
578 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 ...
DeadMG's user avatar
  • 5,518
1 vote
2 answers
3k 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 ...
DeadMG's user avatar
  • 5,518
1 vote
2 answers
1k 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 ...
cloudraven's user avatar
0 votes
2 answers
3k 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? ...
Tyson May's user avatar