Sign in to follow this  

Introduction to 3D Game Programming with Directx 11 and Windows 8...

This topic is 809 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

Hi, new to the forums, hope this is the right place to ask this.

 

I am an ex-Software Engineer (no longer able to work full time due to health issues), and have recently been itching to get my hands dirty with some 3D graphics code again.

So, I was thinking of picking up Frank D. Luna's Introduction to 3D Game Programming with DirectX 11 book, as it seems to get great reviews.

However, one of the reviews I was reading notes that DX3DX library, that the book utilises, is deprecated under Windows 8.x

And I am, of course, using Windows 8.1!

So, my questions are:

 

Does anyone know how much of the book uses this library?

Is there an easy work around solution?

Are there any other compatibility issues I should be aware of?

Also, I'm considering upgrading my machine to Windows 10, would this cause more problems for me?

Thanks, in advance,

Scott Hill.

Share this post


Link to post
Share on other sites

It will / -Should- work just fine. The set up is a pain in the arse however.

The project set up will be slightly different. Windows has not changed that much from 7-10. 

 

If you upgrade to Windows 10, everything will still be honky dory. Just remember that you will need to pick up the Directx 11 SDK from microsofts website.

 

I have the book, and use Windows 10. I'm not finding any difficulties with it. That is outside of project setup.

Edited by Tangletail

Share this post


Link to post
Share on other sites

It will / -Should- work just fine. The set up is a pain in the arse however.

The project set up will be slightly different. Windows has not changed that much from 7-10. 

 

If you upgrade to Windows 10, everything will still be honky dory. Just remember that you will need to pick up the Directx 11 SDK from microsofts website.

 

I have the book, and use Windows 10. I'm not finding any difficulties with it. That is outside of project setup.

Thanks, that's a great help.

Could you give me some idea of what kind of setup changes are needed?

I will be using VS2015 Community Edition.

Share this post


Link to post
Share on other sites

For the most part, just remember that you have to install the June 2010 DirectX SDK.

You can also just port the book's examples from D3DX to DirectXTK (the official replacement for D3DX). It's not that hard to switch if you already understand C++. Microsoft even has documentation on how to upgrade from D3DX to DirectX TK

Also, for what it's worth, the DirectX 12 version of Frank Luna's book will be out soonish.

Thanks, Sean.

I did see that a DX12 version of the book will be available soon, but (a) I'd like to strike while the iron is hot, as it were, and (b) I don't know if my machine is DX12 compatible, so I figure I might as well start with the DX11 book and go from there.

Also, I'm unlikely to be distributing anything anytime soon, if ever, this is all just to keep my brain active, and to satisfy the urge I have to do some coding.

Right, I have now done some reading, and it appears I have the two options which you mentioned in your post:

1. Download the June 2010 DX SDK and adjust each Project's VC++ directories as detailed here, and it will use the D3DX library from that version of the SDK.

2. Port the sample code over to using DirectXTK and/or other replacements for D3DX.

Am I understanding that correctly?

If so, I think I will start with option 1, as that will likely get me up and running most quickly.

Share this post


Link to post
Share on other sites
The official website for Frank Luna's Directx11 book also has a section devoted to the transition to Windows 8. Therefore it shows how to integrate with the DirectXTK.

The link to the pdf describing the transition can be found here.

http://www.d3dcoder.net/Data/Resources/d3d11Metro.pdf

There is also code that can be downloaded. Scroll to the bottom of this link.

http://www.d3dcoder.net/resources.htm

Share this post


Link to post
Share on other sites

The official website for Frank Luna's Directx11 book also has a section devoted to the transition to Windows 8. Therefore it shows how to integrate with the DirectXTK.

The link to the pdf describing the transition can be found here.

http://www.d3dcoder.net/Data/Resources/d3d11Metro.pdf

There is also code that can be downloaded. Scroll to the bottom of this link.

http://www.d3dcoder.net/resources.htm

Thanks, that's really helpful.

Though I don't plan on writing Metro style apps, I can see that the information here will help me transition away from using D3DX, after I've finished working through Frank's book.

The above linked PDF also contains this link, which appears to detail exactly what I need to do to get the code samples working (it basically just reiterates the information found in the MSDN article that I had found previously, but also details the necessary modifications to the header includes in the sample code, which would likely have been a stumbling block).

