direct3d

How well does WPF blend with XNA in real life?

I understand that there are several ways to blend XNA and WPF within the same application. I find it enticing to use WPF for all GUI and HUD stuff in my XNA games. Does anyone have any practical experience on how well this approach works in real life using .NET 3.5 SP1 ? Any pitfalls (such as the "airspace problem")? Any hint on what app...

c++ Having multiple graphics options

Currently my app uses just Direct3D9 for graphics, however in the future I' m planning to extend this to D3D10 and possibly OpenGL. The question is how can I do this in a tidy way? At present there are various Render methods in my code void Render(boost::function<void()> &Call) { D3dDevice->BeginScene(); Call(); D3dDevice->...

Implementing Porter-Duff Rules in Direct3D

What Direct3D render states should be used to implement Java's Porter-Duff compositing rules (CLEAR, SRC, SRCOVER, etc.)? ...

How do I make the lights stay fixed in the world with Direct3D

I've been using OpenGL for years, but after trying to use D3D for the first time, I wasted a significant amount of time trying figure out how to make my scene lights stay fixed in the world rather than fixed on my objects. In OpenGL light positions get transformed just like everything else with the MODELVIEW matrix, so to get lights fix...

How to determine which version of Direct3D is installed?

We have an application which needs to use Direct3D. Specifically, it needs at least DirectX 9.0c version 4.09.0000.0904. While this should be present on all newer XP machines it might not be installed on older XP machines. How can I programmatically (using C++) determine if it is installed? I want to be able to give an information messag...

Can you render a Direct3D window for one process into another process' HWND?

What I want to do is have a Windows application launch another Direct3D application and have the Direct3D application render into a control provided by the parent process. Is this even possible? If it is, how would it be done? ...

OpenGL still better than Direct3D for non-games ?

The standard model has been that OpenGL is for professional apps (CAD) and Direct3D is for games. With the debacle of openGL 3.0, is openGl still the natural choice for technical 3D apps (cad/GIS)? Are there scenegraph libraries for Direct3D? (Of course Direct3D is windows only.) ...

YUV Conversion via a fragment shader...

I have implemented a YUV to RGB conversion via a fragment shader written in Nvidia's shader language. (Y, U and V are stored in separate textures that are combined via multi texturing in my fragment shader). It works great under OpenGL, but under Direct3D I just can't get the output image to look right. I'm starting to suspect that Direc...

How do I draw transparent DirectX content in a transparent window?

I want to draw DirectX content so that it appears to be floating over top of the desktop and any other applications that are running. I also need to be able to make the directx content semi-transparent, so other things show through. Is there a way of doing this? I am using Managed DX with C#. ...

CoreImage for Win32

For those not familiar with Core Image, here's a good description of it: http://developer.apple.com/macosx/coreimage.html Is there something equivalent to Apple's CoreImage/CoreVideo for Windows? I looked around and found the DirectX/Direct3D stuff, which has all the underlying pieces, but there doesn't appear to be any high level API t...

Direct3D Camera Problem

I'm using SlimDX/C# to write a Direct3D application. I configured the camera as per textbox way: private float cameraZ = 5.0f; camera = new Camera(); camera.FieldOfView =(float)(Math.PI/2); camera.NearPlane = 0.5f; camera.FarPlane = 1000.0f; camera.Location = new Vector3(0.0f, 0.0f, cameraZ); camera.Target = Vector3.Z...

At what point do MaxTextureRepeat limitations come into play?

When executing a pixel shader under Direct3D, do the limits on texture coordinates imposed by MaxTextureRepeat only become an issue during calls to texture lookup functions such as Tex2D(), or do they come into play anytime the texture coordinates are accessed within the shader? I wish to know whether it's possible to avoid the MaxTextu...

Web Browser in a fullscreen Direct3D application

I need to have a working web browser in a fullscreen Direct3D application. For example, Valve's Source-based games (sort of) do it in the MotD window when you join a server. Any tips on where to look? ...

Can pixel shaders be used when rendering to an offscreen surface?

I'm considering integrating some D3D code I have with WPF via the new D3DImage as described here: My question is this: Do pixel shader's work on offscreen surfaces? ...

Vertices and Lost Devices

In a Direct3D application (managed), should I recreate the vertex buffer every time I lose my device? The application I am developing is a windows CAD application. Not a game. I was thinking I could generate the vertex buffer when my 3D Model changes. But should I redo it when I lose my device or can I reuse the vertex buffer from the o...

What does 'Polygon' mean in terms of 3D Graphics?

An old Direct3D book says "...you can achieve an acceptable frame rate with hardware acceleration while displaying between 2000 and 4000 polygons per frame..." What is one polygon in Direct3D? Do they mean one primitive (indexed or otherwise) or one triangle? ...

Modelling an I-Section in a 3D Graphics Library

I am using Direct3D to display a number of I-sections used in steel construction. There could be hundreds of instances of these I-sections all over my scene. I could do this two ways: Using method A, I have fewer surfaces. However, with backface culling turned on, the surfaces will be visible from only one side. If backface culling i...

Save State of a Direct3D Device

State should include at least the following: All settings set via SetStreamResource() Indices I have a class whose Draw() function will call SetStreamResource, set Indices and eventually call DrawIndexedPrimitive(). I would like to restore the device state before Draw() returns. I am looking for something along the lines of GDI's Sa...

Rendering strategy for a window system in XNA (RenderTarget performance)

I'm currently creating a window system for XNA games from scratch. I'm developing primarily for Windows, but who knows what platforms I might support in the future. Feel free to answer if you know this for native Direct3D, since the performance semantics should be similar. If possible, consider what would change if the target platform wa...

Direct3D MDI Project: MFC or .NET?

I'm looking at a new project where both Native and Managed approaches sound like a good idea. This is a Windows desktop application which should support an MDI interface. The client area will make extensive use of Direct3D. The developers on the project are equally skilled on C#, C++/CLI and MFC. MFC Advantages: Doc/View Architecture ...