Jump to content
  • Advertisement
GameDevCoder

DX11 I need to learn DirectX. The examples for Introduction to 3D Programming with DirectX 11 by Frank D Luna does not work. Can anyone help me

This topic is 394 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 have to learn DirectX for a course I am studying. This book https://www.amazon.co.uk/Introduction-3D-Game-Programming-Directx/dp/1936420228 I felt would be great for me to learn from.

The trouble is the examples which are all offered here http://www.d3dcoder.net/d3d11.htm . They do not work for me. This is a known issue as there is a link on the examples page saying how to fix it. I'm having difficulty with doing this though. This is the page with the solution http://www.d3dcoder.net/Data/Book4/d3d11Win10.htm.

The reason why this problem is happening, the book was released before Windows 10 was released. Now when the examples are run they need slight fixes in order for them to even work. I just can't get these examples working at all.

Would anyone be able to help me get the examples working please. I am running Windows 10 also just to make this clear, so this is why the examples are experiencing the not so desired behaviour. I just wish they would work straight away but there seems to be issues with the examples from this book mainly because of it trying to run from a Windows 10 OS.

On top of this, if anyone has any suggestions with how I can learn DirectX 11 i would be most grateful. Thanks very much. I really would like to get them examples working to though from the book I mentioned.

Look forward to reading any replies this thread receives.

 

GameDevCoder.


PS - If anyone has noticed. I asked this about 1 year ago also but this was when I was dabbling in it. Now I am actually needing to produce some stuff with DirectX so I have to get my head round this now. I felt at the time that I sort of understood what was being written to me in response to my thread back then. I had always been a little unsure though of being absolutely sure of what was happening with these troublesome examples. So I am really just trying to get to the bottom of this now. If anyone can help me work these examples out so I can see them working then hopefully I can learn DirectX 11 from them.

 

*SOLUTION* - I was able to get the examples running thanks to the gamedev.net community. Great work guys. I'm so please now that I can learn from this book now I have the examples running.

https://www.gamedev.net/forums/topic/693437-i-need-to-learn-directx-the-examples-for-introduction-to-3d-programming-with-directx-11-by-frank-d-luna-does-not-work-can-anyone-help-me/?do=findComment&comment=5363013

Edited by GameDevCoder

Share this post


Link to post
Share on other sites
Advertisement

Thanks for the reply. So, In order to getting these examples to work there needs to be some tweaks so they run normally again.

From stuff in a topic I made about the same thing last year actually as I was just looking into this (preparation work) just then but am now needing to actually use DirectX so am really trying to get these examples working fine now.

I have tried using some knowledge of which I acquired when I made a similar topic about a year ago now. Last night I was able to get working examples for chapter 1, 2, there isn't any for 3, chapter 4. One of the four examples in Chapter 6 I have working now to. If I can talk about an issue I'm having with one example for chapter 6.

Here is what is stopping me run the Box example for chapter 6 right now. https://ibb.co/mQbPvw

Prior to this like I have done similarly with the examples before to get them working for me:

-Clicking in properties I go on VC++ Directories and change the include and library directories to include $(DXSDK_DIR), or where a 'common' folder is located that all the examples rely on.

- In Linker - Input. I remove d3dx11d.lib (in debug config), d3dx11.lib (in release), dxerr.lib (for both).

- Lastly I right click on the project and add existing item - I select from common folder 'dxerr.h and dxerr.cpp.

 

These steps allow for some examples to work. I'm having a problem with this box example though now and am not sure what to do.

Lastly, in some cases I might reconfigure so the common folder can be found like in c/c++ property page include directory. In the end I just try many ways in the hope I can get the examples working, I was given some instructions in the past how to get them working although I wasn't so confident that they worked flawlessly (i mean, it worked for one example but I wasn't sure they would work for other examples) or that I understood properly how they worked.

 I hope this helps with explaining my predicament a bit more. 

 

Any help would be so very much appreciated from the community. Thank you.

Share this post


Link to post
Share on other sites
15 hours ago, GameDevCoder said:

On top of this, if anyone has any suggestions with how I can learn DirectX 11 i would be most grateful.

I dont know anything about that book, but you can learn dx11 directly from MSDN and their dx11 samples work on windows 10 (I just checked them)

 

Direct3D Tutorial Win32 Sample - https://code.msdn.microsoft.com/Direct3D-Tutorial-Win32-829979ef
This is the classic tutorials 1-7 that take you from setting up a window to displaying a rotating textured cube. The download button is at the top of that page.
The zip file contains:
1. description.html
  this has links for all 7 tutorial step by step descriptions. You should read all of these

2. A folder called c++
You can open this "Tutorials.sln" solution in visual studio (I use visual studio 2017), and let it update them all to the latest version of visual studio. Or you can open the projects in the folders which seems to also open all of them.
The sample contains all 7 tutorials. Compile them.
To run a particular sample (as the solution contains all), in the solution explorer of visual studio right click on the one you want eg "Tutorial07" and select "set as startup project". Then from the top menu select debug - start debugging.
I just checked it and it does work on windows 10, with visual studio 2017

********
After these 7 tutorials I recommend MSDN:

Direct3D 11 Graphics - https://msdn.microsoft.com/en-us/library/windows/desktop/ff476080(v=vs.85).aspx
Read each of those sections links

HLSL - https://msdn.microsoft.com/en-us/library/windows/desktop/bb509561(v=vs.85).aspx
Read each of those sections links

 

Edited by CortexDragon

Share this post


Link to post
Share on other sites

I think you need to download and install the legacy june 2010 directx SDK, because the bewerkt SDK's dont include d3dx11, which is used in luna's book and examples. You can find it on github, might need to build the libs (debug and release) yourself. Which should be relatively easy with some googling (if you've never did this before).

Share this post


Link to post
Share on other sites
16 minutes ago, cozzie said:

I think you need to download and install the legacy june 2010 directx SDK, because the bewerkt SDK's dont include d3dx11, which is used in luna's book and examples. You can find it on github, might need to build the libs (debug and release) yourself. Which should be relatively easy with some googling (if you've never did this before).

Hi. thank you. Yeah, I have installed the june 2010 directx sdk. I have had to do things with the debug and release also like removing some libraries that someone mentioned to me in the past. I appreciate your post.
If anyone can see the issue I'm having at the moment with the BOX example that isn't working. If anyone knows how them errors can be fixed? It was in regards to this https://ibb.co/mQbPvw  . Thanks forum.

Share this post


Link to post
Share on other sites

If you install and use the june 2010 SDK then you won't need to change anything.

edit - code that is.

Edited by Infinisearch

Share this post


Link to post
Share on other sites
1 minute ago, Infinisearch said:

If you install and use the june 2010 SDK then you won't need to change anything.

Interesting. I am just working through these examples now as it goes. Will see how I get on. Thanks for these post. Food for thought. 

Share this post


Link to post
Share on other sites

Ok. I have removed a couple errors and am just left with one issue for the BOX example in chapter 6.

Does anyone know how I can fix this please?  https://ibb.co/gstKvw

I've no idea what to do about this problem.

Edited by GameDevCoder

Share this post


Link to post
Share on other sites

  • 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!