Sign in to follow this  
Thiatsii

Which DirectX Version?

Recommended Posts

Thiatsii    145

I'm running on Win7 pro using MSVS 2010 Pro. I've started with DX10 and C++, but have come across multiple references to using DX11 or DX9. In essence... I've already spent 2 months learning DX10; I don't want to waste time on this version if I should migrate (I'm not worried about supporting Win8).

 

I appreciate any feedback.

Share this post


Link to post
Share on other sites
Thiatsii    145

Okay... DirectX 11, here I come. I removed the DirectX SDK (June 2010), as well as all other SDKs and VS2010 Pro for a clean environment. I've installed the Windows 8.1 SDK and VS2013 Express onto my Win 7/x64 machine.

 

However, I am unsure of proper linking in project properties. Which path should I link to if I don't want to worry about legacy, but can still run my program on my win 7 machine?

Edited by Thiatsii

Share this post


Link to post
Share on other sites
Buckeye    10747

VS2013 Express should, by default, provide the proper search paths for most includes and librarys when you create new solutions from the menu. The default macro values, for instance, for $(WindowsSDK_IncludePath) should be (something like) ...ProgramFiles(x86)\Windows Kits\8.1\Include\um; ... etc., so you shouldn't really have to worry about it. Just do the "standard" #include <d3d11.h>, and link to d3d11.lib in the project properties. The default search paths for most headers and libraries (as mentioned) will be taken care of.

 

The docs will tell you (usually at the bottom of a page describing a function or class) which header to include, and which lib to link to.

 

FYI, keeping the June 2010 sdk around shouldn't be a problem, either. I keep it for some of my older DX9 projects ("old" as of a couple of months ago when I moved to D3D11) which I still play with. Avoiding "legacy" problems shouldn't be a concern, either. Unless you want to use something from the DirectX SDK, just don't set an include or library search path to it.

Edited by Buckeye

Share this post


Link to post
Share on other sites
Thiatsii    145


FYI, keeping the June 2010 sdk around shouldn't be a problem, either. I keep it for some of my older DX9 projects ("old" as of a couple of months ago when I moved to D3D11) which I still play with. Avoiding "legacy" problems shouldn't be a concern, either. Unless you want to use something from the DirectX SDK, just don't set an include or library search path to it.

Thank you, Buckeye. I'll keep that in mind once I get DX11 working smoothly. 

 

A big reason for my migration was hearing of all sorts of stuff from earlier versions disappearing into obscure regions of DX11; such as  searching for tutorials on sprites and learning that now its best to use the XTK.  I want sprites for UI because they always face the camera... unless they've changed that too.

Share this post


Link to post
Share on other sites
Buckeye    10747

all sorts of stuff from earlier versions disappearing into obscure regions of DX11

 

Actually, much of the "stuff" (ID3DXSprite, D3DXVECTOR, D3DXMATRIX, etc.) is no longer supported at all in D3D11. You have to do it yourself, or use a library such as the DXTK (which for beginners is preferable to implementing your own classes/structures.)

 

 

 


I want sprites for UI because they always face the camera

 

Just for clarification, a "sprite" is commonly just a textured quad rendered in screen space. As such, it doesn't "face the camera." That is, rendering a sprite in that way doesn't consider the world-view-projection process at all. The shader passes vertices already defined in screen-space coordinates through to the rasterizer. For UI implementation, that's commonly done by rendering the sprite objects last with depth buffering disabled to ensure it's rendered over the background.

 

For platform games, however, it's often the case that sprites are used (ala Mario) with depth enabled and the character can appear to pass behind objects.

 

There is a technique for rendering 3D objects which face the camera called "billboarding." That can be done with or without depth buffering enabled, depending on the desired effect.

Edited by Buckeye

Share this post


Link to post
Share on other sites
Thiatsii    145


Just for clarification, a "sprite" is commonly just a textured quad rendered in screen space. As such, it doesn't "face the camera."
This was an excellent clarification. Thank you.

Share this post


Link to post
Share on other sites
Hodgman    51234
Just to be pedantic; none of the "*D3DX*" stuff was ever part of D3D, it was part of D3DX (a closed source utility library made by MS to make some D3D tasks easier to get started with). What's happened is that support for D3DX has been dropped, so there's not any new versions. Instead, we now have some open-source utility libraries filling the void. AFAIK, DXTK is open source but also officially endorsed (and worked on) by Microsoft.

Share this post


Link to post
Share on other sites
Thiatsii    145

Just to be pedantic; none of the "*D3DX*" stuff was ever part of D3D, it was part of D3DX (a closed source utility library made by MS to make some D3D tasks easier to get started with). What's happened is that support for D3DX has been dropped, so there's not any new versions. Instead, we now have some open-source utility libraries filling the void. AFAIK, DXTK is open source but also officially endorsed (and worked on) by Microsoft.

 

It seems like Microsoft made things more difficult to work with DirectX from version 10 on. Is this the reason so many people are still programming for version 9.0c?

Share this post


Link to post
Share on other sites
Alessio1989    4634

 

Just to be pedantic; none of the "*D3DX*" stuff was ever part of D3D, it was part of D3DX (a closed source utility library made by MS to make some D3D tasks easier to get started with). What's happened is that support for D3DX has been dropped, so there's not any new versions. Instead, we now have some open-source utility libraries filling the void. AFAIK, DXTK is open source but also officially endorsed (and worked on) by Microsoft.

 

It seems like Microsoft made things more difficult to work with DirectX from version 10 on. Is this the reason so many people are still programming for version 9.0c?

 

 

Difficult? I started with DirectX 11 as I find it really easy compared to DX9.x stuffs. 

 DX11 programming is similar to DX10 progamming, with some exceptions (device vs context) and new additions (tesselation pipeline, compute shaders, deferred context and multithreading, dx 11.1 and 11.2 extensions), but most is just simple refactoring (from 10.x to 11.x), you can even use feature level 10.x and SM 4.0 profiles.

 

If you feel frustrated  do D3DX removal, have a look here: http://blogs.msdn.com/b/chuckw/archive/2013/08/21/living-without-d3dx.aspx

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this