Home | Search | X-Zone News | Services | Book Support | Links | Feedback | Smalltalk MT | The Scrapyard | FAQ | Technical Articles


This page contains answers to common questions about DirectX programming.  Additional information can be found at Microsoft's official DirectX 7 Developer FAQ and DirectX 8 Developer FAQ.  You might also check the DirectX MVP FAQ for the microsoft.public.win32.programmer.directx.graphics newsgroup.

DirectX 9 Graphics

How can I determine what assembly level shader code is generated from HLSL shader code in my effect file?

DirectX 8 Graphics

After installing the DX 8 SDK, I receive the error LNK1104: Cannot Open File "d3dim.lib" when attempting o compile my program.

I am using Direct3D to draw a tile map to the screen.  Why can't get the edges to match properly?

When I use the D3DX shape creation functions to generate a mesh, there are no texture coordinates in the vertices.  How can I set texture coordinates?

How can I render to multiple windows under DirectX 8 Graphics?

When loading a texture with the D3DX texture creation functions I specify a color key, but no transparency appears when I render the image.

I am rendering alpha blended polygons and setting the alpha of the diffuse vertex component to determine the opacity.  It works when there is no texture set, but as soon as I set a texture the alpha that I set is no longer applied.  Why?

Why does rendering of pre-transformed vertices appear to be slower in DX 8?

Why does rendering of an ID3DXMesh object slow down significantly after I define subsets?

Why doesn't Intellisense offer code completion options for DX 8 interfaces under VC++?

Will applications that I compile with the DirectX 8.1 SDK be compatible with systems  with the DirectX 8.0 runtimes?

I have heard that DirectX 8.1 no longer supports Windows 95.  Can I compile applications compatible with Windows 95 if I have the DirectX 8.1 SDK installed?

Why do my calls to IDirect3DDevice8::Getxxxx fail?

When I draw an image using ID3DXSprite::Draw() with 1:1 scaling, the sprite is different than the original image size.  Why?

Why does my programmable vertex shader fail during creation on some hardware?

General Issues - Application Installers

Once my application is installed on an end user's system, how can I find out which drive it's CD is in?

General Issues - Compiler

Can I Program for DirectX in Borland C++ ?

When attempting to compile under the DirectX 8 SDK, I recieve a compiler error stating that  DirectInputCreateEx or DirectInputCreate is an undeclared identifier.

After installing the DX 8 SDK, I recieve the error LNK1104: Cannot Open File "d3dim.lib" when attempting o compile my program.

Why doesn't Intellisense offer code completion options for DX 8 interfaces under VC++?

General Issues - Timing and Motion

How Should I Perform Timing in my Game?

How can I achieve a consistent rate of motion, regardless of the machine my program is executed on?

DirectDraw Issues

How Can I Draw a Pixel Directly to a DirectDraw Surface?

How can I load  images onto surfaces with a different pixel format?

Why does my Color Key fail when using 16 bit color depth?

Why does my full screen DirectDraw application drop frames at times, displaying a black screen momentarily?

What are the equations to covert between Y'UV and RGB color?

Direct3D Immediate Mode

Why do my pre-lit vertices appear black under DirectX 7?

Why are my Indexed Primitive calls so slow?

My existing application successfully renders with the DrawPrimitive method, but when I started using the Direct3DDevice3 Interface, the primitives are not rendered properly.  Why?

Why are some or all of my triangles are not visible when I render them?

My world matrix scales an item, and the normals are scaled as well.  How can I prevent this from affecting my lighting?

After installing the DX 8 SDK, I recieve the error LNK1104: Cannot Open File "d3dim.lib" when attempting o compile my program.

Direct3D Retained Mode

How do I construct a mesh if I have all the necessary information on its vertices?

Can I map my texture on a surface without using IDirect3DRMWrap?

If I create an animated character in 3D Studio, how do I use it in my program?

How do I make use of triple buffering in my D3DRM full screen application?

Can I use single/multiple pass multi-texture in D3DRM?

How can I use mipmapping in D3DRM?

What about anti-aliasing in D3DRM?

DirectSound Issues

If I wish to play overlapping copies of a sound, do I have to load multiple copies?

Why, when compiling in DirectX 7, does using the DSBCAPS_CTRLDEFAULT cause an error?

DirectPlay Issues

What support is offered for Proxy Servers?

Notes on this FAQ Page

This page is made available to provide answers to Frequently Asked Questions that are encountered by software developers using DirectX.  The questions are selected from the experience of myself and others in the DirectX community, experience gained both from our own trials and through the assistance we provide to the developer community through the public newsgroups.

This list is a work in progress, and will continue to grow as new issues arise.  If you see issues that are not covered here, please let us know through our Feedback Page, or if you have problems with the forms there drop me a line.

Note that this FAQ is, for the sake of size, not intended to provide a full tutorial on these subjects.  Rather, it will provide short, concise answers that will point you in the right direction to find a solution.  As this site advances, we will do our best to include pointers to articles and samples that illustrate each topic.

Special thanks to Eric DeBrosse, Rich Thomson, Klaus Hartmann, Michael Lundberg, and all the others who have assisted in compiling this and other pages... their assistance has helped make the X-Zone a reality.

This site, created by DirectX MVP Robert Dunlop and aided by the work of other volunteers, provides a free on-line resource for DirectX programmers.

Special thanks to WWW.MVPS.ORG, for providing a permanent home for this site.

Visitors Since 1/1/2000: Hit Counter
Last updated: 07/26/05.