Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

Is Windows 8 supporting DirectX 9? Because I was looking through some samples written in C++ and DirectX 9 made for Windows 8. It wasn't that, like I know it ( look here http://directxtutorial.com/Lesson.aspx?lessonid=111-4-2 ). E.g. Inizialising DirectX with COM:

ComPtr<ID3D11Device1> dev;
ComPtr<ID3D11DeviceContext1> devcon;

It's just weird because I know it with the old way:

ID3D11Device *dev;                  
ID3D11DeviceContext *devcon;  

( I hope you understand what I want to tell )

I hope it hasn't change completely due the released their new OS.

share|improve this question
1  
I'd find it very hard to imagine that microsoft would suddenly drop support for 90%+ of all the games on the windows platform. I also find it even harder to believe that people wouldn't be enraged by such a move by now. –  Jari Komppa Nov 16 '12 at 18:37
    
That said, it's possible that the latest SDKs don't include dx9 headers/libraries; I haven't checked. That doesn't mean that you couldn't just use the dx9 sdk like before. Unless, of course, the latest visual studio somehow forbids you from doing so, but that would be all manner of silly. –  Jari Komppa Nov 16 '12 at 18:38
    
Well, I can't believe it also, but I think it's possible because to get the "Windows 8"-brand the PC most have an touchscreen and did you ever see a game written in DirectX that supports gaming with Touchscreen? –  Techie Nov 16 '12 at 18:51
    
I'm pretty sure you won't be able to make "modern ui" apps with dx9, though. –  Jari Komppa Nov 16 '12 at 19:02
1  
The D3D objects have always been COM objects - not using raw pointers but instead putting them in a smart COM pointer has always been possible. –  melak47 Nov 16 '12 at 20:13
show 3 more comments

3 Answers 3

up vote 10 down vote accepted

Yes, Windows 8 does support DirectX 9.

For development, the old DirectX SDK is now deprecated, but you'll have all the libraries and headers you need within the new Windows 8 SDK, which comes included with Visual Studio 2012. You can go for the "old way" with no problem. If you need PIX for some debugging, or the high level D3DX library, you'll have to install the old DXSDK again, as this is not in the Windows 8 SDK.

However this is only valid for plain old desktop apps. For Metro-style apps, I'll let Chuck Walbourn from Microsoft speak:

Direct3D9 and Direct3D9Ex are not supported for Metro style applications. Use of the DirectX SDK with Metro style applications is not recommended or supported. See http://msdn.microsoft.com/en-us/library/ee663275.aspx.

There are a number of resources available to help you in porting a Direct3D 9 codebase to Direct3D 11. The majority of the material for porting from Direct3D 9 to Direct3D 10.x applies fully here since Direct3D 11's API is very similiar to Direct3D 10.

See http://blogs.msdn.com/b/chuckw/archive/2011/07/11/getting-started-with-direct3d-11.aspx. Be sure to review the Windows to Reality: Getting the Most out of Direct3D 10 Graphics in Your Games presentation as it covers numerous pitfalls and performance issues developers have hit in the past, and DirectX 11 Technology Update for a summary of the differences between Direct3D 10.x and Direct3D 11.

MSDN has a porting guide as well http://msdn.microsoft.com/en-us/library/ff476190.aspx which points you to http://msdn.microsoft.com/en-us/library/bb205073.aspx for going directly from Direct3D 9 to Direct3D 11.

Sorry, you can't use D3D9 directly for Metro-style apps. But you can use D3D11 and limit yourself to some feature level (e.g. D3D_FEATURE_LEVEL_9_3) if you want to support legacy hardware.

share|improve this answer
    
Wow, thank you for your answer. As I see you did a great research –  Techie Nov 16 '12 at 19:25
    
Well, not really, I just happen to be working on it right now ;) –  Laurent Couvidou Nov 16 '12 at 19:34
1  
AFAIK the win8 SDK that comes with VS 2012 does no longer ship any D3D11X* headers - only D3D11*. This leaves you without a number of utility functions, like loading shaders from a file and compiling them in one function call. –  melak47 Nov 16 '12 at 20:11
    
Indeed. What Microsoft says about that: "Be aware that replacement technologies for current uses of D3DX11 include DirectXTex and DirectXTK. D3DXMath is replaced by DirectXMath." Not tested so far. –  Laurent Couvidou Nov 16 '12 at 21:01
add comment

Windows 8 has the same basic support for Direct3D 9 applications as was present in Windows 7 and Windows Vista. Direct3D 9 is legacy and there are definitely some compat issues that can potentially impact Direct3D 9-based games, but they more or less function as well as they did on Windows 7.

Development with Direct3D 9 on Windows 8 is a bit more challenging than it was on Windows 7. The standard Direct3D 9 headers are part of the Windows 8.0 SDK (included with VS 2012), but that does not include D3DX9. The Direct3D 9 Debug Runtime is not supported on Windows 8. You can use the legacy DirectX SDK on Windows 8, but there are a number of challenges getting it installed and limitations.

The recommended API to use for writing new applications on Windows 7 and Windows 8 is Direct3D 11. This works for both Win32 desktop applications and Windows Store apps. Also, it is recommended that you make use of the Windows 8.x SDK and not make use of the DirectX SDK.

See Games for Windows and the DirectX SDK for lots of posts on this very topic.

share|improve this answer
    
Note that you do not "install DirectX" on any version of Windows newer than Windows XP Service Pack 1. The "DirectX End-User Runtime" package will install on Windows XP SP2, Windows Vista, Windows 7, and Windows 8.x but it never installs "DirectX". It just deploys some helper DLLs that are optional bits from the now legacy DirectX SDK: XINPUT 1.3, XAudio 2.7, D3DX, etc. Direct3D, DirectInput, DirectSound, etc. are only ever updated as part of official Service Packs or Windows Update releases. link –  Chuck Walbourn Jun 26 at 19:44
add comment

DirectX will install on Windows 8, Windows 7, Windows Vista, or Windows XP.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.