directx

Recommended books for Direct3D programming

What good books are there for learning 3D graphics programming (DirectX 9) ? I'm also interested in a book about pixel/vertex shaders. I've done some 3D graphics about two years ago using WPF, but I don't think this would help much. I'm pretty good at C++ and optimization (assembler, SSE, metaprogramming), so I don't think this would be ...

Problem with HLSL looping/sampling

I have a piece of HLSL code which looks like this: float4 GetIndirection(float2 TexCoord) { float4 indirection = tex2D(IndirectionSampler, TexCoord); for (half mip = indirection.b * 255; mip > 1 && indirection.a < 128; mip--) { indirection = tex2Dlod(IndirectionSampler, float4(TexCoord, 0, mip)); } return in...

Can WPF run without DirectX?

This might sound like a stupid question but ... will WPF stop running in absence of a DirectX/Direct3D capable graphics card/drivers or will it just run slower? I know WPF is based on DirectX/Direct3D (even for simple controls) but I cannot find any reference on the topic which provides a good overview of borderline scenarios. Any hel...

How many render targets do low end Pixel Shader 2.0 supporting video cards support?

MRT allows for rendering to multiple texture targets in the pixel shader, but I'm not sure how many targets that is. I'm currently using 3 render targets but I may need as much as 5 (though probably just 4). I think the Radeon 9500s are pretty much entry level ps/vs 2.0 cards but I'm really not sure how many render targets it actually s...

C#, DirectX, and XNA: Playing Audio, and Requirements for End-User

I'm working on a C# desktop 2D game, and want to play audio. 1) If I use DirectX for the audio, would an end-user have to have DirectX installed on the computer? (I assume yes). 2) If I use XNA for the audio, would an end-user still require DirectX, or anything else other than the .NET Framework, in order to run my program? I'm getti...

Does WPF rely on Direct3D calls even for standard controls?

As a follow up tho this and this other question, I am now trying to understand (out of curiosity) if WPF totally/mostly relies on Direct3D calls (and not 2D DirectDraw ones) even for standard controls, such as buttons or even the container window itself. Wikipedia states: All graphics, including desktop items like windows, are based...

Reading output from geometry shader on CPU

Hi, I'm trying to read the output from a geometry shader which is using stream-output to output to a buffer. The output buffer used by the geometry shader is described like this: D3D10_BUFFER_DESC vbdesc = { numPoints * sizeof( MESH_VERTEX ), D3D10_USAGE_DEFAULT, D3D10_BIND_VERTEX_BUFFER | D3D10_BIND_STREAM_OUTPUT, ...

WPF 3d — changing vertices in runtime (performance problem)

Inside a window I have Viewport3D which has ModelVisual3D with Model3DGroup inside. I configure 17 GeometryModel3D's. Meshes of all of them share the same Point3DCollection. The model is shown Ok. Then I change the Point3DCollection: private void btMutate_Click(object sender, RoutedEventArgs e) { Stopwatch sw = Stopwatch.StartNew...

Are there any DirectX 11 programming books?

Anyone know any DirectX 11 programming books that have been printed already? or there will be soon? I'd like to buy one or preorder but haven't found one anywhere ... ...

Win32 Dialog closing on startup

Hey, I recently asked a question here about a dialog problem I had, but i discovered that the problem lies in such a different area i intentionally thought that I will rephrase my question here. The problem is that I've been working on a DirectX10 game engine. When the engine inits there should pop up a dialog box which gives the user ...

Need to use D3DFMT_LIN_A8R8G8B8 instead of D3DFMT_A8R8G8B8 for textures to show correctly on Xbox 360 while this is undefined on the PC. LIN stands for Linear...

Hi All, In the Xbox 360 I found out that I have to use D3DFMT_LIN_[xxxxxxx] instead of just D3DFMT_[xxxxxxx] since the textures wouldn't work with D3DFMT_LIN on the 360. As the tite says the LIN part stands for Linear, the description between the D3DFMT_LIN and D3DFMT_ for the texutres is just that one format is linear one isn't. So wo...

WPF capabilities

In my company we have in mind a redesign of the user interface of an application and we would like to make it ... let say "fancy". We have in mind a simple story board but I doubt between WPF, XNA or DirectX. I prefer WPF so I'd need to know if it support the following capabilities and how difficult to implement are they: Transparency:...

DirectX Device CAPS

I read the following in the DirectX 10 documentation: "Legacy hardware capability bits (caps) have been removed in favor of a rich set of guaranteed functionality, which targets Direct3D 10-class hardware (minimum)." "Removal of CAPS bits - Direct3D 10's base feature set is guaranteed." Where do I find a list of the "guaranteed functi...

Creating a packed Binary Representation of a Set of Files?

So i am trying to work on my own little 3d game. Now i am more or less doing this to learn C#. I was wondering, what is the best methodology for packaging assets such as textures/scripts? Generally what i was thinking of doing was this: [header] [number of records] [Offset to Record 1 from End of header] [Offset to Record 2 from end of...

Media Foundation: The MFPlay object doesn't have to use MFStartup for the initialization?

Hi, Here is a question about MFStartup function in Media Foundation: According to the article "Initializing Media Foundation" (http://msdn.microsoft.com/en-us/library/ms704682%28VS.85%29.aspx), before using any Microsoft Media Foundation objects or interfaces, you must call the MFStartup function. But there is a sample from "MFPlay Tu...

DirectX 9 or 10 Overlay

Hi, How is it possible to draw an overlay over an game with DirectX 9 or 10? I found code with depricated DirectShow code, but it will not run. Thanks for tipps. ...

Unable to find dsound.h after installing Directx 9.0c on Windows XP

Hello I am trying to build portaudio using MS VC++ 2009. The first time I tried to do that, I got an error that dsound.h was not found. I then downloaded and installed DirectX 9.0c. Now I assumed that the installer would create an environment variable DX_SDK, through which I can point to the header file in MSVC. However, that did not ha...

Managed DirectX

Hello, This is a pretty deep topic I guess, so any url's with insight info is also gladly accepted. I've been working a lot with native directx, never managed. On the other hand, mostly when developing other type of applications that don't have any need for advanced gpu rendering I usually stick to managed code such as C#. Starting to ...

SlimDX Directx 9 problem

I am getting the Following problem when i try to initialize the directx SlimDX.Direct3D9.Direct3D9NotFoundException was unhandled Message="Direct3D 9 was not found. Reinstalling DirectX may fix the problem code: Direct3DEx m_d3dEx = new Direct3DEx(); I checked the version of Directx installed on my PC via dxdiag utility ...

DirectX flickering video

Alright, so I wrote a custom VMR9 Allocator/Presenter which seems to work fine. However, when I attempt to copy video frames from the Allocator/Presenter surfaces into my application surfaces, the video appears to flicker. Audio playback is fine so I'm fairly certain it's not an issue of the machine being bogged down or anything. This...