Jump to content
  • Advertisement
Sign in to follow this  
Skyd168

dxstdafx versus d3dx9

This topic is 3603 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm following a few tutorials that says to include dxstdafx.h. Problem is I can't find that header anywhere on my computer or in the directx SDK. I was wondering if its been replaced by d3dx9.h in the later directx versions? Any help would be appreciated, thanks.

Share this post


Link to post
Share on other sites
Advertisement
It's not a standard header, and it's not even a common name for a precompiled header (as the 'afx' headers usually are).

Check the tutorial again to see if they explain what should be in this header -- it's likely, as you surmised, just going to contain the DX headers -- but if the tutorial does not properly explain it then you should probably find another tutorial.

Share this post


Link to post
Share on other sites
If it's any help, stdafx.h (not dxstdafx.h), is a standard header file name generated for Visual Studio projects. One of its uses is to key precompiled headers. It's included in each cpp file in the project.

The specific idea behind stdafx.h is that it contains #include directives for other headers that are used often but are rarely changed. That makes them ideal for precompiling.

In my DirectX projects, I often modify the stdafx.h file to contain:

#include "d3d9.h"
#include "d3dx9.h"
#include "dxerr.h"

Those headers are needed in virtually all the cpp files.
Quote:
I was wondering if its been replaced by d3dx9.h

More likely, it's similar to what I describe just above.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!