Jump to content
  • Advertisement
Sign in to follow this  
matt77hias

DX11 No visualizations at first when using DirectX SDK

This topic is 559 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 tried to run some of RasterTek's DirectX 11 tutorials using the obsolete DirectX SDK (June 2010). When I run these tutorials (as-is) my screen becomes completely black on my notebook (i.e. so no visualizations). My notebook also seems unresponsive for a few seconds while pushing CTRL+ALT+DELETE. Finally, CTRL+ALT+DELETE works and after re-clicking the application icon (so that it has focus again), the application and visualizations work fine.

Any ideas why this does not work out of the box?

Edited by matt77hias

Share this post


Link to post
Share on other sites
Advertisement

Could be a problem with your laptop. You mean you get this problem when you run any executable provided by rastertek tutorials only? Did you compile that executable yourself or you downloaded it from the website?

Share this post


Link to post
Share on other sites

Could be a problem with your laptop. You mean you get this problem when you run any executable provided by rastertek tutorials only? Did you compile that executable yourself or you downloaded it from the website?

 

Tried an exe. Works fine.

My own compiled exe's seem not to work. I only updated the platform while importing the solution in Visual Studio 2017 and added the Include/Libs to the DXSDK.

Share this post


Link to post
Share on other sites
added the Include/Libs to the DXSDK

Probably that's your problem. Visual Studio comes with DirectX since a few years ago. Mixing them together is just asking for trouble.

Also, are you sure it's not simply compiling shaders / loading data? 

Edited by Zaoshi Kaba

Share this post


Link to post
Share on other sites
Probably that's your problem. Visual Studio comes with DirectX since a few years ago. Mixing them together is just asking for trouble.

 

I have no issues running my own programs using Direct3D 11 and the obsolete DirectX 9 SDK. I never used the obsolete DirectX 11 SDK before, so RasterTek's tutorials are the first ones I tried.

I do not see why "Mixing them together is just asking for trouble" since it is only a matter of including and linking libs in Visual Studio. Besides Direct3D 11 seems rather a subset of the full DirectX 11 SDK.

Edited by matt77hias

Share this post


Link to post
Share on other sites

The installation of DXSDK_Jun10 returned a failure code, but I presume this is due to the deprecation policy of Microsoft. Besides all the content seems to be present and in the right directories (even the environment variable is set).

Share this post


Link to post
Share on other sites
Probably that's your problem. Visual Studio comes with DirectX since a few years ago.

Yeah spot on.

I had similar issues setting up a DX project recently. By default your VS project properties probably have the following include and lib directories:

  • c:\Program Files (x86)\Windows Kits\[some version]\Include\
  • c:\Program Files (x86)\Windows Kits\[some version]\lib\winv6.3\x64

Or something similar, I think there are around three Include directories and a couple of lib directories. This is where the current version of DirectX is kept and your project is probably linking against these instead of the June 2010 SDK.

To prevent this from happening, under your project's Include & Lib directories you can uncheck the 'Inherit from parent or project defaults' checkbox. Note that you'll probably still need to explicitly include $(VC_IncludePath), and have $(VC_LibraryPath_x64) for your libs... it's the Windows SDK stuff you want to avoid.

Hope that helps!

Edited by Orangeatang

Share this post


Link to post
Share on other sites
Or something similar, I think there are around three Include directories and a couple of lib directories. So this is where the latest version of DirectX is kept so you project is probably linking against these instead of the June 2010 SDK.

 

Removed all the SDK paths under VC++ directories. But what is now the alternative for windows.h?

Edited by matt77hias

Share this post


Link to post
Share on other sites

Ah you probably still need the following include directory:

  • c:\Program Files (x86)\Windows Kits\8.1\Include\um\

Since that's where Windows.h, you really just want to make sure that you're including and linking against the June 2010 SDK and not the Windows Kit SDK for DirectX.

Share this post


Link to post
Share on other sites
Since that's where Windows.h, you really just want to make sure that you're including and linking against the June 2010 SDK and not the Windows Kit SDK for DirectX.

I needed to add a few more, but now it compiles again :)

  • Executable Directories: $(VC_ExecutablePath_x86);$(VS_ExecutablePath);C:\Program Files (x86)\Windows Kits\8.1\bin\x86;$(MSBuild_ExecutablePath);$(SystemRoot)\SysWow64;$(FxCopDir);$(PATH);
  • Include Directories: $(DXSDK_DIR)Include;$(VC_IncludePath);C:\Program Files (x86)\Windows Kits\8.1\Include\um;C:\Program Files (x86)\Windows Kits\8.1\Include\shared
  • Library Directories: $(DXSDK_DIR)Lib\x86\;$(VC_LibraryPath_x86);$(NETFXKitsDir)Lib\um\x86;C:\Program Files (x86)\Windows Kits\8.1\Lib\winv6.3\um\x86

Unfortunately, the result is pretty much the same. (I think the order matters, so if you place DXSDK first, there will be no conflict with the Windows SDK)

My .sln can be found here: https://www.dropbox.com/s/zzscgq9oxcbz74u/Engine.zip?dl=0

Edited by matt77hias

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!