Anyway, thanks again.

Share this post


Link to post
Share on other sites

www.rastertek.com has added some updates to his site too.

 

You could follow the historical dx11 tutorial, then hop onto dx11 series 2 to see how it's done nowadays.

Cool.

Once I've worked through Frank's book I will take a look at these. They look really good.

Thanks for the info.

Share this post


Link to post
Share on other sites

Got a little further but still stuck with three link errors, that I just cannot resolve:
 

Error LNK1120 2 unresolved externals Demo Project Setup c:\Users\Scott Hill\Documents\Visual Studio 2015\Projects\Introduction to 3D Games Programming with DirectX 11\Demo Project Setup\Debug\Demo Project Setup.exe 1
 
Error LNK2019 unresolved external symbol _D3DX11CreateEffectFromMemory@20 referenced in function "private: void __thiscall BoxApp::BuildFX(void)" (?BuildFX@BoxApp@@AAEXXZ) Demo Project Setup c:\Users\Scott Hill\Documents\Visual Studio 2015\Projects\Introduction to 3D Games Programming with DirectX 11\Demo Project Setup\Demo Project Setup\BoxDemo.obj 1
 
Error LNK2019 unresolved external symbol __vsnwprintf referenced in function "long __stdcall StringVPrintfWorkerW(unsigned short *,unsigned int,unsigned int *,unsigned short const *,char *)" (?StringVPrintfWorkerW@@YGJPAGIPAIPBGPAD@Z) Demo Project Setup c:\Users\Scott Hill\Documents\Visual Studio 2015\Projects\Introduction to 3D Games Programming with DirectX 11\Demo Project Setup\Demo Project Setup\dxerr.lib(dxerrw.obj) 1

Share this post


Link to post
Share on other sites

Managed to resolve one of the unresolved external errors, but still left with this one:
 

Error LNK2019 unresolved external symbol __vsnwprintf referenced in function "long __stdcall StringVPrintfWorkerW(unsigned short *,unsigned int,unsigned int *,unsigned short const *,char *)" (?StringVPrintfWorkerW@@YGJPAGIPAIPBGPAD@Z) Demo Project Setup C:\Users\Scott Hill\Documents\Visual Studio 2015\Projects\Introduction to 3D Games Programming with DirectX 11\Demo Project Setup\Demo Project Setup\dxerr.lib(dxerrw.obj) 1

Share this post


Link to post
Share on other sites

SOLVED IT! biggrin.png

 

For anyone else that finds this thread because they have the same issues:

The first unresolved external was caused by not copying the updated d3dx11effect.h header across into the book's common files directory along with the recompiled Effects11.lib and Effects11d.lib - that you needed to do this was not clear from the instructions.

The second unresolved external was caused (I think) by a mismatch of what C Run-time Library version that dxerr.lib was expecting - so I grabbed the dxerr.zip file from here, dropped dxerr.cpp and dxerr.h into the book's common files directory, added them to my project, and removed dxerr.lib from the linker inputs list.

The demo project now compiles, links, and runs. smile.png

Share this post


Link to post
Share on other sites

Oh, also forgot to add:

The book has you add a .fx file to the project, but VS2015 doesn't like this, so you need to skip that.

Alternatively (and probably more correctly):

After adding color.fx to the project follow these steps:

1. Right click on color.fx and select 'Properties'.
2. Ensure 'All Configurations' is selected in the 'Configuration' drop down list.
3. Under 'Configuration Properties->General', ensure 'Item Type' is set to 'HLSL Compiler'.
4. Under 'Configuration Properties->HLSL Compiler->General', ensure 'Shader Type' is set to 'Effect (/fx)', and 'Shader Model' is set to 'Shader Model 5 (/5_0)'.
5. Click 'Apply' and 'OK'.

 

Otherwise you will receive the following error when you try to build the solution:
 

Error X3501 'main': entrypoint not found Demo Project Setup C:\Users\Scott Hill\Documents\Visual Studio 2015\Projects\F D Luna Book\Demo Project Setup\Demo Project Setup\FXC 1
Edited by Scorpion0x17

Share this post


Link to post
Share on other sites

This topic is 809 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.

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